aiblueprint-cli 1.4.59 → 1.4.61
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.
- package/README.md +16 -36
- package/agents-config/agents/action.md +1 -1
- package/agents-config/agents/explore-codebase.md +53 -53
- package/agents-config/agents/explore-docs.md +50 -69
- package/agents-config/agents/websearch.md +36 -40
- package/agents-config/claude-config/scripts/.claude/skills/fix-on-my-computer/SKILL.md +81 -0
- package/agents-config/claude-config/scripts/CLAUDE.md +10 -4
- package/agents-config/claude-config/scripts/bun.lockb +0 -0
- package/agents-config/claude-config/scripts/package.json +22 -30
- package/agents-config/claude-config/scripts/statusline/CLAUDE.md +37 -155
- package/agents-config/claude-config/scripts/statusline/README.md +18 -94
- package/agents-config/claude-config/scripts/statusline/defaults.json +13 -10
- package/agents-config/claude-config/scripts/statusline/fixtures/mock-transcript.jsonl +4 -4
- package/agents-config/claude-config/scripts/statusline/fixtures/test-input.json +4 -4
- package/agents-config/claude-config/scripts/statusline/src/commands/interactive-config.ts +403 -0
- package/agents-config/claude-config/scripts/statusline/src/index.ts +33 -82
- package/agents-config/claude-config/scripts/statusline/src/lib/config-types.ts +7 -1
- package/agents-config/claude-config/scripts/statusline/src/lib/formatters.ts +40 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/presets.ts +13 -13
- package/agents-config/claude-config/scripts/statusline/src/lib/render-pure.ts +24 -5
- package/agents-config/claude-config/scripts/statusline/statusline.config.free.json +79 -0
- package/agents-config/claude-config/scripts/statusline/statusline.config.json +77 -77
- package/agents-config/codex-config/config.toml +9 -0
- package/agents-config/codex-config/hooks/command-deny-list.ts +203 -0
- package/agents-config/commands/prompts/create-vitejs-app.md +272 -0
- package/agents-config/commands/prompts/nextjs-add-prisma-db.md +136 -0
- package/agents-config/commands/prompts/nextjs-setup-better-auth.md +173 -0
- package/agents-config/commands/prompts/nextjs-setup-project.md +200 -0
- package/agents-config/commands/prompts/prompt.md +55 -0
- package/agents-config/commands/prompts/saas-challenge-idea.md +135 -0
- package/agents-config/commands/prompts/saas-create-architecture.md +242 -0
- package/agents-config/commands/prompts/saas-create-headline.md +132 -0
- package/agents-config/commands/prompts/saas-create-landing-copywritting.md +267 -0
- package/agents-config/commands/prompts/saas-create-legals-docs.md +176 -0
- package/agents-config/commands/prompts/saas-create-logos.md +240 -0
- package/agents-config/commands/prompts/saas-create-prd.md +195 -0
- package/agents-config/commands/prompts/saas-create-tasks.md +240 -0
- package/agents-config/commands/prompts/saas-define-pricing.md +293 -0
- package/agents-config/commands/prompts/saas-find-domain-name.md +190 -0
- package/agents-config/commands/prompts/saas-implement-landing-page.md +257 -0
- package/agents-config/commands/prompts/setup-tmux.md +160 -0
- package/agents-config/commands/prompts/tools.md +148 -0
- package/agents-config/scripts/.claude/skills/fix-on-my-computer/SKILL.md +81 -0
- package/agents-config/scripts/CLAUDE.md +37 -0
- package/agents-config/scripts/biome.json +37 -0
- package/agents-config/scripts/bun.lockb +0 -0
- package/agents-config/scripts/package.json +24 -0
- package/agents-config/scripts/statusline/CLAUDE.md +87 -0
- package/agents-config/scripts/statusline/README.md +117 -0
- package/agents-config/scripts/statusline/__tests__/context.test.ts +229 -0
- package/agents-config/scripts/statusline/__tests__/formatters.test.ts +108 -0
- package/agents-config/scripts/statusline/__tests__/statusline.test.ts +309 -0
- package/agents-config/scripts/statusline/defaults.json +82 -0
- package/agents-config/scripts/statusline/fixtures/mock-transcript.jsonl +4 -0
- package/agents-config/scripts/statusline/fixtures/test-input.json +35 -0
- package/agents-config/scripts/statusline/src/commands/interactive-config.ts +403 -0
- package/agents-config/scripts/statusline/src/index.ts +141 -0
- package/agents-config/scripts/statusline/src/lib/config-types.ts +110 -0
- package/agents-config/scripts/statusline/src/lib/config.ts +21 -0
- package/agents-config/scripts/statusline/src/lib/context.ts +103 -0
- package/agents-config/scripts/statusline/src/lib/formatters.ts +426 -0
- package/agents-config/scripts/statusline/src/lib/git.ts +100 -0
- package/agents-config/scripts/statusline/src/lib/menu-factories.ts +224 -0
- package/agents-config/scripts/statusline/src/lib/presets.ts +177 -0
- package/agents-config/scripts/statusline/src/lib/render-pure.ts +516 -0
- package/agents-config/scripts/statusline/src/lib/types.ts +36 -0
- package/agents-config/scripts/statusline/src/lib/utils.ts +15 -0
- package/agents-config/scripts/statusline/statusline.config.free.json +79 -0
- package/agents-config/scripts/statusline/statusline.config.json +79 -0
- package/agents-config/scripts/statusline/test-with-fixtures.ts +37 -0
- package/agents-config/scripts/statusline/test.ts +20 -0
- package/agents-config/scripts/statusline/tsconfig.json +27 -0
- package/agents-config/scripts/tsconfig.json +27 -0
- package/agents-config/skills/{subagent-creator → agents-managers}/SKILL.md +47 -47
- package/agents-config/skills/{subagent-creator/references/subagents.md → agents-managers/references/agents.md} +45 -45
- package/agents-config/skills/{subagent-creator → agents-managers}/references/context-management.md +20 -20
- package/agents-config/skills/{subagent-creator → agents-managers}/references/debugging-agents.md +27 -27
- package/agents-config/skills/{subagent-creator → agents-managers}/references/error-handling-and-recovery.md +19 -19
- package/agents-config/skills/{subagent-creator → agents-managers}/references/evaluation-and-testing.md +29 -29
- package/agents-config/skills/{subagent-creator → agents-managers}/references/orchestration-patterns.md +5 -5
- package/agents-config/skills/{subagent-creator/references/writing-subagent-prompts.md → agents-managers/references/writing-agent-prompts.md} +23 -23
- package/agents-config/skills/codex-environment/SKILL.md +2 -0
- package/agents-config/skills/commit/SKILL.md +2 -0
- package/agents-config/skills/create-pr/SKILL.md +2 -0
- package/agents-config/skills/environments-manager/SKILL.md +271 -0
- package/agents-config/skills/environments-manager/examples/claude/.worktreeinclude +3 -0
- package/agents-config/skills/environments-manager/examples/claude/commands/dev.md +5 -0
- package/agents-config/skills/environments-manager/examples/claude/commands/lint.md +5 -0
- package/agents-config/skills/environments-manager/examples/claude/commands/test.md +5 -0
- package/agents-config/skills/environments-manager/examples/claude/commands/typecheck.md +5 -0
- package/agents-config/skills/environments-manager/examples/claude/settings.json +24 -0
- package/agents-config/skills/environments-manager/examples/codex/environments/environment.toml +29 -0
- package/agents-config/skills/environments-manager/examples/cursor/worktrees.json +3 -0
- package/agents-config/skills/environments-manager/examples/scripts/claude-worktree-create.sh +96 -0
- package/agents-config/skills/environments-manager/examples/scripts/claude-worktree-remove.sh +66 -0
- package/agents-config/skills/environments-manager/examples/scripts/dev.sh +15 -0
- package/agents-config/skills/environments-manager/examples/scripts/worktree-down.sh +22 -0
- package/agents-config/skills/environments-manager/examples/scripts/worktree-up.sh +50 -0
- package/agents-config/skills/environments-manager/references/claude.md +156 -0
- package/agents-config/skills/environments-manager/references/codex.md +97 -0
- package/agents-config/skills/environments-manager/references/cursor.md +88 -0
- package/agents-config/skills/fix-pr-comments/SKILL.md +2 -0
- package/agents-config/skills/grill-me/SKILL.md +10 -0
- package/agents-config/skills/merge/SKILL.md +2 -0
- package/agents-config/skills/rules-manager/SKILL.md +191 -0
- package/agents-config/skills/rules-manager/references/agents-vs-claude.md +66 -0
- package/agents-config/skills/rules-manager/references/examples.md +117 -0
- package/agents-config/skills/skill-manager/SKILL.md +101 -0
- package/agents-config/skills/skill-manager/references/claude-code.md +81 -0
- package/agents-config/skills/skill-manager/references/codex.md +288 -0
- package/agents-config/skills/skill-manager/references/cursor.md +125 -0
- package/agents-config/skills/skill-manager/references/description-recommandation.md +97 -0
- package/agents-config/skills/skill-manager/scripts/inspect-description.ts +743 -0
- package/agents-config/skills/ultrathink/SKILL.md +2 -0
- package/dist/cli.js +581 -299
- package/package.json +1 -1
- package/agents-config/claude-config/scripts/statusline/data/.gitignore +0 -8
- package/agents-config/claude-config/scripts/statusline/data/.gitkeep +0 -0
- package/agents-config/claude-config/scripts/statusline/docs/ARCHITECTURE.md +0 -166
- package/agents-config/claude-config/scripts/statusline/src/tests/spend-v2.test.ts +0 -306
- package/agents-config/skills/apex/SKILL.md +0 -261
- package/agents-config/skills/apex/scripts/setup-templates.sh +0 -100
- package/agents-config/skills/apex/scripts/update-progress.sh +0 -80
- package/agents-config/skills/apex/steps/step-00-init.md +0 -267
- package/agents-config/skills/apex/steps/step-00b-branch.md +0 -126
- package/agents-config/skills/apex/steps/step-00b-economy.md +0 -244
- package/agents-config/skills/apex/steps/step-00b-interactive.md +0 -153
- package/agents-config/skills/apex/steps/step-01-analyze.md +0 -361
- package/agents-config/skills/apex/steps/step-02-plan.md +0 -264
- package/agents-config/skills/apex/steps/step-03-execute.md +0 -239
- package/agents-config/skills/apex/steps/step-04-validate.md +0 -251
- package/agents-config/skills/apex/templates/00-context.md +0 -43
- package/agents-config/skills/apex/templates/01-analyze.md +0 -10
- package/agents-config/skills/apex/templates/02-plan.md +0 -10
- package/agents-config/skills/apex/templates/03-execute.md +0 -10
- package/agents-config/skills/apex/templates/04-validate.md +0 -10
- package/agents-config/skills/apex/templates/README.md +0 -176
- package/agents-config/skills/apex/templates/step-complete.md +0 -7
- package/agents-config/skills/claude-memory/SKILL.md +0 -293
- package/agents-config/skills/claude-memory/references/comprehensive-example.md +0 -175
- package/agents-config/skills/claude-memory/references/optimize-guide.md +0 -300
- package/agents-config/skills/claude-memory/references/project-patterns.md +0 -334
- package/agents-config/skills/claude-memory/references/prompting-techniques.md +0 -411
- package/agents-config/skills/claude-memory/references/rules-directory-guide.md +0 -298
- package/agents-config/skills/claude-memory/references/section-templates.md +0 -347
- package/agents-config/skills/fix-errors/SKILL.md +0 -61
- package/agents-config/skills/fix-grammar/SKILL.md +0 -59
- package/agents-config/skills/ralph-loop/SKILL.md +0 -117
- package/agents-config/skills/ralph-loop/scripts/setup.sh +0 -278
- package/agents-config/skills/ralph-loop/steps/step-00-init.md +0 -215
- package/agents-config/skills/ralph-loop/steps/step-01-interactive-prd.md +0 -366
- package/agents-config/skills/ralph-loop/steps/step-02-create-stories.md +0 -273
- package/agents-config/skills/ralph-loop/steps/step-03-finish.md +0 -245
- package/agents-config/skills/skill-creator/LICENSE.txt +0 -202
- package/agents-config/skills/skill-creator/SKILL.md +0 -421
- package/agents-config/skills/skill-creator/package.json +0 -5
- package/agents-config/skills/skill-creator/references/output-patterns.md +0 -82
- package/agents-config/skills/skill-creator/references/progressive-disclosure-patterns.md +0 -374
- package/agents-config/skills/skill-creator/references/prompting-integration.md +0 -363
- package/agents-config/skills/skill-creator/references/real-world-examples.md +0 -513
- package/agents-config/skills/skill-creator/references/script-patterns.md +0 -385
- package/agents-config/skills/skill-creator/references/workflows.md +0 -28
- package/agents-config/skills/skill-creator/references/xml-tag-guide.md +0 -606
- package/agents-config/skills/skill-creator/scripts/init-skill.ts +0 -214
- package/agents-config/skills/skill-creator/scripts/package-skill.ts +0 -146
- package/agents-config/skills/skill-creator/scripts/validate.ts +0 -138
- package/agents-config/skills/workflow-apex-free/SKILL.md +0 -261
- package/agents-config/skills/workflow-apex-free/scripts/setup-templates.sh +0 -100
- package/agents-config/skills/workflow-apex-free/scripts/update-progress.sh +0 -80
- package/agents-config/skills/workflow-apex-free/steps/step-00-init.md +0 -267
- package/agents-config/skills/workflow-apex-free/steps/step-00b-branch.md +0 -126
- package/agents-config/skills/workflow-apex-free/steps/step-00b-economy.md +0 -244
- package/agents-config/skills/workflow-apex-free/steps/step-00b-interactive.md +0 -153
- package/agents-config/skills/workflow-apex-free/steps/step-01-analyze.md +0 -361
- package/agents-config/skills/workflow-apex-free/steps/step-02-plan.md +0 -264
- package/agents-config/skills/workflow-apex-free/steps/step-03-execute.md +0 -239
- package/agents-config/skills/workflow-apex-free/steps/step-04-validate.md +0 -251
- package/agents-config/skills/workflow-apex-free/templates/00-context.md +0 -43
- package/agents-config/skills/workflow-apex-free/templates/01-analyze.md +0 -10
- package/agents-config/skills/workflow-apex-free/templates/02-plan.md +0 -10
- package/agents-config/skills/workflow-apex-free/templates/03-execute.md +0 -10
- package/agents-config/skills/workflow-apex-free/templates/04-validate.md +0 -10
- package/agents-config/skills/workflow-apex-free/templates/README.md +0 -176
- package/agents-config/skills/workflow-apex-free/templates/step-complete.md +0 -7
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rules-manager
|
|
3
|
+
description: Create and maintain agent rules in AGENTS.md and .agents/rules/. Use for project rules, conventions, constraints, rule indexes, or requests to add or optimize agent rules.
|
|
4
|
+
argument-hint: "[init | add <rule-name> | optimize | task description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<core_principle>
|
|
8
|
+
Rules consume tokens on every agent run. Keep them minimal, specific, and discoverable.
|
|
9
|
+
|
|
10
|
+
**Two-tier system:**
|
|
11
|
+
|
|
12
|
+
- **AGENTS.md** — Always loaded. Acts as the **index** + universal rules.
|
|
13
|
+
- **.agents/rules/\*.md** — Modular rule files for focused topics (changelog, testing, deployment, etc.).
|
|
14
|
+
|
|
15
|
+
**CRITICAL invariant:** Every file in `.agents/rules/` must be referenced in AGENTS.md so agents know it exists. AGENTS.md without a reference = orphaned rule = invisible to agents.
|
|
16
|
+
</core_principle>
|
|
17
|
+
|
|
18
|
+
<file_layout>
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
project-root/
|
|
22
|
+
├── AGENTS.md # Index + universal rules (always loaded)
|
|
23
|
+
└── .agents/
|
|
24
|
+
└── rules/
|
|
25
|
+
├── changelog.md # Rule for changelog management
|
|
26
|
+
├── testing.md # Rule for tests
|
|
27
|
+
└── deployment.md # Rule for deployment
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**AGENTS.md must contain a `## Rules` section listing each `.agents/rules/*.md` file with a one-line description.**
|
|
31
|
+
</file_layout>
|
|
32
|
+
|
|
33
|
+
<agents_md_template>
|
|
34
|
+
Minimal AGENTS.md with rules index:
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
# Project Name
|
|
38
|
+
|
|
39
|
+
Short description (1-2 lines).
|
|
40
|
+
|
|
41
|
+
## Tech Stack
|
|
42
|
+
|
|
43
|
+
- [Non-obvious tech only]
|
|
44
|
+
|
|
45
|
+
## Commands
|
|
46
|
+
|
|
47
|
+
- `[dev]` - Dev server
|
|
48
|
+
- `[test]` - Run tests
|
|
49
|
+
|
|
50
|
+
## Rules
|
|
51
|
+
|
|
52
|
+
The detailed rules live in `.agents/rules/`. Read the relevant file before acting:
|
|
53
|
+
|
|
54
|
+
- **Changelog** - [.agents/rules/changelog.md](.agents/rules/changelog.md) - When/how to update CHANGELOG.md
|
|
55
|
+
- **Testing** - [.agents/rules/testing.md](.agents/rules/testing.md) - Test conventions and coverage
|
|
56
|
+
- **Deployment** - [.agents/rules/deployment.md](.agents/rules/deployment.md) - Deploy checklist
|
|
57
|
+
|
|
58
|
+
## Universal Rules
|
|
59
|
+
|
|
60
|
+
- [2-3 critical rules that apply everywhere]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The `## Rules` section is the index. Each bullet = one file in `.agents/rules/`. The `## Universal Rules` section holds short, project-wide constraints that don't deserve their own file.
|
|
64
|
+
</agents_md_template>
|
|
65
|
+
|
|
66
|
+
<rule_file_template>
|
|
67
|
+
Each `.agents/rules/<name>.md` should be focused, short, and actionable.
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
# [Rule Title]
|
|
71
|
+
|
|
72
|
+
Short purpose statement (1 line).
|
|
73
|
+
|
|
74
|
+
## When this applies
|
|
75
|
+
|
|
76
|
+
- [Specific triggers - what task/context loads this rule]
|
|
77
|
+
|
|
78
|
+
## Rules
|
|
79
|
+
|
|
80
|
+
- [Specific, actionable rule]
|
|
81
|
+
- [Another rule with example if format matters]
|
|
82
|
+
|
|
83
|
+
## Example
|
|
84
|
+
|
|
85
|
+
[3-5 line concrete example, only if needed]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Size target:** 20-60 lines per rule file. If longer, split into multiple files.
|
|
89
|
+
</rule_file_template>
|
|
90
|
+
|
|
91
|
+
<writing_rules>
|
|
92
|
+
**Be specific, never vague:**
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
NO: "Update changelog properly"
|
|
96
|
+
YES: "Append entry to CHANGELOG.md under ## Unreleased before every PR. Format: - [type] description (#PR)"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Prohibitions beat positive guidance:**
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
NO: "Try to write tests"
|
|
103
|
+
YES: "NEVER merge without a passing test for the changed behavior"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Emphasis hierarchy:** CRITICAL > NEVER > ALWAYS > IMPORTANT
|
|
107
|
+
|
|
108
|
+
- Lead each section with the most critical rule
|
|
109
|
+
- Use **bold + keyword** for non-negotiables: `**CRITICAL**: Never commit secrets`
|
|
110
|
+
|
|
111
|
+
**Do NOT include:**
|
|
112
|
+
|
|
113
|
+
- Generic best practices ("write clean code", "DRY", "SOLID")
|
|
114
|
+
- Linter-enforced rules (ESLint, Prettier, Biome already do this)
|
|
115
|
+
- Things the agent discovers from the code (file structure, framework defaults)
|
|
116
|
+
- Marketing or vision statements
|
|
117
|
+
- Verbose paragraphs - one line is almost always enough
|
|
118
|
+
</writing_rules>
|
|
119
|
+
|
|
120
|
+
<workflows>
|
|
121
|
+
|
|
122
|
+
## `/rules-manager init` - Bootstrap AGENTS.md + .agents/rules/
|
|
123
|
+
|
|
124
|
+
When the argument contains `init`:
|
|
125
|
+
|
|
126
|
+
1. **Detect project context** - Read `package.json` or equivalent for name, stack, scripts.
|
|
127
|
+
2. **Check existing files** - If `AGENTS.md` or `.agents/rules/` already exists, read them and ASK before overwriting.
|
|
128
|
+
3. **Create skeleton** - Write AGENTS.md with empty `## Rules` index, ready to populate.
|
|
129
|
+
4. **Create `.agents/rules/` directory** - Empty for now. New rules added via `add` workflow.
|
|
130
|
+
|
|
131
|
+
Target AGENTS.md size at init: under 40 lines.
|
|
132
|
+
|
|
133
|
+
## `/rules-manager add <name>` - Add a new rule
|
|
134
|
+
|
|
135
|
+
When the argument starts with `add`:
|
|
136
|
+
|
|
137
|
+
1. **Confirm name** - Slugify (e.g., "changelog management" -> `changelog`). Ask user if unclear.
|
|
138
|
+
2. **Read existing AGENTS.md** - Confirm it exists. If not, run `init` first.
|
|
139
|
+
3. **Ask the user for rule content** - What does the rule enforce? When does it apply? Any examples?
|
|
140
|
+
4. **Write `.agents/rules/<name>.md`** - Use the rule file template. Keep it 20-60 lines.
|
|
141
|
+
5. **Update AGENTS.md `## Rules` section** - Add a one-line bullet pointing to the new file:
|
|
142
|
+
```
|
|
143
|
+
- **<Title>** - [.agents/rules/<name>.md](.agents/rules/<name>.md) - <one-line purpose>
|
|
144
|
+
```
|
|
145
|
+
6. **Verify the link** - Make sure the path in AGENTS.md exactly matches the created file.
|
|
146
|
+
|
|
147
|
+
**CRITICAL:** Step 5 is non-negotiable. A rule file without an index entry is invisible.
|
|
148
|
+
|
|
149
|
+
## `/rules-manager optimize` - Audit and clean up
|
|
150
|
+
|
|
151
|
+
When the argument contains `optimize`:
|
|
152
|
+
|
|
153
|
+
1. **Inventory** - List AGENTS.md and every file in `.agents/rules/`.
|
|
154
|
+
2. **Check the index** - For each file in `.agents/rules/`, verify there's a matching bullet in AGENTS.md `## Rules`. Flag missing entries.
|
|
155
|
+
3. **Check for orphans** - For each AGENTS.md bullet, verify the file exists. Flag broken links.
|
|
156
|
+
4. **Apply bloat removal** - For each rule file, remove:
|
|
157
|
+
- Linter-enforced rules
|
|
158
|
+
- Generic best practices
|
|
159
|
+
- Verbose explanations (compress to one line)
|
|
160
|
+
- Things derivable from code
|
|
161
|
+
5. **Compress** - Paragraphs to bullets, multi-line rules to single lines.
|
|
162
|
+
6. **Show diff and ask before applying.**
|
|
163
|
+
|
|
164
|
+
Target sizes:
|
|
165
|
+
|
|
166
|
+
- AGENTS.md: under 80 lines
|
|
167
|
+
- Each rule file: under 60 lines
|
|
168
|
+
|
|
169
|
+
## Default - Add a rule based on description
|
|
170
|
+
|
|
171
|
+
When the argument is a free-form task (e.g., "add a rule about how we tag releases"):
|
|
172
|
+
|
|
173
|
+
1. Treat as `add` with auto-derived name.
|
|
174
|
+
2. Ask the user 1-2 clarifying questions if the rule scope is unclear.
|
|
175
|
+
3. Follow the `add` workflow.
|
|
176
|
+
</workflows>
|
|
177
|
+
|
|
178
|
+
<rules_for_this_skill>
|
|
179
|
+
|
|
180
|
+
- ALWAYS update AGENTS.md `## Rules` index when creating a file in `.agents/rules/`
|
|
181
|
+
- NEVER create a rule file without confirming with the user what it should contain
|
|
182
|
+
- NEVER overwrite existing AGENTS.md or rule files without asking
|
|
183
|
+
- Default to short rule files (20-60 lines). Split if larger.
|
|
184
|
+
- When user asks "create a rule", default to creating a file in `.agents/rules/` (not inline in AGENTS.md), unless the rule is 1-2 lines and fits the universal section.
|
|
185
|
+
</rules_for_this_skill>
|
|
186
|
+
|
|
187
|
+
<reference_guides>
|
|
188
|
+
|
|
189
|
+
- **Examples**: [references/examples.md](references/examples.md) - Sample rule files (changelog, testing, deployment)
|
|
190
|
+
- **AGENTS.md vs CLAUDE.md**: [references/agents-vs-claude.md](references/agents-vs-claude.md) - When to use which format
|
|
191
|
+
</reference_guides>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# AGENTS.md vs CLAUDE.md - When to use which
|
|
2
|
+
|
|
3
|
+
Both files serve the same purpose: telling AI agents how to work in your project. They differ in audience and convention.
|
|
4
|
+
|
|
5
|
+
## Quick decision
|
|
6
|
+
|
|
7
|
+
| You are setting up rules for... | Use |
|
|
8
|
+
|---------------------------------|-----|
|
|
9
|
+
| Multiple AI agents (Claude, Codex, Cursor, etc.) | `AGENTS.md` + `.agents/rules/` |
|
|
10
|
+
| Claude Code only | `CLAUDE.md` + `.claude/rules/` |
|
|
11
|
+
| Both, on the same project | Both files; symlink or duplicate carefully |
|
|
12
|
+
|
|
13
|
+
`AGENTS.md` has emerged as a cross-tool convention. `CLAUDE.md` is Claude-specific. Use the broader one if uncertain.
|
|
14
|
+
|
|
15
|
+
## Structural parity
|
|
16
|
+
|
|
17
|
+
Both follow the same two-tier pattern:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
AGENTS.md <-> CLAUDE.md
|
|
21
|
+
.agents/rules/<name>.md <-> .claude/rules/<name>.md
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The index-pattern is identical: the root file lists every modular file, with a one-line description and a link.
|
|
25
|
+
|
|
26
|
+
## Key differences
|
|
27
|
+
|
|
28
|
+
### Path conventions
|
|
29
|
+
- AGENTS.md: rules live in `.agents/rules/`
|
|
30
|
+
- CLAUDE.md: rules live in `.claude/rules/`
|
|
31
|
+
|
|
32
|
+
### Path-scoped rules
|
|
33
|
+
- `.claude/rules/` supports YAML frontmatter `paths:` for glob-scoped rules (loads only when relevant files are touched)
|
|
34
|
+
- `.agents/rules/` does not have a defined path-scoping spec across all tools - keep rules globally relevant or document scoping in plain text
|
|
35
|
+
|
|
36
|
+
### Discovery
|
|
37
|
+
- Claude Code auto-loads `CLAUDE.md` and recurses through subtrees
|
|
38
|
+
- AGENTS.md loading depends on the agent. Be explicit in the file about how rules are organized so any agent can navigate.
|
|
39
|
+
|
|
40
|
+
## Recommended pattern when supporting both
|
|
41
|
+
|
|
42
|
+
Pick one as the source of truth and reference from the other:
|
|
43
|
+
|
|
44
|
+
**Option A** - AGENTS.md is canonical:
|
|
45
|
+
```markdown
|
|
46
|
+
# CLAUDE.md
|
|
47
|
+
See [AGENTS.md](AGENTS.md) for project rules and the rule index.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Option B** - Symlink (cleanest if the tool follows symlinks):
|
|
51
|
+
```bash
|
|
52
|
+
ln -s AGENTS.md CLAUDE.md
|
|
53
|
+
ln -s .agents/rules .claude/rules
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Option C** - Duplicate both files, accept drift risk. Run `/rules-manager optimize` periodically to catch divergence.
|
|
57
|
+
|
|
58
|
+
## Migration
|
|
59
|
+
|
|
60
|
+
Going from CLAUDE.md to AGENTS.md:
|
|
61
|
+
1. Rename `CLAUDE.md` -> `AGENTS.md`
|
|
62
|
+
2. Rename `.claude/rules/` -> `.agents/rules/`
|
|
63
|
+
3. Update every link in the index
|
|
64
|
+
4. Drop `paths:` frontmatter from rule files (or document scoping inline) if your other agents do not support it
|
|
65
|
+
|
|
66
|
+
Going from AGENTS.md to CLAUDE.md: do the reverse.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Sample Rule Files
|
|
2
|
+
|
|
3
|
+
Concrete examples of well-formed `.agents/rules/*.md` files. Copy and adapt.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Example 1: `.agents/rules/changelog.md`
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
# Changelog Rule
|
|
11
|
+
|
|
12
|
+
How and when to update CHANGELOG.md.
|
|
13
|
+
|
|
14
|
+
## When this applies
|
|
15
|
+
- Before opening any PR that changes user-facing behavior
|
|
16
|
+
- After merging a release branch
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
- **ALWAYS** append entries under `## Unreleased` at the top of CHANGELOG.md
|
|
20
|
+
- Use the format: `- [type] description (#PR)` where type is `feat | fix | chore | docs | breaking`
|
|
21
|
+
- **NEVER** edit historical entries below `## Unreleased`
|
|
22
|
+
- On release, rename `## Unreleased` to `## vX.Y.Z - YYYY-MM-DD`
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
```
|
|
26
|
+
## Unreleased
|
|
27
|
+
- [feat] Add dark mode toggle (#142)
|
|
28
|
+
- [fix] Crash on empty search input (#145)
|
|
29
|
+
```
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Example 2: `.agents/rules/testing.md`
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
# Testing Rule
|
|
38
|
+
|
|
39
|
+
Test conventions for this project.
|
|
40
|
+
|
|
41
|
+
## When this applies
|
|
42
|
+
- Writing new code
|
|
43
|
+
- Fixing bugs (write a failing test first)
|
|
44
|
+
|
|
45
|
+
## Rules
|
|
46
|
+
- **NEVER** merge a behavior change without a passing test
|
|
47
|
+
- Tests live next to the source: `src/foo.ts` -> `src/foo.test.ts`
|
|
48
|
+
- Use Vitest. Run with `pnpm test`
|
|
49
|
+
- Mock external APIs at the network layer (msw), not at the function level
|
|
50
|
+
- Coverage gate: 80% for new files, no regression on existing files
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Example 3: `.agents/rules/deployment.md`
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
# Deployment Rule
|
|
59
|
+
|
|
60
|
+
Pre-deploy checklist and rollback policy.
|
|
61
|
+
|
|
62
|
+
## When this applies
|
|
63
|
+
- Promoting a build to production
|
|
64
|
+
- Tagging a release
|
|
65
|
+
|
|
66
|
+
## Rules
|
|
67
|
+
- **CRITICAL**: Run `pnpm build && pnpm test` locally before tagging
|
|
68
|
+
- Tags follow semver: `v1.2.3` (no `v1.2.3-final-final`)
|
|
69
|
+
- Migrations must be backward-compatible for one release cycle
|
|
70
|
+
- **NEVER** deploy on Friday after 3pm or weekends without sign-off
|
|
71
|
+
|
|
72
|
+
## Rollback
|
|
73
|
+
- `pnpm deploy:rollback <previous-tag>` reverts in under 2 minutes
|
|
74
|
+
- Always announce in #deploys before and after
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Example 4: `.agents/rules/git-workflow.md`
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
# Git Workflow Rule
|
|
83
|
+
|
|
84
|
+
Branching, commits, and PR conventions.
|
|
85
|
+
|
|
86
|
+
## When this applies
|
|
87
|
+
- Every code change
|
|
88
|
+
|
|
89
|
+
## Rules
|
|
90
|
+
- Branch from `main`. Name: `<type>/<short-description>` (e.g. `feat/dark-mode`)
|
|
91
|
+
- Conventional commits: `feat:`, `fix:`, `chore:`, `docs:`, `refactor:`
|
|
92
|
+
- **NEVER** force-push to `main` or shared branches
|
|
93
|
+
- PRs need 1 approval + green CI before merge
|
|
94
|
+
- Squash merge by default. Merge commit only for release branches.
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Index entries in AGENTS.md
|
|
100
|
+
|
|
101
|
+
After creating any of the above, AGENTS.md must include a matching bullet:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
## Rules
|
|
105
|
+
|
|
106
|
+
The detailed rules live in `.agents/rules/`. Read the relevant file before acting:
|
|
107
|
+
|
|
108
|
+
- **Changelog** - [.agents/rules/changelog.md](.agents/rules/changelog.md) - When/how to update CHANGELOG.md
|
|
109
|
+
- **Testing** - [.agents/rules/testing.md](.agents/rules/testing.md) - Test conventions and coverage gates
|
|
110
|
+
- **Deployment** - [.agents/rules/deployment.md](.agents/rules/deployment.md) - Pre-deploy checklist and rollback
|
|
111
|
+
- **Git workflow** - [.agents/rules/git-workflow.md](.agents/rules/git-workflow.md) - Branching, commits, PRs
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The bullet does three things at once:
|
|
115
|
+
1. Tells the agent the rule exists
|
|
116
|
+
2. Gives it a one-line summary so it knows when to load it
|
|
117
|
+
3. Provides the exact path to read
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-manager
|
|
3
|
+
description: Create or edit Claude, Codex, and Cursor skills/rules. Use for SKILL.md, .cursor/rules, AGENTS.md, skill prompts, frontmatter, references, scripts, and discovery rules.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Manager
|
|
7
|
+
|
|
8
|
+
Authoring guide for skills/rules across three agent platforms. All three share the same idea: a small markdown file with frontmatter, optional references, optional scripts. The discovery rules and frontmatter fields differ.
|
|
9
|
+
|
|
10
|
+
| Platform | File | Frontmatter fields | Optional config |
|
|
11
|
+
| :----------- | :-------------------------------------------- | :------------------------------------------------------- | :--------------------------- |
|
|
12
|
+
| Claude Code | `<scope>/skills/<name>/SKILL.md` | `name`, `description`, plus invocation/execution fields | - |
|
|
13
|
+
| Codex | `<scope>/.agents/skills/<name>/SKILL.md` | `name`, `description` | `agents/openai.yaml` |
|
|
14
|
+
| Cursor | `.cursor/rules/<name>.md` or `.mdc` | `description`, `globs`, `alwaysApply` | `AGENTS.md` (no frontmatter) |
|
|
15
|
+
|
|
16
|
+
Pick the platform first, then read the matching reference file:
|
|
17
|
+
|
|
18
|
+
- Claude Code → see [references/claude-code.md](references/claude-code.md)
|
|
19
|
+
- Codex → see [references/codex.md](references/codex.md)
|
|
20
|
+
- Cursor → see [references/cursor.md](references/cursor.md)
|
|
21
|
+
- Description quality → see [references/description-recommandation.md](references/description-recommandation.md)
|
|
22
|
+
|
|
23
|
+
If unsure which the user wants, ask. Default to Claude Code when working under `~/.claude/` or `.claude/`, Codex when under `~/.agents/` or `.agents/`, Cursor when under `.cursor/`.
|
|
24
|
+
|
|
25
|
+
## Core principles (all platforms)
|
|
26
|
+
|
|
27
|
+
### Concise is key
|
|
28
|
+
|
|
29
|
+
The context window is shared with the system prompt, conversation, other skills' metadata, and the user request. Only add context the agent doesn't already have. Challenge each line: does it justify its tokens?
|
|
30
|
+
|
|
31
|
+
### Match freedom to fragility
|
|
32
|
+
|
|
33
|
+
- **High freedom** (prose instructions): multiple valid approaches, decisions depend on context.
|
|
34
|
+
- **Medium freedom** (pseudocode, scripts with parameters): preferred pattern exists, some variation OK.
|
|
35
|
+
- **Low freedom** (specific scripts, few parameters): fragile, error-prone, must run a fixed sequence.
|
|
36
|
+
|
|
37
|
+
### Progressive disclosure
|
|
38
|
+
|
|
39
|
+
Three loading levels:
|
|
40
|
+
|
|
41
|
+
1. **Metadata** (name + description): always in context. Keep tight.
|
|
42
|
+
2. **SKILL.md body**: loaded when the skill triggers. Aim under ~500 lines.
|
|
43
|
+
3. **References**: loaded on demand. Move variant-specific detail, schemas, and long examples here.
|
|
44
|
+
|
|
45
|
+
Keep references one level deep. Reference them by name in SKILL.md so the agent knows when to open them.
|
|
46
|
+
|
|
47
|
+
### Skill anatomy
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
skill-name/
|
|
51
|
+
├── SKILL.md # required: frontmatter + instructions
|
|
52
|
+
├── references/ # optional: docs loaded on demand
|
|
53
|
+
├── scripts/ # optional: deterministic code
|
|
54
|
+
└── assets/ # optional: templates/icons used in output
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Do NOT add README, CHANGELOG, INSTALLATION_GUIDE, etc. Only files the agent needs at runtime.
|
|
58
|
+
|
|
59
|
+
## Authoring workflow
|
|
60
|
+
|
|
61
|
+
1. **Pin down the use case.** Get 2-3 concrete example prompts that should trigger the skill. Confirm with the user.
|
|
62
|
+
2. **List reusable parts.** What scripts, references, or assets recur? Add only those.
|
|
63
|
+
3. **Write SKILL.md.** Frontmatter first (description is what triggers it - front-load keywords). Then imperative-form body.
|
|
64
|
+
4. **Test the description.** The description has to read like a trigger phrase, not a label. Examples in each reference file.
|
|
65
|
+
5. **Iterate after real use.** Note what the agent got wrong; refine the relevant section.
|
|
66
|
+
|
|
67
|
+
## Writing the description
|
|
68
|
+
|
|
69
|
+
The `description` field is the single most important line in the file - it's what the model uses to decide to load the skill. This is a hard rule: descriptions must be between 50 and 300 characters.
|
|
70
|
+
|
|
71
|
+
Write it as:
|
|
72
|
+
|
|
73
|
+
- Front-load trigger words ("Use when...", "create a skill", "review a PR").
|
|
74
|
+
- State scope and boundaries explicitly.
|
|
75
|
+
- Mention concrete file names or commands the user might type.
|
|
76
|
+
- Keep it short enough to stay under 300 characters, while still specific enough to trigger reliably.
|
|
77
|
+
|
|
78
|
+
Bad: `"Helper for skills."`
|
|
79
|
+
Good: `"Create and edit skills/rules across Claude Code, OpenAI Codex, and Cursor. Use when the user asks to 'create a skill'..."`
|
|
80
|
+
|
|
81
|
+
To validate skill descriptions, frontmatter fields, `agents/openai.yaml`, and skill directory shape, run:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
bun scripts/inspect-description.ts
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
By default, this checks `~/.agents/skills` only and follows symlinked skill directories inside that root. Pass one or more roots to inspect a different set. Passing a `.cursor/rules` directory validates Cursor rule frontmatter too:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
bun scripts/inspect-description.ts .agents/skills
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
For researched guidance and examples, see [references/description-recommandation.md](references/description-recommandation.md).
|
|
94
|
+
|
|
95
|
+
## Where each platform stores skills
|
|
96
|
+
|
|
97
|
+
See the per-platform reference files. Quick reminders:
|
|
98
|
+
|
|
99
|
+
- **Claude Code**: `~/.claude/skills/` (personal) or `.claude/skills/` (project). Higher scope wins on name collision.
|
|
100
|
+
- **Codex**: `.agents/skills/` walks up from CWD to repo root, then `~/.agents/skills/`, then `/etc/codex/skills`, then system bundled.
|
|
101
|
+
- **Cursor**: `.cursor/rules/` (project, version-controlled) or `AGENTS.md` files in project subdirectories.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Claude Code Skills
|
|
2
|
+
|
|
3
|
+
Official docs: https://code.claude.com/docs/llms.txt
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
skill-name/
|
|
9
|
+
├── SKILL.md # required
|
|
10
|
+
├── references/ # loaded on demand
|
|
11
|
+
├── scripts/ # executable code
|
|
12
|
+
└── assets/ # templates, icons, fonts used in output
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Storage locations
|
|
16
|
+
|
|
17
|
+
| Location | Path | Applies to |
|
|
18
|
+
| :--------- | :--------------------------------------- | :--------------------- |
|
|
19
|
+
| Personal | `~/.claude/skills/<name>/SKILL.md` | All your projects |
|
|
20
|
+
| Project | `.claude/skills/<name>/SKILL.md` | This project only |
|
|
21
|
+
| Plugin | `<plugin>/skills/<name>/SKILL.md` | Where plugin enabled |
|
|
22
|
+
| Enterprise | Managed settings | Whole org |
|
|
23
|
+
|
|
24
|
+
Precedence on name collision: enterprise > personal > project. Nested `.claude/skills/` under subdirectories is auto-discovered (monorepos).
|
|
25
|
+
|
|
26
|
+
## SKILL.md frontmatter
|
|
27
|
+
|
|
28
|
+
**Core**
|
|
29
|
+
|
|
30
|
+
- `name` (optional, defaults to directory name): lowercase, hyphens, max 64 chars.
|
|
31
|
+
- `description` (recommended): what it does + when to use. Front-load trigger keywords.
|
|
32
|
+
|
|
33
|
+
**Invocation control**
|
|
34
|
+
|
|
35
|
+
- `disable-model-invocation: true` - only the user can invoke. Use for side-effecting commands like `/deploy`.
|
|
36
|
+
- `user-invocable: false` - only Claude can invoke. Use for background knowledge.
|
|
37
|
+
- `argument-hint: "[issue-number]"` - shown in autocomplete.
|
|
38
|
+
|
|
39
|
+
**Execution control**
|
|
40
|
+
|
|
41
|
+
- `allowed-tools: [Read, Edit, Bash]` - tools usable without permission prompts.
|
|
42
|
+
- `model: claude-sonnet-4-6` - override active model.
|
|
43
|
+
- `context: fork` - run in a forked subagent context (no conversation history).
|
|
44
|
+
- `agent: Explore` - subagent type when `context: fork` is set.
|
|
45
|
+
- `hooks` - lifecycle hooks scoped to this skill.
|
|
46
|
+
|
|
47
|
+
**Substitutions in body**
|
|
48
|
+
|
|
49
|
+
- `$ARGUMENTS` - args passed when invoking.
|
|
50
|
+
- `${CLAUDE_SESSION_ID}` - current session ID.
|
|
51
|
+
|
|
52
|
+
**Dynamic context injection**: prefix a shell command with `!` and wrap in backticks; output replaces the placeholder before the body is sent to the model.
|
|
53
|
+
|
|
54
|
+
## Example: subagent-forked skill
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
---
|
|
58
|
+
name: deep-research
|
|
59
|
+
description: Research a topic thoroughly. Use when the user asks to research, investigate, or deeply explore a topic that requires multiple file reads and web searches.
|
|
60
|
+
context: fork
|
|
61
|
+
agent: Explore
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
Research $ARGUMENTS thoroughly:
|
|
65
|
+
1. Find relevant files using Glob and Grep
|
|
66
|
+
2. Read and analyze the code
|
|
67
|
+
3. Summarize findings with file references
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Bundled resources
|
|
71
|
+
|
|
72
|
+
- **`scripts/`**: deterministic code (Python, Bash, TS). Run without loading into context. Include only when the same code would be rewritten repeatedly.
|
|
73
|
+
- **`references/`**: docs loaded on demand. Schemas, API specs, long examples, domain glossaries. Keep one level deep.
|
|
74
|
+
- **`assets/`**: files used in output (templates, fonts, boilerplate). Not loaded into context.
|
|
75
|
+
|
|
76
|
+
## Common mistakes
|
|
77
|
+
|
|
78
|
+
- Description that labels instead of triggers ("Helper for X" → "Use when the user asks to X...").
|
|
79
|
+
- SKILL.md > 500 lines without splitting into references.
|
|
80
|
+
- README/CHANGELOG files next to SKILL.md.
|
|
81
|
+
- Duplicating the same content in SKILL.md and references.
|