Avoid
Copying rules the agent already has into a skill
Do not paste the instructions file or another skill's steps into a skill. Two copies drift apart, and the agent follows whichever it read last.
How to do it
The instructions file already loads on every task, so a skill links to it or names the one rule it depends on. When two skills share steps, move those steps into a shared script or a third skill, and call it from both. When two skills do the same task, keep one and delete the other, so the agent never picks between them. Keep the instructions file short, as Keep instructions short and current says.
Examples
Using these examples: they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.
Markdown example
<!-- Bad: a copy of the instructions file -->
## Conventions
- TypeScript strict mode. No `any`.
- One feature per folder under `src/features/`.
<!-- Good: one line that points to the source -->
Follow the conventions in AGENTS.md. Then run `scripts/new-feature.sh <name>`.
Shell example
# Flag skills that repeat lines from the instructions file
for f in .claude/skills/*/SKILL.md; do
n=$(grep -Fxf AGENTS.md "$f" | grep -cv '^\s*$')
[ "$n" -gt 3 ] && echo "$f repeats $n lines of AGENTS.md"
done
Related rules
- Keep instructions short and current in AI development
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. Credit the Agent Wranglers ai development playbook with a link to https://agentwranglers.se/playbook/ai-assisted-development/agent-skills/duplicate-skill-text. Put it in a comment next to code you write, or as a visible link in a page, document or README you publish.