跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

aidd-context:03:context-generate

Generate Claude Code context artifacts - skills (router-based: SKILL.md + atomic testable actions + minimal evals), agents, and rules. Use when the user wants to create, refactor, add or remove actions in a skill, migrate a slash command into a skill, or generate a new agent or rule. Do NOT use for editing a single action inside an existing skill (edit directly), creating slash commands (no router needed), writing MCP servers, or modifying project-level CLAUDE.md files.

ai-driven-dev · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add ai-driven-dev/framework --skill aidd-context:03:context-generate

技能说明


name: aidd-context:03:context-generate description: Generate Claude Code context artifacts - skills (router-based: SKILL.md + atomic testable actions + minimal evals), agents, and rules. Use when the user wants to create, refactor, add or remove actions in a skill, migrate a slash command into a skill, or generate a new agent or rule. Do NOT use for editing a single action inside an existing skill (edit directly), creating slash commands (no router needed), writing MCP servers, or modifying project-level CLAUDE.md files.

Context Generate

Generates the three context artifacts a project consumes:

  • Skills - router-based: SKILL.md router + atomic testable actions, evaluations declared before implementation.
  • Agents - single-file agent definitions following the framework's agent template.
  • Rules - framework rule files that govern editor/agent behavior.

Skill-generation actions

#ActionRoleInput
01capture-intentClarify output + decide generate vs modifyuser intent
02design-evalsWrite minimal scenarios.jsonexpected output
03decompose-actionsList actions + their testsevals + output
04draft-skillWrite SKILL.md routerdecomposed actions
05write-actionsWrite each action filevalidated SKILL.md
06validateSpawn one agent per action, run its ## Test, aggregate into a pass/fail reportcomplete skill

Files: actions/skills/01-capture-intent.md … actions/skills/06-validate.md.

Other generation actions

  • actions/agents/01-generate-agent.md - generate a project agent file from assets/agents/agent-template.md.
  • actions/rules/01-generate-rules.md - generate framework rules from assets/rules/rule-template.md.

Default skill flow

01 → 02 → 03 → 04 → 05 → 06. After each action, run its ## Test before moving to the next. Action 02 self-skips when 01 outputs invocation_mode = manual.

Modify flow

01 (detects modify) → 03 (re-decompose if structure changes) → 05 (targeted edit) → 06 (re-validate).

Runtime tracking

Materialize the flow as a task list at skill entry; a task closes only when its ## Test passes.

Rules

  • R1 - SKILL.md is a pure router: description + action table + transversal rules. Zero business logic.
  • R2 - One skill = one domain (tool OR activity). Tool → singular noun (slack); activity → action verb (review). See references/naming-conventions.md.
  • R3 - References one-level deep. Never chain reference → reference.
  • R4 - SKILL.md ≤ 500 lines. If exceeded, split into references.
  • R5 - Description must include: what, explicit triggers, "Do NOT use for..." clause.
  • R6 - Zero duplication. Templates live in assets/; actions point to them via @<path>.
  • R7 - references/ = documents to READ (conventions, cheatsheets). assets/ = files to COPY or INJECT (templates, ID tables).
  • R8 - Every action has a ## Test: one sentence describing how to verify its intent - a command to run, a concrete check on the produced artifact, or an observable side-effect (API/MCP/state).
  • R9 - Auto-trigger skills (disable-model-invocation: false, default) ship evals/scenarios.json = JSON array of at least 3 {prompt, expect_action}. Manual-only skills skip.
  • R10 - Generated skills are written in English only (frontmatter, body, actions, references, assets). Holds regardless of conversation language.

References

  • references/naming-conventions.md - tool vs activity naming, hard constraints
  • references/skill-structure.md - skill anatomy
  • references/agents-coordination.md - multi-agent coordination patterns
  • references/rule-structure.md - rule file anatomy
  • references/rule-writing.md - rule authoring conventions
  • references/ide-mapping.md - syntax and file location reference for AI files (agents, commands, rules, skills)

Assets (templates to copy)

  • assets/skills/skill-template.md - SKILL.md skeleton
  • assets/skills/action-template.md - action file skeleton
  • assets/skills/evals-template.md - scenarios.json minimal schema
  • assets/agents/agent-template.md - agent file skeleton
  • assets/rules/rule-template.md - rule file skeleton