Skill writing best practices
Skill lazuee/agent-skills/skills/skill-writing-best-practices
Guidelines for creating AI agent skills. Use when writing new skills, documenting coding patterns, or reviewing skill files. Triggers when creating or modifying files in the skills/ directory.From its SKILL.md
npx -y skills add lazuee/agent-skills --skill skill-writing-best-practicesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.1 KB, 674 tokens by cl100k_base, as published. Nobody here has run it
Skill Writing Best Practices
Patterns for creating effective AI agent skills. Contains 10 rules across structure, content, and style.
When to Apply
- Creating a new skill from scratch
- Extracting patterns from an existing codebase
- Reviewing or improving existing skills
- Converting documentation into skill format
Rules Summary
Structure (HIGH)
skill-directory-structure - @rules/skill-directory-structure.md
One skill = one directory: SKILL.md + rules/ subdirectory. Directory names use {topic}-best-practices.
skill-md-structure - @rules/skill-md-structure.md
SKILL.md has four parts: frontmatter, overview with "When to Apply", grouped rule summaries with one-liner descriptions, and optional philosophy.
rule-file-structure - @rules/rule-file-structure.md
Each rule file has frontmatter (title, impact, tags), a "Why" section, a "Pattern" section with bad/good code, and numbered takeaways.
skill-scope - @rules/skill-scope.md
One skill = one coherent topic. If you need "and" to describe it, it's two skills. Aim for 3-8 rules per skill.
Content (HIGH)
ground-in-source-code - @rules/ground-in-source-code.md
Find the code first, then write the rule. Copy patterns from real files. Never invent APIs or assume framework behavior from memory.
concrete-examples - @rules/concrete-examples.md
Every rule needs code examples. Show before/after transformations, use real code, and match example complexity to rule complexity.
explain-why - @rules/explain-why.md
Every non-trivial rule needs a "Why" section. Use bolded benefit names with concrete, specific explanations — not vague phrases like "more maintainable".
anti-patterns - @rules/anti-patterns.md
Know what to leave out: no tutorial content, no API docs, no duplicating external library docs, no rules without examples.
Style (MEDIUM)
writing-style - @rules/writing-style.md
Write for AI agents consuming context windows. Be direct, cut filler, keep SKILL.md summaries to one sentence per rule, and reserve formatting for emphasis.
Quality (MEDIUM)
validate-before-publishing - @rules/validate-before-publishing.md
Run a self-review checklist before publishing: every rule has an example, code compiles, no contradictions between rules, and SKILL.md references match rule files.
Philosophy
- Grounded — Rules come from observed code, not assumed knowledge
- Focused — One skill, one topic, 3-8 rules
- Concrete — Every rule has code examples
- Reasoned — Explains why, not just what
- Scannable — One sentence per rule summary; details in rule files
- Brevity — SKILL.md is a summary; rule files hold the depth
- Validated — Tested against real scenarios before publishing
- Honest — Shows when NOT to use a pattern
- Natural — Written like documentation, not AI output
What ships with it: 10 files
34.3 KB alongside SKILL.md
rules/
- anti-patterns.md4.8 KB
- concrete-examples.md3.0 KB
- explain-why.md3.2 KB
- ground-in-source-code.md3.8 KB
- rule-file-structure.md3.6 KB
- skill-directory-structure.md1.6 KB
- skill-md-structure.md4.4 KB
- skill-scope.md2.8 KB
- validate-before-publishing.md2.8 KB
- writing-style.md4.3 KB