AGENT SKILL

writing-skills

Use when creating, editing, consolidating, evaluating, benchmarking, or testing Claude skills, especially when triggering, overlap, context size, references, or reliability need improvement.

License 许可
MIT
所属仓库
amoai-tech/mdeai
最近更新
2026-11-13
Stars
★ 2
Forks
1

01 前言 Front Matter

name
writing-skills
description
Use when creating, editing, consolidating, evaluating, benchmarking, or testing Claude skills, especially when triggering, overlap, context size, references, or reliability need improvement.

02 资源文件 4

03 SKILL.md 正文

Writing Skills

Purpose

Create skills that trigger at the right time, load only the context they need, teach reusable judgment, and can be verified instead of merely sounding good.

Shared MDE standards

Before creating or materially changing a skill, read:

Do not duplicate these standards inside individual skills. A skill should add only its own trigger, ownership, invariants, decisions, procedures, references, and evals.

Authoring contract

  1. Capture intent first. State the job, trigger conditions, expected output, dependencies, and success criteria.
  2. Check for overlap. Prefer improving an existing canonical skill over creating a second skill that owns the same workflow.
  3. Use progressive disclosure. Keep the main SKILL.md concise; move heavy reference material to references/, deterministic helpers to scripts/, and reusable output assets to assets/.
  4. Optimize discovery. name uses lowercase letters/numbers/hyphens. Open the description with a trigger phrase and then say both what the skill does and which contexts should load it. Claude under-triggers skills, so name concrete symptoms, file types, tools, and the adjacent-but-wrong cases this skill should not claim — a bare topic list will not fire when it should. Keep it to a few sentences: the description sits in context on every turn, so length is a standing cost, but omitting what the skill does makes it harder to match, which costs more.
  5. Write imperative instructions. Explain why important constraints exist; avoid repetitive MUST-heavy prose when a short rationale is clearer.
  6. Use repository truth. Project-specific rules belong in the project skill or project instructions, not copied into generic skills.
  7. Add examples only when they reduce ambiguity. Examples should teach the invariant, not accidentally narrow the skill to one project.
  8. Test the skill. Separate trigger evals from behavior evals. For material, objectively verifiable, or routing-sensitive changes, compare the candidate skill against a no-skill or previous-skill baseline before declaring improvement.
  9. Treat repo skills as trusted code. .claude/skills/ is part of the agent trust boundary: review skill changes like executable instructions, avoid unreviewed external content, and keep branch-local skills versioned with the code they describe.
  10. Control context cost. Skill metadata is always discoverable and loaded skill bodies persist in context; keep SKILL.md concise and move deep detail to references/scripts loaded only when needed.
  11. Refactor after evidence. Remove redundant text, close discovered loopholes, and re-run the relevant evals.

MDE skill structure

skill-name/
├── SKILL.md
├── references/   # optional; loaded only when needed
├── scripts/      # optional deterministic helpers
├── assets/       # optional output templates/assets
└── evals/        # MDE test prompts/expectations

Quality gate

Before considering a skill ready:

  • Frontmatter has a lowercase kebab-case name and a description that opens with a trigger phrase and states both what the skill does and when to load it.
  • Main file is preferably <500 lines and has no duplicated reference dump.
  • Relative links resolve.
  • No stale project/repo paths or copied domain terminology remain.
  • Ownership vs neighboring skills is explicit.
  • Instructions do not contradict tasks, task-verifier, or the owning domain skill.
  • At least two realistic eval prompts exist when behavior is objectively testable; important material rewrites include baseline-vs-candidate evidence.
  • Mechanical rules that can be linted are automated rather than repeated as prose.

References

For current Anthropic guidance, verify against the official skill-creator source before materially changing this standard.

04 同仓库更多 Skills