create-stateful-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseStateful Skill Scaffold Generator
有状态Skill脚手架生成器
Overview
概述
You are tasked with generating a new Stateful Agent Skill.
While standard skills (via ) execute isolated tasks, stateful skills possess deeper systemic awareness: they manage artifact lifecycles over time, configure multi-dimensional tone, propagate epistemic confidence hierarchies, and link to other skills via Chained Commands.
create-skillThese patterns were extracted from the L4 Anthropic Customer Support and Legal ecosystems.
你被要求生成一个全新的有状态Agent Skill。
通过生成的标准Skill仅执行孤立任务,而有状态Skill具备更深层的系统感知能力:它们可长期管理工件生命周期、配置多维度语气、传播认知置信度层级,还可通过链式命令(Chained Commands)与其他Skill关联。
create-skill这些模式提取自L4 Anthropic客户支持与法律生态系统。
Execution Steps
执行步骤
1. Requirements & L4 Pattern Discovery
1. 需求与L4模式梳理
Use a guided discovery interview. First, get the standard metadata (Skill Name, Description).
Then, progressively ask the user which L4 State/Lifecycle templates they need injected:
Q1. Epistemic Trust (Tiered Authority)
Does the agent need a Tiered Source Authority model to propagate a Confidence Score (High/Med/Low) into its outputs based on the evidentiary hierarchy?
Q2. Artifact Lifecycle Management
Does this skill create or maintain persistent outputs (e.g., KB articles, tickets)? If so, we will inject the Artifact Lifecycle State Machine (Draft → Published → Needs Update) and a Scheduled Maintenance Cadence.
Q3. Multi-Dimensional Tone Configuration
Does this skill draft external communications? If so, we will inject the Tone Configuration matrix (Situation Type × Audience Segment = Tone Label).
Q4. Escalation & Quality Gates
Does this skill require an Escalation Trigger Taxonomy (Stop, Alert, Explain, Recommend) or a Business Impact Quantification Protocol before proceeding?
Q5. Workflow Navigation (Chained Commands)
What commands logically follow this output? We will inject an "Offer Next Steps" block to chain this node to other skills.
采用引导式梳理访谈的方式。首先获取标准元数据(Skill名称、描述)。
然后逐步询问用户需要注入哪些L4状态/生命周期模板:
问题1:认知信任(分级权限)
Agent是否需要基于证据层级的分级源权限模型,在输出内容中附上置信度评分(高/中/低)?
问题2:工件生命周期管理
该Skill是否需要创建或维护持久化输出(例如知识库文章、工单)?如果是,我们将注入工件生命周期状态机(草稿 → 已发布 → 需要更新)和定期维护节奏机制。
问题3:多维度语气配置
该Skill是否需要起草对外沟通内容?如果是,我们将注入语气配置矩阵(场景类型 × 受众群体 = 语气标签)。
问题4:升级与质量关卡
该Skill在执行前是否需要升级触发分类体系(停止、告警、解释、建议)或业务影响量化协议?
问题5:工作流导航(链式命令)
该Skill的输出之后逻辑上需要执行哪些命令?我们将注入“提供后续步骤”模块,将当前节点与其他Skill串联。
Phase 1.5: Recap & Confirm
1.5阶段:复盘确认
Do NOT immediately scaffold after the interview.
You must pause and explicitly list out:
- The decided Skill Name and Description
- Which of the 5 L4 State/Lifecycle templates you plan to inject Ask the user: "Does this look right? (yes / adjust)"
访谈结束后请勿立即生成脚手架。
你必须暂停并明确列出以下内容:
- 确定的Skill名称与描述
- 你计划注入的5个L4状态/生命周期模板中的哪些 询问用户:“以上信息是否正确?(是 / 需要调整)”
2. Scaffold the Infrastructure (Preventing Context Bloat)
2. 生成基础架构(避免上下文冗余)
Execute the deterministic script to generate the physical directories:
scaffold.pybash
python3 ~~agent-scaffolders-root/scripts/scaffold.py --type skill --name <requested-name> --path <destination-directory> --desc "<short-description>"执行确定性的脚本生成物理目录:
scaffold.pybash
python3 ~~agent-scaffolders-root/scripts/scaffold.py --type skill --name <requested-name> --path <destination-directory> --desc "<short-description>"3. Generate Lean Pattern References (Lazy-Loading)
3. 生成精简模式参考(懒加载)
CRITICAL: Do NOT bloat the generated skill with massive definitions of these patterns.
Instead of writing out the entire theory of Escalation Taxonomies or Lifecycle State Machines in every new skill, you must practice Progressive Disclosure:
- For each selected L4 pattern in Step 1, create a LEAN file in (e.g.,
references/). Load its specific definition file from the catalogreferences/tone-matrix.md(see CONNECTORS.md) to learn how to scaffold it.~~l4-pattern-catalog - This file should ONLY contain the domain-specific tables (the actual matrix values for this specific skill).
- Do not explain how the pattern works; the central already defines the mechanics. Just provide the blank or filled templates for this specific workflow.
pattern-catalog.md
关键提示:请勿在生成的Skill中塞入大量模式定义,造成冗余。
不要在每个新Skill中完整编写升级分类体系或生命周期状态机的全部理论,你必须践行渐进式披露原则:
- 针对步骤1中选中的每个L4模式,在目录下创建一个精简文件(例如
references/)。从目录references/tone-matrix.md中加载对应的定义文件(参考CONNECTORS.md)学习如何生成对应脚手架。~~l4-pattern-catalog - 该文件应仅包含特定领域的表格(即该Skill专属的实际矩阵值)。
- 不要解释模式的工作原理;集中存放的已经定义了运行机制,仅提供适用于当前工作流的空白或已填充模板即可。
pattern-catalog.md
4. Finalize the SKILL.md
(Pointers Only)
SKILL.md4. 完成SKILL.md
编写(仅保留指引链接)
SKILL.mdWrite the final . Ensure it:
SKILL.md- Keeps the primary instructions concise (<300 lines).
- Uses Markdown links (e.g., ) so the LLM only loads the context when needed.
[See Escalation Rules](references/escalation-taxonomy.md) - Includes the Chained Commands (Offer Next Steps) block at the bottom.
- Includes the mandatory Source Transparency Declaration.
编写最终的文件,确保满足以下要求:
SKILL.md- 核心说明保持简洁(少于300行)。
- 使用Markdown链接(例如),这样LLM仅在需要时加载对应上下文。
[查看升级规则](references/escalation-taxonomy.md) - 在底部包含**链式命令(提供后续步骤)**模块。
- 包含强制要求的来源透明度声明。
Next Actions
后续操作
- Offer to run to validate the generated artifacts.
audit-plugin
- 可提议运行来验证生成的工件。
audit-plugin