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.
Quick Take
Section titled “Quick Take”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.
When To Use Them
Section titled “When To Use Them”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
When Not To Use Them
Section titled “When Not To Use Them”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.
A Simple Split
Section titled “A Simple Split”| Put it in… | If the instruction is… |
|---|---|
| Context file | stable, repo-wide, and almost always relevant |
| Skill or rule bundle | specialized, reusable, and task-triggered |
| Task prompt | specific to the change you want right now |
Skills Vs Context Files
Section titled “Skills Vs Context Files”| Question | Context file | Skill |
|---|---|---|
| When loaded | every session | only when relevant |
| Best use | repo-wide defaults | repeatable workflows |
| Scope | always-on | task-scoped |
| Good examples | commands, conventions, safety | deploy, review, migration |
Examples
Section titled “Examples”- A
code-reviewskill that tells the agent to look for bugs, regressions, and missing tests first. - A
release-checkrule that always verifies changelog, versioning, and smoke tests. - A
frontend-qaworkflow that asks for screenshots and accessibility checks after UI edits.
Example Skill Layout
Section titled “Example Skill Layout”.claude/ skills/ deploy/ SKILL.md checklist.md pr-review/ SKILL.mdStarter SKILL.md
Section titled “Starter SKILL.md”---name: deploydescription: Run the project deployment workflow safely---
# Deploy Checklist
1. Run `pnpm test`2. Run `pnpm build`3. Confirm environment changes4. Deploy using the approved command5. Smoke test the critical pathCross-Agent Notes
Section titled “Cross-Agent Notes”- 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.