用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/jmagly/aiwg --skill add-template命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| namespace | aiwg |
| name | add-template |
| platforms | ["all"] |
| description | Scaffold a new document template inside an existing addon or framework |
Scaffold a new document template inside an existing addon or framework.
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
use-case, prompt for target and category| Pattern | Example | Action |
|---|---|---|
| Named add | "add template adr --to sdlc-complete" | Scaffold directly |
| Category specified | "add template threat-model --to sdlc-complete --category security" | Place in category subdir |
| Interactive | "add template --interactive --to sdlc-complete" | Guided design mode |
| Target omitted | "add template risk-register" | Ask which addon or framework |
Extract from $ARGUMENTS:
<name> — kebab-case template name (required)--to <target> — addon or framework directory name (required)--category <category> — subdirectory within templates/ (optional; e.g., requirements, architecture, security)--interactive — enable guided design questionsIf either <name> or --to is missing, ask before proceeding.
Confirm the target exists:
# Check addons
ls agentic/code/addons/<target>/templates/
# Check frameworks
ls agentic/code/frameworks/<target>/templates/
If --category is not provided and the target has existing category subdirectories, list them and ask. Common categories in sdlc-complete:
| Category | Contents |
|---|---|
requirements | Use cases, user stories, NFRs |
architecture | SAD, ADRs, C4 diagrams |
security | Threat models, security gates |
testing | Test plans, test cases, test reports |
deployment | Deployment plans, runbooks |
planning | Phase plans, iteration plans, risk registers |
analysis-design | Domain models, sequence diagrams |
If no category is appropriate, place directly in templates/.
Ask before generating:
{{placeholder}} variables should be pre-populated by tooling?aiwg add-template <name> --to <target> [--category <category>]
Templates use Markdown with YAML frontmatter and {{variable}} placeholders:
---
template: <name>
version: 1.0.0
category: <category>
description: <one-sentence purpose>
variables:
- project_name
- author
- date
---
# <Template Title>
**Project**: {{project_name}}
**Author**: {{author}}
**Date**: {{date}}
**Version**: 1.0
---
## Purpose
[What this document is for and when to create it]
## Section 1: <Required Section>
[Instructions for completing this section]
> **Guidance**: [What a good answer looks like]
## Section 2: <Required Section>
[Instructions]
## Section 3: <Optional Section> *(if applicable)*
[Instructions]
---
## Review Checklist
Before finalizing this document:
- [ ] All required sections completed
- [ ] Variables replaced with actual values
- [ ] Reviewed by [role]
- [ ] Approved by [role]
The CLI tool updates the templates manifest. Verify:
{
"templates": {
"<category>": ["existing-template", "<name>"]
}
}
<target>/templates/<category>/<name>-template.md
Or at root if no category:
<target>/templates/<name>-template.md
Manifest updated: <target>/manifest.json (or templates/manifest.json if present)
Template Created: <name>
────────────────────────
Location: <target>/templates/<category>/<name>-template.md
Category: <category>
Created:
✓ <name>-template.md
Manifest updated: <target>/manifest.json
Next Steps:
1. Define required sections and guidance text
2. Add {{variable}} placeholders for automation
3. Include review checklist
4. Test: aiwg template-engine apply <name> --to .aiwg/<category>/
User: "add template adr --to sdlc-complete --category architecture"
Action:
aiwg add-template adr --to sdlc-complete --category architecture
Result: agentic/code/frameworks/sdlc-complete/templates/architecture/adr-template.md scaffolded with standard ADR sections (Context, Decision, Consequences, Alternatives).
User: "create a threat model template for sdlc-complete"
Extraction: name=threat-model, target=sdlc-complete, category=security
Action:
aiwg add-template threat-model --to sdlc-complete --category security
User: "add template --interactive --to sdlc-complete"
Process: Guided questions establish the artifact type, required sections, variables, and whether examples should be embedded.