AgentSkillsCN

agent-file-architecture

采用薄层映射架构(共享策略结合精简的角色叠加)来设计、重构并验证项目代理文件。当您需要创建或更新 `agents/*.md` 文件、拆分单体代理指令、强制执行角色约束,或将长期运营指南迁移到文档中时,可选用此方法。

SKILL.md
--- frontmatter
name: agent-file-architecture
description: Design, refactor, and validate project agent files using a thin-map architecture (shared policy plus lean role overlays). Use when creating/updating `agents/*.md`, splitting monolithic agent instructions, enforcing role schema, or migrating long operational guidance into docs.

Agent File Architecture

Use this skill for work in agents/.

Use when:

  • Refactoring role prompts into schema-driven overlays.
  • Moving duplicated policy into agents/shared/.
  • Splitting long operational content into docs.

Do not use when:

  • Implementing runtime code features in src/ or orchestration/.
  • Changing benchmark/model behavior unrelated to prompt architecture.

Workflow

  1. Apply the role schema in references/schema.md.
  2. Use migration guidance in references/migration.md.
  3. Run scripts/validate_agents.py.
  4. If validation fails, fix schema or references before finalizing.

Boundaries

  • Keep role files concise.
  • Keep cross-cutting policy in agents/shared/.
  • Keep long operational details in docs/guides/agent-workflows/.