Skip to content

feat(aidd-context): align skill-generate with Anthropic's skill authoring guidance #1017

Closed
1 of 1 issue completed

Description

@cellou59

Problem

aidd-context:04-skill-generate writes every new skill in the framework. Today it produces skills that miss several points of Anthropic's official guidance. Each gap repeats in every skill it generates.

Anthropic guidance What the generator does today
"Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md." [1] The router table names actions by bare slug, with no link. References are linked only from actions, two levels from SKILL.md.
"Always write in third person." [2] Its own contract asks for third person, but the template yields "Generate…", and so does its own description.
"Create evaluations BEFORE writing extensive documentation." [3] Run prompts with and without the skill [9]. No test prompts, no baseline without the skill.
"Match the level of specificity to the task's fragility and variability." [4] No guidance on how strict a risky step must be (push, delete, publish).
disable-model-invocation and hooks frontmatter [8]. "Claude skipped a rule that must hold every time: move the rule into a hook." [10] Neither field is ever chosen. None of the 51 shipped skills uses them.
Copyable checklist, and "Run validator → fix errors → repeat" [5][6] Steps have no completion check and no "return to step N". The review runs in the context that wrote the files.
After compaction only the start of a skill is kept, "so put the most important instructions near the top of SKILL.md" [10][11] The router's rules sit at the bottom.
"For reference files longer than 100 lines, include a table of contents at the top." [7] No such rule.
"Don't instruct Claude to reproduce its reasoning in the response." [12] No such rule.

Scope

  • Authoring contract: add the points above, and amend the router, action and description rules.
  • Router template: rules first, every action linked, a ## References table linking each reference.
  • Action template: each step ends on "Done when", with a "return to step N" on failure.
  • New evals template: 3 prompts that trigger, 1 that must not, each with a baseline.
  • Scope step records the risk (stays in the workspace, or reaches outside) and the baseline. The write step adds disable-model-invocation and hooks when the risk is outside. The validate step reviews in a fresh context and re-runs the evals.
  • Apply all of it to the generator's own SKILL.md.

Acceptance criteria

  • The generator's SKILL.md links every action, reference and asset directly
  • Its description opens on a third-person verb
  • A generated skill holds 3+1 eval prompts, each with a baseline
  • A generated skill that pushes, publishes or deletes sets disable-model-invocation: true
  • Each generated step ends on "Done when", and each check has a return line
  • Repository pre-commit and scripts/__tests__ pass

Prior art in this repo

Out of scope

  • Migrating the 50 other skills to the new contract. A follow-up issue.
  • Evals for the generator itself: it asks the user to confirm, and the headless eval harness runs a single turn (same limit as 01-brainstorm).

References

  1. https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#avoid-deeply-nested-references
  2. https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#writing-effective-descriptions
  3. https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#build-evaluations-first
  4. https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#set-appropriate-degrees-of-freedom
  5. https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#use-workflows-for-complex-tasks
  6. https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#implement-feedback-loops
  7. https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#structure-longer-reference-files-with-table-of-contents
  8. https://code.claude.com/docs/en/skills#frontmatter-reference
  9. https://code.claude.com/docs/en/skills#evaluate-and-iterate-on-a-skill
  10. https://code.claude.com/docs/en/skills#claude-stops-following-a-skill
  11. https://code.claude.com/docs/en/skills#skill-content-lifecycle
  12. https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5#recommended-scaffolding-changes

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. alexsoyes commented on Oct 14, 2026

    @alexsoyes
    Contributor

    Clairement à faire, j'ai lié l'issue de génération pour matcher aussi Codex, les descriptions sont trop longues depuis trop longtemps 🙏

  2. added theissue type on Nov 6, 2026
  3. moved this from Ideation to Todo in AIDD Roadmapon Nov 6, 2026
  4. blafourcade commented on Nov 6, 2026

    @blafourcade
    Contributor

    @alexsoyes does #1092 (streamline skill generation and validation) absorb this? One gap is still visible on next: the 04-skill-generate description starts with "Generate…" instead of the third person. If #1092 covers the rest, we close this one when it merges.

  5. moved this from Todo to Done in AIDD Roadmapon Nov 16, 2026
  6. closed this as completedby moving to Done in AIDD Roadmapon Nov 16, 2026
  7. blafourcade commented on Nov 16, 2026

    @blafourcade
    Contributor

    The lean rewrite of 04-skill-generate (#1092, #1231, #1249) applied this guidance, in part differently from the scope written here.

    Applied

    • Third-person description: "Creates or updates a skill across the host AI tools, when…".
    • Rules near the top: ## Transversal rules sits right after the flow diagram, and every file is 33 lines or fewer.
    • Feedback loop: each check repeats until clean ("repeat from step 1 until every list is empty"), and authoring rule R8 requires a loop to name the step it returns to.
    • Review against the authoring contract: check-skill.cjs checks the form deterministically; rules R1 to R20 are checked file by file, with file:line.
    • Frontmatter: the plan asks one question per extra field the target supports, disable-model-invocation included, read from the host's official source.
    • Repository pre-commit and scripts/__tests__ pass.

    Applied differently

    • "Done when": each action ends on a one-line ## Output that states its done condition; no literal "Done when" per step.

    Still open: evals

    • For now, validation proposes a runtime trial in a subagent, approved by the user, with evidence. It was measured on small models (Haiku, gpt-6-luna, qwen flash).
    • The 3+1 prompts with a baseline are not built. How to evaluate a generated skill still needs thinking; feedback and proposals are welcome.

    Not applied

    • SKILL.md links every action, reference and asset directly: the router names actions in the flow diagram, and references are linked from the actions that use them.
    • disable-model-invocation set automatically when a skill pushes, publishes or deletes: it is the user's answer, not a risk rule.
    • A table of contents for references over 100 lines: no reference reaches 100 lines.
    • The rule against reproducing reasoning in the response.

    Open a new issue for any of the last list still wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions