agent-configs 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +223 -0
  2. package/agents/architect.md +211 -0
  3. package/agents/code-reviewer.md +104 -0
  4. package/agents/planner.md +119 -0
  5. package/agents/refactor-cleaner.md +306 -0
  6. package/agents/security-reviewer.md +545 -0
  7. package/agents/tdd-guide.md +280 -0
  8. package/bundles/bk-chat-bundle/README.md +48 -0
  9. package/bundles/bk-chat-bundle/manifest.json +10 -0
  10. package/bundles/continuous-learning/.claude/commands/evolve.md +190 -0
  11. package/bundles/continuous-learning/.claude/commands/instinct-status.md +64 -0
  12. package/bundles/continuous-learning/.claude/commands/learn.md +83 -0
  13. package/bundles/continuous-learning/.claude/hooks/learning-end.js +85 -0
  14. package/bundles/continuous-learning/.claude/hooks/observe.js +131 -0
  15. package/bundles/continuous-learning/.claude/lib/learning.js +559 -0
  16. package/bundles/continuous-learning/.claude/lib/utils.js +312 -0
  17. package/bundles/continuous-learning/.claude/skills/continuous-learning/SKILL.md +200 -0
  18. package/bundles/continuous-learning/.cursor/hooks/learning-end.js +102 -0
  19. package/bundles/continuous-learning/.cursor/rules/continuous-learning.mdc +34 -0
  20. package/bundles/continuous-learning/.cursor/skills/continuous-learning/SKILL.md +77 -0
  21. package/bundles/continuous-learning/README.md +159 -0
  22. package/bundles/continuous-learning/manifest.json +51 -0
  23. package/bundles/planning-bundle/README.md +34 -0
  24. package/bundles/planning-bundle/manifest.json +10 -0
  25. package/bundles/review-bundle/README.md +43 -0
  26. package/bundles/review-bundle/manifest.json +11 -0
  27. package/bundles/shared-memory/.claude/commands/list-sessions.md +124 -0
  28. package/bundles/shared-memory/.claude/commands/load-session.md +169 -0
  29. package/bundles/shared-memory/.claude/commands/save-session.md +137 -0
  30. package/bundles/shared-memory/.claude/hooks/memory-compact.js +43 -0
  31. package/bundles/shared-memory/.claude/hooks/memory-end.js +42 -0
  32. package/bundles/shared-memory/.claude/hooks/memory-start.js +59 -0
  33. package/bundles/shared-memory/.claude/lib/memory.js +416 -0
  34. package/bundles/shared-memory/.claude/lib/utils.js +209 -0
  35. package/bundles/shared-memory/.claude/skills/shared-memory/SKILL.md +183 -0
  36. package/bundles/shared-memory/.cursor/hooks/memory-start.js +42 -0
  37. package/bundles/shared-memory/.cursor/rules/shared-memory.mdc +37 -0
  38. package/bundles/shared-memory/.cursor/skills/shared-memory/SKILL.md +183 -0
  39. package/bundles/tdd-bundle/README.md +33 -0
  40. package/bundles/tdd-bundle/manifest.json +10 -0
  41. package/cli.js +978 -0
  42. package/commands/build-fix.md +29 -0
  43. package/commands/code-review.md +40 -0
  44. package/commands/e2e.md +363 -0
  45. package/commands/learn.md +114 -0
  46. package/commands/plan.md +113 -0
  47. package/commands/refactor-clean.md +28 -0
  48. package/commands/tdd.md +326 -0
  49. package/commands/test-coverage.md +27 -0
  50. package/commands/update-codemaps.md +17 -0
  51. package/commands/update-docs.md +31 -0
  52. package/configs.json +158 -0
  53. package/hooks/hooks.json +101 -0
  54. package/package.json +58 -0
  55. package/rules/agents.md +49 -0
  56. package/rules/coding-style.md +70 -0
  57. package/rules/git-workflow.md +45 -0
  58. package/rules/hooks.md +46 -0
  59. package/rules/patterns.md +55 -0
  60. package/rules/performance.md +47 -0
  61. package/rules/security.md +36 -0
  62. package/rules/testing.md +30 -0
  63. package/skills/ai-config-architect/SKILL.md +59 -0
  64. package/skills/ai-config-architect/references/agents.md +77 -0
  65. package/skills/ai-config-architect/references/commands.md +66 -0
  66. package/skills/ai-config-architect/references/hooks.md +70 -0
  67. package/skills/ai-config-architect/references/patterns.md +66 -0
  68. package/skills/ai-config-architect/references/platforms.md +82 -0
  69. package/skills/ai-config-architect/references/rules.md +66 -0
  70. package/skills/ai-config-architect/references/skills.md +67 -0
  71. package/skills/bk-chat-helper/SKILL.md +398 -0
  72. package/skills/bk-chat-helper/references/api-reference.md +606 -0
  73. package/skills/bk-chat-helper/references/examples.md +789 -0
  74. package/skills/bk-chat-helper/references/integration-guide.md +583 -0
  75. package/skills/bk-chat-x/SKILL.md +400 -0
  76. package/skills/bk-chat-x/references/components-api.md +340 -0
  77. package/skills/bk-chat-x/references/examples.md +386 -0
  78. package/skills/bk-chat-x/references/shortcuts-guide.md +375 -0
  79. package/skills/coding-standards/SKILL.md +523 -0
  80. package/skills/security-review/SKILL.md +497 -0
  81. package/skills/security-review/references/cloud-infrastructure-security.md +361 -0
  82. package/skills/strategic-compact/SKILL.md +66 -0
  83. package/skills/strategic-compact/scripts/suggest-compact.sh +52 -0
  84. package/skills/tdd-workflow/SKILL.md +412 -0
  85. package/skills/verification-loop/SKILL.md +128 -0
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "agent-configs",
3
+ "version": "1.0.0",
4
+ "description": "CLI tool to install curated Claude Code and Cursor configurations",
5
+ "main": "cli.js",
6
+ "bin": {
7
+ "agent-configs": "cli.js"
8
+ },
9
+ "engines": {
10
+ "node": ">=14.14.0"
11
+ },
12
+ "files": [
13
+ "cli.js",
14
+ "configs.json",
15
+ "README.md",
16
+ "commands/",
17
+ "skills/",
18
+ "rules/",
19
+ "agents/",
20
+ "hooks/",
21
+ "bundles/"
22
+ ],
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/forrany/Agent-configs.git"
26
+ },
27
+ "keywords": [
28
+ "claude-code",
29
+ "cursor",
30
+ "ai-agent",
31
+ "skills",
32
+ "commands",
33
+ "rules",
34
+ "hooks",
35
+ "shared-memory",
36
+ "tdd",
37
+ "code-review",
38
+ "cli"
39
+ ],
40
+ "author": "",
41
+ "license": "MIT",
42
+ "publishConfig": {
43
+ "registry": "https://registry.npmjs.org/",
44
+ "access": "public"
45
+ },
46
+ "scripts": {
47
+ "prepublishOnly": "node cli.js --help",
48
+ "publish:npm": "npm publish --registry https://registry.npmjs.org/"
49
+ },
50
+ "bugs": {
51
+ "url": "https://github.com/forrany/Agent-configs/issues"
52
+ },
53
+ "homepage": "https://github.com/forrany/Agent-configs#readme",
54
+ "packageManager": "pnpm@10.12.1+sha512.f0dda8580f0ee9481c5c79a1d927b9164f2c478e90992ad268bbb2465a736984391d6333d2c327913578b2804af33474ca554ba29c04a8b13060a717675ae3ac",
55
+ "dependencies": {
56
+ "@inquirer/prompts": "^8.2.0"
57
+ }
58
+ }
@@ -0,0 +1,49 @@
1
+ # Agent Orchestration
2
+
3
+ ## Available Agents
4
+
5
+ Located in `~/.claude/agents/`:
6
+
7
+ | Agent | Purpose | When to Use |
8
+ |-------|---------|-------------|
9
+ | planner | Implementation planning | Complex features, refactoring |
10
+ | architect | System design | Architectural decisions |
11
+ | tdd-guide | Test-driven development | New features, bug fixes |
12
+ | code-reviewer | Code review | After writing code |
13
+ | security-reviewer | Security analysis | Before commits |
14
+ | build-error-resolver | Fix build errors | When build fails |
15
+ | e2e-runner | E2E testing | Critical user flows |
16
+ | refactor-cleaner | Dead code cleanup | Code maintenance |
17
+ | doc-updater | Documentation | Updating docs |
18
+
19
+ ## Immediate Agent Usage
20
+
21
+ No user prompt needed:
22
+ 1. Complex feature requests - Use **planner** agent
23
+ 2. Code just written/modified - Use **code-reviewer** agent
24
+ 3. Bug fix or new feature - Use **tdd-guide** agent
25
+ 4. Architectural decision - Use **architect** agent
26
+
27
+ ## Parallel Task Execution
28
+
29
+ ALWAYS use parallel Task execution for independent operations:
30
+
31
+ ```markdown
32
+ # GOOD: Parallel execution
33
+ Launch 3 agents in parallel:
34
+ 1. Agent 1: Security analysis of auth.ts
35
+ 2. Agent 2: Performance review of cache system
36
+ 3. Agent 3: Type checking of utils.ts
37
+
38
+ # BAD: Sequential when unnecessary
39
+ First agent 1, then agent 2, then agent 3
40
+ ```
41
+
42
+ ## Multi-Perspective Analysis
43
+
44
+ For complex problems, use split role sub-agents:
45
+ - Factual reviewer
46
+ - Senior engineer
47
+ - Security expert
48
+ - Consistency reviewer
49
+ - Redundancy checker
@@ -0,0 +1,70 @@
1
+ # Coding Style
2
+
3
+ ## Immutability (CRITICAL)
4
+
5
+ ALWAYS create new objects, NEVER mutate:
6
+
7
+ ```javascript
8
+ // WRONG: Mutation
9
+ function updateUser(user, name) {
10
+ user.name = name // MUTATION!
11
+ return user
12
+ }
13
+
14
+ // CORRECT: Immutability
15
+ function updateUser(user, name) {
16
+ return {
17
+ ...user,
18
+ name
19
+ }
20
+ }
21
+ ```
22
+
23
+ ## File Organization
24
+
25
+ MANY SMALL FILES > FEW LARGE FILES:
26
+ - High cohesion, low coupling
27
+ - 200-400 lines typical, 800 max
28
+ - Extract utilities from large components
29
+ - Organize by feature/domain, not by type
30
+
31
+ ## Error Handling
32
+
33
+ ALWAYS handle errors comprehensively:
34
+
35
+ ```typescript
36
+ try {
37
+ const result = await riskyOperation()
38
+ return result
39
+ } catch (error) {
40
+ console.error('Operation failed:', error)
41
+ throw new Error('Detailed user-friendly message')
42
+ }
43
+ ```
44
+
45
+ ## Input Validation
46
+
47
+ ALWAYS validate user input:
48
+
49
+ ```typescript
50
+ import { z } from 'zod'
51
+
52
+ const schema = z.object({
53
+ email: z.string().email(),
54
+ age: z.number().int().min(0).max(150)
55
+ })
56
+
57
+ const validated = schema.parse(input)
58
+ ```
59
+
60
+ ## Code Quality Checklist
61
+
62
+ Before marking work complete:
63
+ - [ ] Code is readable and well-named
64
+ - [ ] Functions are small (<50 lines)
65
+ - [ ] Files are focused (<800 lines)
66
+ - [ ] No deep nesting (>4 levels)
67
+ - [ ] Proper error handling
68
+ - [ ] No console.log statements
69
+ - [ ] No hardcoded values
70
+ - [ ] No mutation (immutable patterns used)
@@ -0,0 +1,45 @@
1
+ # Git Workflow
2
+
3
+ ## Commit Message Format
4
+
5
+ ```
6
+ <type>: <description>
7
+
8
+ <optional body>
9
+ ```
10
+
11
+ Types: feat, fix, refactor, docs, test, chore, perf, ci
12
+
13
+ Note: Attribution disabled globally via ~/.claude/settings.json.
14
+
15
+ ## Pull Request Workflow
16
+
17
+ When creating PRs:
18
+ 1. Analyze full commit history (not just latest commit)
19
+ 2. Use `git diff [base-branch]...HEAD` to see all changes
20
+ 3. Draft comprehensive PR summary
21
+ 4. Include test plan with TODOs
22
+ 5. Push with `-u` flag if new branch
23
+
24
+ ## Feature Implementation Workflow
25
+
26
+ 1. **Plan First**
27
+ - Use **planner** agent to create implementation plan
28
+ - Identify dependencies and risks
29
+ - Break down into phases
30
+
31
+ 2. **TDD Approach**
32
+ - Use **tdd-guide** agent
33
+ - Write tests first (RED)
34
+ - Implement to pass tests (GREEN)
35
+ - Refactor (IMPROVE)
36
+ - Verify 80%+ coverage
37
+
38
+ 3. **Code Review**
39
+ - Use **code-reviewer** agent immediately after writing code
40
+ - Address CRITICAL and HIGH issues
41
+ - Fix MEDIUM issues when possible
42
+
43
+ 4. **Commit & Push**
44
+ - Detailed commit messages
45
+ - Follow conventional commits format
package/rules/hooks.md ADDED
@@ -0,0 +1,46 @@
1
+ # Hooks System
2
+
3
+ ## Hook Types
4
+
5
+ - **PreToolUse**: Before tool execution (validation, parameter modification)
6
+ - **PostToolUse**: After tool execution (auto-format, checks)
7
+ - **Stop**: When session ends (final verification)
8
+
9
+ ## Current Hooks (in ~/.claude/settings.json)
10
+
11
+ ### PreToolUse
12
+ - **tmux reminder**: Suggests tmux for long-running commands (npm, pnpm, yarn, cargo, etc.)
13
+ - **git push review**: Opens Zed for review before push
14
+ - **doc blocker**: Blocks creation of unnecessary .md/.txt files
15
+
16
+ ### PostToolUse
17
+ - **PR creation**: Logs PR URL and GitHub Actions status
18
+ - **Prettier**: Auto-formats JS/TS files after edit
19
+ - **TypeScript check**: Runs tsc after editing .ts/.tsx files
20
+ - **console.log warning**: Warns about console.log in edited files
21
+
22
+ ### Stop
23
+ - **console.log audit**: Checks all modified files for console.log before session ends
24
+
25
+ ## Auto-Accept Permissions
26
+
27
+ Use with caution:
28
+ - Enable for trusted, well-defined plans
29
+ - Disable for exploratory work
30
+ - Never use dangerously-skip-permissions flag
31
+ - Configure `allowedTools` in `~/.claude.json` instead
32
+
33
+ ## TodoWrite Best Practices
34
+
35
+ Use TodoWrite tool to:
36
+ - Track progress on multi-step tasks
37
+ - Verify understanding of instructions
38
+ - Enable real-time steering
39
+ - Show granular implementation steps
40
+
41
+ Todo list reveals:
42
+ - Out of order steps
43
+ - Missing items
44
+ - Extra unnecessary items
45
+ - Wrong granularity
46
+ - Misinterpreted requirements
@@ -0,0 +1,55 @@
1
+ # Common Patterns
2
+
3
+ ## API Response Format
4
+
5
+ ```typescript
6
+ interface ApiResponse<T> {
7
+ success: boolean
8
+ data?: T
9
+ error?: string
10
+ meta?: {
11
+ total: number
12
+ page: number
13
+ limit: number
14
+ }
15
+ }
16
+ ```
17
+
18
+ ## Custom Hooks Pattern
19
+
20
+ ```typescript
21
+ export function useDebounce<T>(value: T, delay: number): T {
22
+ const [debouncedValue, setDebouncedValue] = useState<T>(value)
23
+
24
+ useEffect(() => {
25
+ const handler = setTimeout(() => setDebouncedValue(value), delay)
26
+ return () => clearTimeout(handler)
27
+ }, [value, delay])
28
+
29
+ return debouncedValue
30
+ }
31
+ ```
32
+
33
+ ## Repository Pattern
34
+
35
+ ```typescript
36
+ interface Repository<T> {
37
+ findAll(filters?: Filters): Promise<T[]>
38
+ findById(id: string): Promise<T | null>
39
+ create(data: CreateDto): Promise<T>
40
+ update(id: string, data: UpdateDto): Promise<T>
41
+ delete(id: string): Promise<void>
42
+ }
43
+ ```
44
+
45
+ ## Skeleton Projects
46
+
47
+ When implementing new functionality:
48
+ 1. Search for battle-tested skeleton projects
49
+ 2. Use parallel agents to evaluate options:
50
+ - Security assessment
51
+ - Extensibility analysis
52
+ - Relevance scoring
53
+ - Implementation planning
54
+ 3. Clone best match as foundation
55
+ 4. Iterate within proven structure
@@ -0,0 +1,47 @@
1
+ # Performance Optimization
2
+
3
+ ## Model Selection Strategy
4
+
5
+ **Haiku 4.5** (90% of Sonnet capability, 3x cost savings):
6
+ - Lightweight agents with frequent invocation
7
+ - Pair programming and code generation
8
+ - Worker agents in multi-agent systems
9
+
10
+ **Sonnet 4.5** (Best coding model):
11
+ - Main development work
12
+ - Orchestrating multi-agent workflows
13
+ - Complex coding tasks
14
+
15
+ **Opus 4.5** (Deepest reasoning):
16
+ - Complex architectural decisions
17
+ - Maximum reasoning requirements
18
+ - Research and analysis tasks
19
+
20
+ ## Context Window Management
21
+
22
+ Avoid last 20% of context window for:
23
+ - Large-scale refactoring
24
+ - Feature implementation spanning multiple files
25
+ - Debugging complex interactions
26
+
27
+ Lower context sensitivity tasks:
28
+ - Single-file edits
29
+ - Independent utility creation
30
+ - Documentation updates
31
+ - Simple bug fixes
32
+
33
+ ## Ultrathink + Plan Mode
34
+
35
+ For complex tasks requiring deep reasoning:
36
+ 1. Use `ultrathink` for enhanced thinking
37
+ 2. Enable **Plan Mode** for structured approach
38
+ 3. "Rev the engine" with multiple critique rounds
39
+ 4. Use split role sub-agents for diverse analysis
40
+
41
+ ## Build Troubleshooting
42
+
43
+ If build fails:
44
+ 1. Use **build-error-resolver** agent
45
+ 2. Analyze error messages
46
+ 3. Fix incrementally
47
+ 4. Verify after each fix
@@ -0,0 +1,36 @@
1
+ # Security Guidelines
2
+
3
+ ## Mandatory Security Checks
4
+
5
+ Before ANY commit:
6
+ - [ ] No hardcoded secrets (API keys, passwords, tokens)
7
+ - [ ] All user inputs validated
8
+ - [ ] SQL injection prevention (parameterized queries)
9
+ - [ ] XSS prevention (sanitized HTML)
10
+ - [ ] CSRF protection enabled
11
+ - [ ] Authentication/authorization verified
12
+ - [ ] Rate limiting on all endpoints
13
+ - [ ] Error messages don't leak sensitive data
14
+
15
+ ## Secret Management
16
+
17
+ ```typescript
18
+ // NEVER: Hardcoded secrets
19
+ const apiKey = "sk-proj-xxxxx"
20
+
21
+ // ALWAYS: Environment variables
22
+ const apiKey = process.env.OPENAI_API_KEY
23
+
24
+ if (!apiKey) {
25
+ throw new Error('OPENAI_API_KEY not configured')
26
+ }
27
+ ```
28
+
29
+ ## Security Response Protocol
30
+
31
+ If security issue found:
32
+ 1. STOP immediately
33
+ 2. Use **security-reviewer** agent
34
+ 3. Fix CRITICAL issues before continuing
35
+ 4. Rotate any exposed secrets
36
+ 5. Review entire codebase for similar issues
@@ -0,0 +1,30 @@
1
+ # Testing Requirements
2
+
3
+ ## Minimum Test Coverage: 80%
4
+
5
+ Test Types (ALL required):
6
+ 1. **Unit Tests** - Individual functions, utilities, components
7
+ 2. **Integration Tests** - API endpoints, database operations
8
+ 3. **E2E Tests** - Critical user flows (Playwright)
9
+
10
+ ## Test-Driven Development
11
+
12
+ MANDATORY workflow:
13
+ 1. Write test first (RED)
14
+ 2. Run test - it should FAIL
15
+ 3. Write minimal implementation (GREEN)
16
+ 4. Run test - it should PASS
17
+ 5. Refactor (IMPROVE)
18
+ 6. Verify coverage (80%+)
19
+
20
+ ## Troubleshooting Test Failures
21
+
22
+ 1. Use **tdd-guide** agent
23
+ 2. Check test isolation
24
+ 3. Verify mocks are correct
25
+ 4. Fix implementation, not tests (unless tests are wrong)
26
+
27
+ ## Agent Support
28
+
29
+ - **tdd-guide** - Use PROACTIVELY for new features, enforces write-tests-first
30
+ - **e2e-runner** - Playwright E2E testing specialist
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: ai-config-architect
3
+ description: AI 编程工具配置架构师。支持 Claude Code 和 Cursor 双平台,生成 rules、skills、commands、hooks、agents 配置。触发场景:(1) 总结项目经验为规则 (2) 创建工作流技能 (3) 设计自动化 hooks (4) 配置子代理 (5) 决策配置类型。使用前会询问目标平台和作用域。
4
+ metadata:
5
+ author: everything-claude-code
6
+ version: "1.0"
7
+ ---
8
+
9
+ # AI Config Architect
10
+
11
+ 支持 Claude Code / Cursor 双平台的配置生成器。
12
+
13
+ ## 使用流程
14
+
15
+ 生成配置前,先确认:
16
+
17
+ 1. **目标平台**: Claude Code 或 Cursor
18
+ 2. **作用域**: 全局 (global) 或 项目 (project)
19
+
20
+ ## 平台路径映射
21
+
22
+ | 类型 | Claude Global | Claude Project | Cursor Global | Cursor Project |
23
+ |------|---------------|----------------|---------------|----------------|
24
+ | Commands | `~/.claude/commands/` | `.claude/commands/` | `~/.cursor/commands/` | `.cursor/commands/` |
25
+ | Skills | `~/.claude/skills/` | `.claude/skills/` | `~/.cursor/skills/` | `.cursor/skills/` |
26
+ | Agents | `~/.claude/agents/` | `.claude/agents/` | `~/.cursor/agents/` | `.cursor/agents/` |
27
+ | Rules | `~/.claude/rules/` | `CLAUDE.md` | - | `.cursor/rules/` |
28
+ | Hooks | `~/.claude/settings.json` | `.claude/settings.json` | `~/.cursor/hooks.json` | `.cursor/hooks.json` |
29
+
30
+ ## 配置类型决策
31
+
32
+ ```
33
+ 需求 → 类型
34
+ ├── 始终遵守的约束 → Rules
35
+ ├── 触发式工作流 → Skills
36
+ ├── 快捷命令入口 → Commands
37
+ ├── 事件自动响应 → Hooks
38
+ └── 专家代理范围 → Agents
39
+ ```
40
+
41
+ ## 平台差异
42
+
43
+ | 特性 | Claude Code | Cursor |
44
+ |------|-------------|--------|
45
+ | Rules 位置 | `CLAUDE.md` 或 `.claude/rules/` | `.cursor/rules/` (仅项目级) |
46
+ | Hooks 格式 | 合并到 `settings.json` | 独立 `hooks.json` |
47
+ | 全局 Rules | 支持 | 不支持 |
48
+
49
+ ## 详细指南
50
+
51
+ 按需查阅:
52
+
53
+ - [平台配置详解](references/platforms.md) - Claude vs Cursor 差异
54
+ - [Rules 模板](references/rules.md)
55
+ - [Skills 模板](references/skills.md)
56
+ - [Commands 模板](references/commands.md)
57
+ - [Hooks 模板](references/hooks.md)
58
+ - [Agents 模板](references/agents.md)
59
+ - [组合方案](references/patterns.md)
@@ -0,0 +1,77 @@
1
+ # Agents 模板
2
+
3
+ ## 用途
4
+
5
+ 具有特定范围和工具权限的专家代理。
6
+
7
+ ## 平台路径
8
+
9
+ | 平台 | 全局 | 项目 |
10
+ |------|------|------|
11
+ | Claude | `~/.claude/agents/` | `.claude/agents/` |
12
+ | Cursor | `~/.cursor/agents/` | `.cursor/agents/` |
13
+
14
+ ## 模板
15
+
16
+ ```markdown
17
+ ---
18
+ name: [agent-name]
19
+ description: [专业领域和触发场景]
20
+ tools: ["Read", "Grep", "Glob", "Bash"]
21
+ model: opus|sonnet|haiku
22
+ ---
23
+
24
+ You are a [角色描述].
25
+
26
+ When invoked:
27
+ 1. [操作 1]
28
+ 2. [操作 2]
29
+
30
+ ## [检查类别] (CRITICAL)
31
+ - 检查项
32
+
33
+ ## Output Format
34
+ [格式说明]
35
+
36
+ ## Approval Criteria
37
+ - ✅ Approve: [条件]
38
+ - ❌ Block: [条件]
39
+ ```
40
+
41
+ ## 示例
42
+
43
+ ```markdown
44
+ ---
45
+ name: code-reviewer
46
+ description: Code review specialist
47
+ tools: ["Read", "Grep", "Glob", "Bash"]
48
+ model: opus
49
+ ---
50
+
51
+ You are a senior code reviewer.
52
+
53
+ When invoked:
54
+ 1. Run git diff
55
+ 2. Review modified files
56
+
57
+ ## Security (CRITICAL)
58
+ - Hardcoded credentials
59
+ - SQL injection
60
+
61
+ ## Output Format
62
+ \`\`\`
63
+ [CRITICAL] Issue
64
+ File: path:42
65
+ Fix: How to fix
66
+ \`\`\`
67
+ ```
68
+
69
+ ## 模型选择
70
+
71
+ | 任务 | 模型 |
72
+ |------|------|
73
+ | 探索/搜索 | Haiku |
74
+ | 简单编辑 | Haiku |
75
+ | 多文件实现 | Sonnet |
76
+ | 复杂架构 | Opus |
77
+ | 安全分析 | Opus |
@@ -0,0 +1,66 @@
1
+ # Commands 模板
2
+
3
+ ## 用途
4
+
5
+ 通过 `/command` 快速触发的工作流入口。
6
+
7
+ ## 平台路径
8
+
9
+ | 平台 | 全局 | 项目 |
10
+ |------|------|------|
11
+ | Claude | `~/.claude/commands/` | `.claude/commands/` |
12
+ | Cursor | `~/.cursor/commands/` | `.cursor/commands/` |
13
+
14
+ ## 模板
15
+
16
+ ```markdown
17
+ ---
18
+ description: [简短描述]
19
+ ---
20
+
21
+ # [Command Name]
22
+
23
+ ## What This Command Does
24
+
25
+ 1. **Step 1** - [描述]
26
+ 2. **Step 2** - [描述]
27
+
28
+ ## When to Use
29
+
30
+ Use `/[command]` when:
31
+ - 场景 1
32
+ - 场景 2
33
+
34
+ ## Related
35
+
36
+ - Agent: `agents/[name].md`
37
+ - Skill: `skills/[name]/`
38
+ ```
39
+
40
+ ## 示例
41
+
42
+ ```markdown
43
+ ---
44
+ description: TDD 工作流,测试先行
45
+ ---
46
+
47
+ # TDD Command
48
+
49
+ ## What This Command Does
50
+
51
+ 1. **RED** - 写失败测试
52
+ 2. **GREEN** - 最小实现
53
+ 3. **REFACTOR** - 保持绿灯重构
54
+
55
+ ## Related
56
+
57
+ Invokes `tdd-guide` agent
58
+ ```
59
+
60
+ ## Command vs Skill
61
+
62
+ | Command | Skill |
63
+ |---------|-------|
64
+ | 快捷入口 | 完整知识 |
65
+ | 简短 | 详细模式 |
66
+ | 调用 agent | 被引用 |