Skip to content

Skills and Rules

Skills and rules are reusable workflow units. Instead of repeating the same instructions every time you ask for a code review, a migration, or a deployment task, you package that knowledge once and let the agent activate it when needed.

Use a context file for always-on rules. Use a skill when the workflow is specialized enough that you do not want it in every session.

Use skills or rule bundles when:

  • a task type repeats across projects
  • the workflow has multiple steps
  • the agent needs access to supporting references, scripts, or templates
  • you want consistency without turning your base context file into a wall of text

Do not turn every tiny preference into a skill. If the rule is universal for the repo, put it in the main context file. If the instruction is only for one task, keep it in the prompt.

Put it in…If the instruction is…
Context filestable, repo-wide, and almost always relevant
Skill or rule bundlespecialized, reusable, and task-triggered
Task promptspecific to the change you want right now
QuestionContext fileSkill
When loadedevery sessiononly when relevant
Best userepo-wide defaultsrepeatable workflows
Scopealways-ontask-scoped
Good examplescommands, conventions, safetydeploy, review, migration
  • A code-review skill that tells the agent to look for bugs, regressions, and missing tests first.
  • A release-check rule that always verifies changelog, versioning, and smoke tests.
  • A frontend-qa workflow that asks for screenshots and accessibility checks after UI edits.
.claude/
skills/
deploy/
SKILL.md
checklist.md
pr-review/
SKILL.md
---
name: deploy
description: Run the project deployment workflow safely
---
# Deploy Checklist
1. Run `pnpm test`
2. Run `pnpm build`
3. Confirm environment changes
4. Deploy using the approved command
5. Smoke test the critical path
  • Gemini CLI explicitly supports packaged agent skills.
  • Codex environments often use local skills or instruction bundles for specialized workflows.
  • Claude Code may express the same idea through project memory, commands, or hooks rather than a single “skills” abstraction.

The exact mechanism changes, but the core idea is the same: keep reusable expertise reusable.