@cleocode/cleo 2026.3.20 → 2026.3.22

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 (150) hide show
  1. package/dist/cli/index.js +39394 -38817
  2. package/dist/cli/index.js.map +4 -4
  3. package/dist/mcp/index.js +35841 -36702
  4. package/dist/mcp/index.js.map +4 -4
  5. package/drizzle-brain.config.ts +7 -0
  6. package/drizzle-nexus.config.ts +7 -0
  7. package/drizzle-tasks.config.ts +7 -0
  8. package/migrations/drizzle-brain/20260301230215_workable_spitfire/migration.sql +68 -0
  9. package/migrations/drizzle-brain/20260301230215_workable_spitfire/snapshot.json +651 -0
  10. package/migrations/drizzle-brain/20260302050325_unknown_justin_hammer/migration.sql +23 -0
  11. package/migrations/drizzle-brain/20260302050325_unknown_justin_hammer/snapshot.json +884 -0
  12. package/migrations/drizzle-brain/20260302061755_unusual_jamie_braddock/migration.sql +2 -0
  13. package/migrations/drizzle-brain/20260302061755_unusual_jamie_braddock/snapshot.json +908 -0
  14. package/migrations/drizzle-brain/20260302193548_luxuriant_glorian/migration.sql +20 -0
  15. package/migrations/drizzle-brain/20260302193548_luxuriant_glorian/snapshot.json +1078 -0
  16. package/migrations/drizzle-brain/20260304045002_white_thunderbolt_ross/migration.sql +16 -0
  17. package/migrations/drizzle-brain/20260304045002_white_thunderbolt_ross/snapshot.json +1233 -0
  18. package/migrations/drizzle-nexus/20260305070805_quick_ted_forrester/migration.sql +46 -0
  19. package/migrations/drizzle-nexus/20260305070805_quick_ted_forrester/snapshot.json +461 -0
  20. package/migrations/drizzle-tasks/20260308024513_oval_king_bedlam/migration.sql +32 -0
  21. package/migrations/drizzle-tasks/20260308024513_oval_king_bedlam/snapshot.json +3727 -0
  22. package/package.json +14 -4
  23. package/packages/ct-skills/skills/ct-cleo/SKILL.md +344 -81
  24. package/packages/ct-skills/skills/ct-grade/SKILL.md +20 -4
  25. package/packages/ct-skills/skills/ct-grade/agents/analysis-reporter.md +203 -0
  26. package/packages/ct-skills/skills/ct-grade/agents/blind-comparator.md +157 -0
  27. package/packages/ct-skills/skills/ct-grade/agents/scenario-runner.md +134 -0
  28. package/packages/ct-skills/skills/ct-grade/eval-viewer/generate_grade_review.py +1138 -0
  29. package/packages/ct-skills/skills/ct-grade/eval-viewer/generate_grade_viewer.py +544 -0
  30. package/packages/ct-skills/skills/ct-grade/eval-viewer/generate_review.py +283 -0
  31. package/packages/ct-skills/skills/ct-grade/eval-viewer/grade-review.html +1574 -0
  32. package/packages/ct-skills/skills/ct-grade/eval-viewer/viewer.html +219 -0
  33. package/packages/ct-skills/skills/ct-grade/evals/evals.json +94 -0
  34. package/packages/ct-skills/skills/ct-grade/references/ab-test-methodology.md +150 -0
  35. package/packages/ct-skills/skills/ct-grade/references/domains.md +137 -0
  36. package/packages/ct-skills/skills/ct-grade/references/grade-spec.md +236 -0
  37. package/packages/ct-skills/skills/ct-grade/references/scenario-playbook.md +234 -0
  38. package/packages/ct-skills/skills/ct-grade/references/token-tracking.md +120 -0
  39. package/packages/ct-skills/skills/ct-grade/scripts/audit_analyzer.py +279 -0
  40. package/packages/ct-skills/skills/ct-grade/scripts/generate_report.py +283 -0
  41. package/packages/ct-skills/skills/ct-grade/scripts/run_ab_test.py +504 -0
  42. package/packages/ct-skills/skills/ct-grade/scripts/run_all.py +287 -0
  43. package/packages/ct-skills/skills/ct-grade/scripts/setup_run.py +183 -0
  44. package/packages/ct-skills/skills/ct-grade/scripts/token_tracker.py +630 -0
  45. package/packages/ct-skills/skills/ct-grade-v2-1/SKILL.md +237 -0
  46. package/packages/ct-skills/skills/ct-grade-v2-1/agents/analysis-reporter.md +203 -0
  47. package/packages/ct-skills/skills/ct-grade-v2-1/agents/blind-comparator.md +157 -0
  48. package/packages/ct-skills/skills/ct-grade-v2-1/agents/scenario-runner.md +179 -0
  49. package/packages/ct-skills/skills/ct-grade-v2-1/evals/evals.json +74 -0
  50. package/packages/ct-skills/skills/ct-grade-v2-1/grade-viewer/build_op_stats.py +174 -0
  51. package/packages/ct-skills/skills/ct-grade-v2-1/grade-viewer/eval-analysis.json +41 -0
  52. package/packages/ct-skills/skills/ct-grade-v2-1/grade-viewer/eval-report.md +34 -0
  53. package/packages/ct-skills/skills/ct-grade-v2-1/grade-viewer/generate_grade_review.py +1023 -0
  54. package/packages/ct-skills/skills/ct-grade-v2-1/grade-viewer/generate_grade_viewer.py +548 -0
  55. package/packages/ct-skills/skills/ct-grade-v2-1/grade-viewer/grade-review-eval.html +613 -0
  56. package/packages/ct-skills/skills/ct-grade-v2-1/grade-viewer/grade-review.html +1532 -0
  57. package/packages/ct-skills/skills/ct-grade-v2-1/grade-viewer/viewer.html +620 -0
  58. package/packages/ct-skills/skills/ct-grade-v2-1/manifest-entry.json +31 -0
  59. package/packages/ct-skills/skills/ct-grade-v2-1/references/ab-testing.md +233 -0
  60. package/packages/ct-skills/skills/ct-grade-v2-1/references/domains-ssot.md +156 -0
  61. package/packages/ct-skills/skills/ct-grade-v2-1/references/grade-spec-v2.md +167 -0
  62. package/packages/ct-skills/skills/ct-grade-v2-1/references/playbook-v2.md +393 -0
  63. package/packages/ct-skills/skills/ct-grade-v2-1/references/token-tracking.md +202 -0
  64. package/packages/ct-skills/skills/ct-grade-v2-1/scripts/generate_report.py +419 -0
  65. package/packages/ct-skills/skills/ct-grade-v2-1/scripts/run_ab_test.py +493 -0
  66. package/packages/ct-skills/skills/ct-grade-v2-1/scripts/run_scenario.py +396 -0
  67. package/packages/ct-skills/skills/ct-grade-v2-1/scripts/setup_run.py +207 -0
  68. package/packages/ct-skills/skills/ct-grade-v2-1/scripts/token_tracker.py +175 -0
  69. package/packages/ct-skills/skills/ct-orchestrator/SKILL.md +1 -29
  70. package/packages/ct-skills/skills/ct-orchestrator/manifest-entry.json +19 -0
  71. package/packages/ct-skills/skills/ct-skill-creator/SKILL.md +0 -12
  72. package/packages/ct-skills/skills/ct-skill-creator/agents/analyzer.md +276 -0
  73. package/packages/ct-skills/skills/ct-skill-creator/agents/comparator.md +204 -0
  74. package/packages/ct-skills/skills/ct-skill-creator/agents/grader.md +225 -0
  75. package/packages/ct-skills/skills/ct-skill-creator/assets/eval_review.html +146 -0
  76. package/packages/ct-skills/skills/ct-skill-creator/eval-viewer/generate_review.py +471 -0
  77. package/packages/ct-skills/skills/ct-skill-creator/eval-viewer/viewer.html +1325 -0
  78. package/packages/ct-skills/skills/ct-skill-creator/manifest-entry.json +17 -0
  79. package/packages/ct-skills/skills/ct-skill-creator/references/dynamic-context.md +228 -0
  80. package/packages/ct-skills/skills/ct-skill-creator/references/frontmatter.md +83 -0
  81. package/packages/ct-skills/skills/ct-skill-creator/references/invocation-control.md +165 -0
  82. package/packages/ct-skills/skills/ct-skill-creator/references/provider-deployment.md +175 -0
  83. package/packages/ct-skills/skills/ct-skill-creator/references/schemas.md +430 -0
  84. package/packages/ct-skills/skills/ct-skill-creator/scripts/__init__.py +1 -0
  85. package/packages/ct-skills/skills/ct-skill-creator/scripts/aggregate_benchmark.py +401 -0
  86. package/packages/ct-skills/skills/ct-skill-creator/scripts/generate_report.py +326 -0
  87. package/packages/ct-skills/skills/ct-skill-creator/scripts/improve_description.py +247 -0
  88. package/packages/ct-skills/skills/ct-skill-creator/scripts/run_eval.py +310 -0
  89. package/packages/ct-skills/skills/ct-skill-creator/scripts/run_loop.py +328 -0
  90. package/packages/ct-skills/skills/ct-skill-creator/scripts/utils.py +47 -0
  91. package/packages/ct-skills/skills/ct-skill-validator/SKILL.md +178 -0
  92. package/packages/ct-skills/skills/ct-skill-validator/agents/ecosystem-checker.md +151 -0
  93. package/packages/ct-skills/skills/ct-skill-validator/assets/valid-skill-example.md +13 -0
  94. package/packages/ct-skills/skills/ct-skill-validator/evals/eval_set.json +14 -0
  95. package/packages/ct-skills/skills/ct-skill-validator/evals/evals.json +52 -0
  96. package/packages/ct-skills/skills/ct-skill-validator/manifest-entry.json +20 -0
  97. package/packages/ct-skills/skills/ct-skill-validator/references/cleo-ecosystem-rules.md +163 -0
  98. package/packages/ct-skills/skills/ct-skill-validator/references/validation-rules.md +168 -0
  99. package/packages/ct-skills/skills/ct-skill-validator/scripts/__init__.py +0 -0
  100. package/packages/ct-skills/skills/ct-skill-validator/scripts/audit_body.py +242 -0
  101. package/packages/ct-skills/skills/ct-skill-validator/scripts/check_ecosystem.py +169 -0
  102. package/packages/ct-skills/skills/ct-skill-validator/scripts/check_manifest.py +172 -0
  103. package/packages/ct-skills/skills/ct-skill-validator/scripts/generate_validation_report.py +442 -0
  104. package/packages/ct-skills/skills/ct-skill-validator/scripts/validate.py +422 -0
  105. /package/{drizzle → migrations/drizzle-tasks}/20260224040019_baseline/migration.sql +0 -0
  106. /package/{drizzle → migrations/drizzle-tasks}/20260224040019_baseline/snapshot.json +0 -0
  107. /package/{drizzle → migrations/drizzle-tasks}/20260224040238_add-audit-log/migration.sql +0 -0
  108. /package/{drizzle → migrations/drizzle-tasks}/20260224040238_add-audit-log/snapshot.json +0 -0
  109. /package/{drizzle → migrations/drizzle-tasks}/20260224144602_closed_grim_reaper/migration.sql +0 -0
  110. /package/{drizzle → migrations/drizzle-tasks}/20260224144602_closed_grim_reaper/snapshot.json +0 -0
  111. /package/{drizzle → migrations/drizzle-tasks}/20260225024442_sync-lifecycle-enums-and-arch-decisions/migration.sql +0 -0
  112. /package/{drizzle → migrations/drizzle-tasks}/20260225024442_sync-lifecycle-enums-and-arch-decisions/snapshot.json +0 -0
  113. /package/{drizzle → migrations/drizzle-tasks}/20260227014821_adr-system-and-status-registry/migration.sql +0 -0
  114. /package/{drizzle → migrations/drizzle-tasks}/20260227014821_adr-system-and-status-registry/snapshot.json +0 -0
  115. /package/{drizzle → migrations/drizzle-tasks}/20260227021231_add-cancelled-pipeline-status/migration.sql +0 -0
  116. /package/{drizzle → migrations/drizzle-tasks}/20260227021231_add-cancelled-pipeline-status/snapshot.json +0 -0
  117. /package/{drizzle → migrations/drizzle-tasks}/20260227022417_adr-cognitive-search-fields/migration.sql +0 -0
  118. /package/{drizzle → migrations/drizzle-tasks}/20260227022417_adr-cognitive-search-fields/snapshot.json +0 -0
  119. /package/{drizzle → migrations/drizzle-tasks}/20260227172236_freezing_grey_gargoyle/migration.sql +0 -0
  120. /package/{drizzle → migrations/drizzle-tasks}/20260227172236_freezing_grey_gargoyle/snapshot.json +0 -0
  121. /package/{drizzle → migrations/drizzle-tasks}/20260227183444_fix-orphaned-parent-ids/migration.sql +0 -0
  122. /package/{drizzle → migrations/drizzle-tasks}/20260227183444_fix-orphaned-parent-ids/snapshot.json +0 -0
  123. /package/{drizzle → migrations/drizzle-tasks}/20260227183521_parent-id-on-delete-set-null/migration.sql +0 -0
  124. /package/{drizzle → migrations/drizzle-tasks}/20260227183521_parent-id-on-delete-set-null/snapshot.json +0 -0
  125. /package/{drizzle → migrations/drizzle-tasks}/20260227200430_numerous_mysterio/migration.sql +0 -0
  126. /package/{drizzle → migrations/drizzle-tasks}/20260227200430_numerous_mysterio/snapshot.json +0 -0
  127. /package/{drizzle → migrations/drizzle-tasks}/20260227235745_add-audit-log-dispatch-columns/migration.sql +0 -0
  128. /package/{drizzle → migrations/drizzle-tasks}/20260227235745_add-audit-log-dispatch-columns/snapshot.json +0 -0
  129. /package/{drizzle → migrations/drizzle-tasks}/20260301053344_careless_changeling/migration.sql +0 -0
  130. /package/{drizzle → migrations/drizzle-tasks}/20260301053344_careless_changeling/snapshot.json +0 -0
  131. /package/{drizzle → migrations/drizzle-tasks}/20260301175940_futuristic_eternity/migration.sql +0 -0
  132. /package/{drizzle → migrations/drizzle-tasks}/20260301175940_futuristic_eternity/snapshot.json +0 -0
  133. /package/{drizzle → migrations/drizzle-tasks}/20260301180528_update-task-relations-check-constraint/migration.sql +0 -0
  134. /package/{drizzle → migrations/drizzle-tasks}/20260301180528_update-task-relations-check-constraint/snapshot.json +0 -0
  135. /package/{drizzle → migrations/drizzle-tasks}/20260302163443_free_silk_fever/migration.sql +0 -0
  136. /package/{drizzle → migrations/drizzle-tasks}/20260302163443_free_silk_fever/snapshot.json +0 -0
  137. /package/{drizzle → migrations/drizzle-tasks}/20260302163457_robust_johnny_storm/migration.sql +0 -0
  138. /package/{drizzle → migrations/drizzle-tasks}/20260302163457_robust_johnny_storm/snapshot.json +0 -0
  139. /package/{drizzle → migrations/drizzle-tasks}/20260302163511_late_sphinx/migration.sql +0 -0
  140. /package/{drizzle → migrations/drizzle-tasks}/20260302163511_late_sphinx/snapshot.json +0 -0
  141. /package/{drizzle → migrations/drizzle-tasks}/20260305011924_cheerful_mongu/migration.sql +0 -0
  142. /package/{drizzle → migrations/drizzle-tasks}/20260305011924_cheerful_mongu/snapshot.json +0 -0
  143. /package/{drizzle → migrations/drizzle-tasks}/20260305203927_demonic_storm/migration.sql +0 -0
  144. /package/{drizzle → migrations/drizzle-tasks}/20260305203927_demonic_storm/snapshot.json +0 -0
  145. /package/{drizzle → migrations/drizzle-tasks}/20260306001243_spooky_rage/migration.sql +0 -0
  146. /package/{drizzle → migrations/drizzle-tasks}/20260306001243_spooky_rage/snapshot.json +0 -0
  147. /package/{drizzle → migrations/drizzle-tasks}/20260306193138_young_morbius/migration.sql +0 -0
  148. /package/{drizzle → migrations/drizzle-tasks}/20260306193138_young_morbius/snapshot.json +0 -0
  149. /package/{drizzle → migrations/drizzle-tasks}/20260306194959_sticky_captain_flint/migration.sql +0 -0
  150. /package/{drizzle → migrations/drizzle-tasks}/20260306194959_sticky_captain_flint/snapshot.json +0 -0
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "ct-skill-creator",
3
+ "version": "1.0.0",
4
+ "description": "Guide for creating effective CLEO skills with the full v2 standard.",
5
+ "path": "packages/ct-skills/skills/ct-skill-creator",
6
+ "status": "active",
7
+ "tier": 3,
8
+ "core": false,
9
+ "category": "meta",
10
+ "protocol": null,
11
+ "dependencies": [],
12
+ "sharedResources": [],
13
+ "compatibility": ["claude-code", "cursor", "windsurf", "gemini-cli"],
14
+ "token_budget": 12000,
15
+ "capabilities": ["skill-creation", "eval-loop", "description-optimization", "quality-eval"],
16
+ "constraints": ["requires-claude-api-for-eval-loop"]
17
+ }
@@ -0,0 +1,228 @@
1
+ # Dynamic Context Injection
2
+
3
+ Skills can inject dynamic runtime information into SKILL.md content before Claude sees it. Three mechanisms are available: shell pre-processing, argument substitution, and session variables.
4
+
5
+ ## Shell Pre-Processing
6
+
7
+ Embed shell command output directly into skill content using backtick-bang syntax.
8
+
9
+ **Syntax**: `` !`command` ``
10
+
11
+ The command runs before Claude sees the skill content. The entire `` !`command` `` expression is replaced with the command's stdout output.
12
+
13
+ **Examples**:
14
+
15
+ ```markdown
16
+ ## Current Repository State
17
+
18
+ Recent commits:
19
+ !`git log --oneline -5`
20
+
21
+ Current branch: !`git branch --show-current`
22
+
23
+ Last tag: !`git describe --tags --abbrev=0 2>/dev/null || echo "no tags"`
24
+ ```
25
+
26
+ After pre-processing, Claude sees:
27
+
28
+ ```markdown
29
+ ## Current Repository State
30
+
31
+ Recent commits:
32
+ a1b2c3d fix: resolve auth timeout
33
+ d4e5f6g feat: add user dashboard
34
+ 7h8i9j0 refactor: extract validation
35
+ k1l2m3n docs: update API reference
36
+ o4p5q6r test: add integration tests
37
+
38
+ Current branch: feature/user-dashboard
39
+
40
+ Last tag: v2.3.1
41
+ ```
42
+
43
+ **Complex commands** work as expected -- pipes, subshells, and multi-command expressions:
44
+
45
+ ```markdown
46
+ Node version: !`node --version`
47
+ Package name: !`cat package.json | python3 -c "import sys,json; print(json.load(sys.stdin)['name'])"`
48
+ File count: !`find src -name '*.ts' | wc -l`
49
+ ```
50
+
51
+ **Failure behavior**: If a command fails (non-zero exit code), the expression is replaced with an empty string. The skill still loads -- failed commands do not block skill execution. Use fallback patterns like `command || echo "fallback"` to handle expected failures gracefully:
52
+
53
+ ```markdown
54
+ Python version: !`python3 --version 2>/dev/null || echo "Python not installed"`
55
+ ```
56
+
57
+ ## Argument Substitution
58
+
59
+ When users invoke a skill with arguments (e.g., `/my-skill arg1 arg2`), the arguments are available through substitution variables in the skill body.
60
+
61
+ ### Full Argument String
62
+
63
+ `$ARGUMENTS` -- all arguments as a single string, exactly as the user typed them.
64
+
65
+ ```markdown
66
+ ## Task
67
+
68
+ Analyze the following: $ARGUMENTS
69
+ ```
70
+
71
+ If the user types `/analyze-code src/auth.ts --depth 3`, Claude sees:
72
+
73
+ ```markdown
74
+ ## Task
75
+
76
+ Analyze the following: src/auth.ts --depth 3
77
+ ```
78
+
79
+ ### Indexed Access
80
+
81
+ Access individual arguments by zero-based index:
82
+
83
+ | Variable | Equivalent | Value (for `/skill foo bar baz`) |
84
+ |---|---|---|
85
+ | `$ARGUMENTS[0]` | `$1` | `foo` |
86
+ | `$ARGUMENTS[1]` | `$2` | `bar` |
87
+ | `$ARGUMENTS[2]` | `$3` | `baz` |
88
+ | `$ARGUMENTS` | (all) | `foo bar baz` |
89
+
90
+ The `$1`, `$2`, `$3` shorthand forms are interchangeable with `$ARGUMENTS[0]`, `$ARGUMENTS[1]`, `$ARGUMENTS[2]`.
91
+
92
+ ### Worked Example
93
+
94
+ Given the invocation `/deploy-check production api-gateway`:
95
+
96
+ ```markdown
97
+ ## Deployment Check
98
+
99
+ **Environment**: $1
100
+ **Service**: $2
101
+
102
+ Run the following verification:
103
+
104
+ 1. Check that $ARGUMENTS[0] cluster is healthy
105
+ 2. Verify $ARGUMENTS[1] pods are running
106
+ 3. Full command context: deploying $ARGUMENTS
107
+ ```
108
+
109
+ Claude sees:
110
+
111
+ ```markdown
112
+ ## Deployment Check
113
+
114
+ **Environment**: production
115
+ **Service**: api-gateway
116
+
117
+ Run the following verification:
118
+
119
+ 1. Check that production cluster is healthy
120
+ 2. Verify api-gateway pods are running
121
+ 3. Full command context: deploying production api-gateway
122
+ ```
123
+
124
+ ### Missing Arguments
125
+
126
+ If a user provides fewer arguments than the skill references, unreferenced `$ARGUMENTS[N]` variables are replaced with empty strings. Design skills defensively by placing critical instructions outside of argument-dependent sections, or by documenting required arguments in `argument-hint`.
127
+
128
+ ## Session Variables
129
+
130
+ Two environment variables are available for runtime context:
131
+
132
+ ### CLAUDE_SESSION_ID
133
+
134
+ `${CLAUDE_SESSION_ID}` -- a unique identifier for the current Claude session. Useful for correlating logs, creating session-specific output files, or tracking work across multiple skill invocations within the same session.
135
+
136
+ ```markdown
137
+ ## Logging
138
+
139
+ Write analysis results to `/tmp/analysis-${CLAUDE_SESSION_ID}.json` for later review.
140
+ ```
141
+
142
+ ### CLAUDE_SKILL_DIR
143
+
144
+ `${CLAUDE_SKILL_DIR}` -- the absolute filesystem path to the skill's root directory. This is the directory containing SKILL.md.
145
+
146
+ This variable is critical for skills that bundle scripts, references, or assets. Without it, bundled scripts would need hardcoded absolute paths -- which break when the skill is installed in different locations (global vs. project, different providers, different machines).
147
+
148
+ **The portable bundled-script pattern**:
149
+
150
+ ```markdown
151
+ ## Analysis
152
+
153
+ Run the analysis script on the target file:
154
+
155
+ ```bash
156
+ python3 ${CLAUDE_SKILL_DIR}/scripts/analyze.py "$1"
157
+ ```
158
+ ```
159
+
160
+ This works regardless of where the skill is installed:
161
+ - Global install: `${CLAUDE_SKILL_DIR}` = `/home/user/.claude/skills/my-skill`
162
+ - Project install: `${CLAUDE_SKILL_DIR}` = `/projects/myapp/.claude/skills/my-skill`
163
+ - Symlinked: `${CLAUDE_SKILL_DIR}` resolves through the symlink to the actual directory
164
+
165
+ Without `${CLAUDE_SKILL_DIR}`, you would need to hardcode paths like `/home/user/.claude/skills/my-skill/scripts/analyze.py`, which breaks for every other user and installation location.
166
+
167
+ **Referencing bundled resources**:
168
+
169
+ ```markdown
170
+ For the full API schema, read: ${CLAUDE_SKILL_DIR}/references/api-schema.md
171
+
172
+ For brand assets, copy from: ${CLAUDE_SKILL_DIR}/assets/logo.png
173
+ ```
174
+
175
+ ## Combining All Features
176
+
177
+ A realistic skill body demonstrating all three injection mechanisms together:
178
+
179
+ ```markdown
180
+ ---
181
+ name: pr-review
182
+ description: "Automated pull request code review with project-aware analysis. Use when reviewing PRs, checking code quality, or preparing review comments."
183
+ argument-hint: "<pr-number>"
184
+ allowed-tools:
185
+ - Read
186
+ - Bash(gh pr *)
187
+ - Bash(git *)
188
+ ---
189
+
190
+ # PR Review
191
+
192
+ ## Project Context
193
+
194
+ **Repository**: !`git remote get-url origin | sed 's/.*github.com[:/]//' | sed 's/.git$//'`
195
+ **Default branch**: !`git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main"`
196
+ **Test framework**: !`[ -f vitest.config.ts ] && echo "Vitest" || ([ -f jest.config.js ] && echo "Jest" || echo "unknown")`
197
+
198
+ ## Review Target
199
+
200
+ Fetch and review PR #$1:
201
+
202
+ ```bash
203
+ gh pr diff $ARGUMENTS[0] > /tmp/pr-${CLAUDE_SESSION_ID}.diff
204
+ ```
205
+
206
+ ## Review Checklist
207
+
208
+ Load the project's review standards:
209
+
210
+ ```bash
211
+ cat ${CLAUDE_SKILL_DIR}/references/review-checklist.md
212
+ ```
213
+
214
+ Run the automated checks:
215
+
216
+ ```bash
217
+ python3 ${CLAUDE_SKILL_DIR}/scripts/lint_diff.py /tmp/pr-${CLAUDE_SESSION_ID}.diff
218
+ ```
219
+
220
+ ## Output
221
+
222
+ Write the review to `/tmp/review-$1-${CLAUDE_SESSION_ID}.md` using the template at `${CLAUDE_SKILL_DIR}/assets/review-template.md`.
223
+ ```
224
+
225
+ In this example:
226
+ - **Shell pre-processing** (`!`...``) injects the repository name, default branch, and test framework at load time
227
+ - **Argument substitution** (`$1`, `$ARGUMENTS[0]`) passes the PR number into commands and filenames
228
+ - **Session variables** (`${CLAUDE_SESSION_ID}`, `${CLAUDE_SKILL_DIR}`) create unique temp files and locate bundled scripts portably
@@ -0,0 +1,83 @@
1
+ # SKILL.md Frontmatter Schema
2
+
3
+ ## Required Fields
4
+
5
+ ```yaml
6
+ name: string # hyphen-case, max 64 chars, must match directory name
7
+ description: string # max 1024 chars, no < or >, use quoted strings not >-/| multiline
8
+ ```
9
+
10
+ ## Optional Fields
11
+
12
+ ```yaml
13
+ argument-hint: string # max 100 chars; shown in /name autocomplete
14
+ disable-model-invocation: bool # true = user-only invoke; description removed from context
15
+ user-invocable: bool # false = hidden from /menu; Claude still sees description
16
+ allowed-tools: string | list # pre-approved tools; Bash(pattern) for restricted bash
17
+ model: string # model ID override for this skill
18
+ context: "fork" # isolated subagent; no conversation history
19
+ agent: string # Explore | Plan | general-purpose | <custom>
20
+ hooks: dict # PreToolUse | PostToolUse | Stop handlers
21
+ license: string # e.g. MIT
22
+ ```
23
+
24
+ ## FORBIDDEN in SKILL.md (belongs in manifest.json)
25
+
26
+ ```
27
+ version, tier, core, category, protocol, dependencies, sharedResources,
28
+ compatibility, token_budget, capabilities, constraints, metadata, tags, triggers
29
+ ```
30
+
31
+ ## Copy-Paste Template
32
+
33
+ ```yaml
34
+ ---
35
+ name: skill-name
36
+ description: "What this skill does and WHEN to use it. Max 1024 chars. Third person."
37
+ # argument-hint: "[optional-arg]"
38
+ # disable-model-invocation: true
39
+ # user-invocable: false
40
+ # allowed-tools: Read, Grep, Glob
41
+ # model: claude-sonnet-4-6
42
+ # context: fork
43
+ # agent: Explore
44
+ # hooks:
45
+ # PreToolUse:
46
+ # - matcher: Bash
47
+ # command: "echo 'invoked' >> /tmp/audit.log"
48
+ # license: MIT
49
+ ---
50
+ ```
51
+
52
+ ## Invocation Matrix
53
+
54
+ | Config | User /slash | Claude auto | Description in ctx |
55
+ |--------|------------|-------------|-------------------|
56
+ | (default) | Yes | Yes | Yes |
57
+ | `disable-model-invocation: true` | Yes | No | No |
58
+ | `user-invocable: false` | No | Yes | Yes |
59
+ | Both above | No | No | No |
60
+
61
+ ## YAML Pitfalls
62
+
63
+ **Use quoted strings for description** — `>-` and `|` fold/preserve newlines unexpectedly:
64
+ ```yaml
65
+ # BAD
66
+ description: >-
67
+ Deploy applications to staging
68
+ with pre-flight checks.
69
+
70
+ # GOOD
71
+ description: "Deploy applications to staging with pre-flight checks."
72
+ ```
73
+
74
+ **Booleans must be unquoted:**
75
+ ```yaml
76
+ disable-model-invocation: true # correct
77
+ disable-model-invocation: "true" # wrong — this is a string
78
+ ```
79
+
80
+ **Quote strings with special chars** (`:` followed by space, `#`, `>`):
81
+ ```yaml
82
+ description: "Note: handles edge cases" # needs quotes due to colon
83
+ ```
@@ -0,0 +1,165 @@
1
+ # Invocation Control
2
+
3
+ This reference covers how to control when and how skills are triggered, including the interaction between `disable-model-invocation`, `user-invocable`, `allowed-tools`, and context budgets.
4
+
5
+ ## Invocation Matrix
6
+
7
+ The combination of `disable-model-invocation` and `user-invocable` determines how a skill can be triggered:
8
+
9
+ | Frontmatter | User `/slash` invoke | Claude auto-trigger | Description in context | Body loaded |
10
+ |---|---|---|---|---|
11
+ | (defaults -- neither set) | Yes | Yes | Always | When invoked |
12
+ | `disable-model-invocation: true` | Yes | No | Never | When user invokes |
13
+ | `user-invocable: false` | No | Yes | Always | When Claude auto-triggers |
14
+ | Both set (`true` + `false`) | Error | Error | -- | Invalid combination |
15
+
16
+ Key observations:
17
+ - **Default behavior** is the most common: the skill appears in the slash menu, Claude can auto-trigger it, and the description is always in context for trigger evaluation.
18
+ - `disable-model-invocation: true` completely hides the skill from Claude. It cannot see the description, cannot reason about it, and cannot trigger it.
19
+ - `user-invocable: false` removes the slash command but keeps the description visible to Claude, allowing autonomous triggering.
20
+ - Setting both is contradictory (hidden from users AND hidden from Claude) and should not be done.
21
+
22
+ ## disable-model-invocation: true
23
+
24
+ Use this for skills that perform side effects requiring explicit user intent. When set, the skill's description is removed from Claude's context entirely -- Claude does not know the skill exists.
25
+
26
+ **When to use**:
27
+ - Deployment workflows (staging, production pushes)
28
+ - Git operations with external effects (force push, tag creation)
29
+ - Communication actions (sending emails, Slack messages, creating PRs)
30
+ - Database mutations (migrations, data backfixes)
31
+ - Billing or payment operations
32
+ - Any destructive or hard-to-reverse operation
33
+
34
+ **Example**:
35
+
36
+ ```yaml
37
+ ---
38
+ name: deploy-production
39
+ description: "Deploy the current branch to production with rolling updates, health checks, and automatic rollback on failure. Use for production deployments only."
40
+ disable-model-invocation: true
41
+ argument-hint: "<service-name> [--canary] [--skip-tests]"
42
+ allowed-tools:
43
+ - Bash(kubectl *)
44
+ - Bash(helm *)
45
+ ---
46
+ ```
47
+
48
+ The user must explicitly type `/deploy-production api-gateway` to trigger this skill. Claude will never suggest or auto-trigger it, because Claude cannot see that it exists.
49
+
50
+ ## user-invocable: false
51
+
52
+ Use this for background knowledge that Claude should apply autonomously. The skill has no slash command, but Claude reads the description and auto-loads the body when the conversation context matches.
53
+
54
+ **When to use**:
55
+ - Project coding standards and conventions
56
+ - API schemas and domain models that inform code generation
57
+ - Style guides that should be applied to all generated content
58
+ - Security policies and compliance rules
59
+ - Architecture patterns specific to the project
60
+
61
+ **Example**:
62
+
63
+ ```yaml
64
+ ---
65
+ name: project-conventions
66
+ description: "Project coding conventions including naming standards, import ordering, error handling patterns, and test structure. Apply these conventions when generating or modifying code in this project."
67
+ user-invocable: false
68
+ ---
69
+ ```
70
+
71
+ Claude sees the description, recognizes that a code generation task matches, and loads the skill body automatically. No `/project-conventions` slash command exists.
72
+
73
+ ## allowed-tools
74
+
75
+ Pre-approves specific tools for use during skill execution, bypassing per-use permission prompts. Reduces friction without giving blanket permissions.
76
+
77
+ ### String Format
78
+
79
+ Comma-separated list of tool names:
80
+
81
+ ```yaml
82
+ allowed-tools: "Read, Write, Edit, Bash(python3 *)"
83
+ ```
84
+
85
+ ### List Format
86
+
87
+ YAML list for clearer multi-tool specifications:
88
+
89
+ ```yaml
90
+ allowed-tools:
91
+ - Read
92
+ - Write
93
+ - Edit
94
+ - Grep
95
+ - Glob
96
+ - Bash(npm test *)
97
+ - Bash(npx vitest *)
98
+ ```
99
+
100
+ ### Bash Pattern Restriction
101
+
102
+ `Bash(pattern)` pre-approves only bash commands matching the glob pattern. The pattern is matched against the full command string.
103
+
104
+ ```yaml
105
+ # Only allow git and npm commands
106
+ allowed-tools:
107
+ - Bash(git *)
108
+ - Bash(npm *)
109
+
110
+ # Only allow Python scripts in the skill's scripts directory
111
+ allowed-tools:
112
+ - Bash(python3 ${CLAUDE_SKILL_DIR}/scripts/*)
113
+ ```
114
+
115
+ Without a pattern, bare `Bash` pre-approves all bash commands -- use with caution.
116
+
117
+ ## Context Budget
118
+
119
+ Skills consume context window space at two levels, and understanding the budget is critical for designing skills that coexist well.
120
+
121
+ ### Description Budget
122
+
123
+ Every trigger-eligible skill's `description` field is loaded into Claude's context at all times. Each description consumes roughly 100-200 tokens. With 15 skills, that is 1,500-3,000 tokens of always-on context.
124
+
125
+ Implication: keep descriptions concise and trigger-focused. Every word costs tokens across every single conversation.
126
+
127
+ ### Body Budget
128
+
129
+ When a skill is triggered, its body (everything below the frontmatter) is loaded into context. The body is capped at 2% of the context window, which is approximately 16,000 characters by default.
130
+
131
+ This cap can be overridden via the `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable:
132
+
133
+ ```bash
134
+ # Increase body budget to 32k chars
135
+ export SLASH_COMMAND_TOOL_CHAR_BUDGET=32000
136
+ ```
137
+
138
+ **Practical limit**: keep skill bodies under 500 lines. Use the progressive disclosure pattern -- put core workflow in SKILL.md and detailed reference material in `references/` files that Claude loads on demand.
139
+
140
+ ### Budget-Aware Design
141
+
142
+ ```
143
+ Always loaded (~200 tokens each):
144
+ skill-1 description
145
+ skill-2 description
146
+ ...
147
+ skill-N description
148
+
149
+ Loaded on trigger (~2% of context):
150
+ SKILL.md body
151
+
152
+ Loaded on demand (no fixed limit):
153
+ references/detail-a.md
154
+ references/detail-b.md
155
+ scripts/tool.py (executed, not loaded)
156
+ ```
157
+
158
+ ## Skill Types Summary
159
+
160
+ | Type | Frontmatter | Use Case |
161
+ |---|---|---|
162
+ | **Task** | (defaults) | Interactive workflows users invoke by name -- code analysis, deployment, file processing |
163
+ | **Background** | `user-invocable: false` | Domain knowledge Claude applies autonomously -- coding standards, schemas, policies |
164
+ | **Protected** | `disable-model-invocation: true` | Side-effect workflows requiring explicit user intent -- deploys, sends, mutations |
165
+ | **Subagent** | `context: fork` | Self-contained tasks that run in isolation -- research, analysis, generation from scratch |
@@ -0,0 +1,175 @@
1
+ # Provider Deployment
2
+
3
+ This reference covers multi-provider skill deployment: where each provider reads skills from, how symlinks enable a single source of truth, and how to add new skills to the CLEO ct-skills package.
4
+
5
+ ## Architecture
6
+
7
+ Skills follow a single-source-of-truth model:
8
+
9
+ ```
10
+ packages/ct-skills/skills/ <-- canonical location
11
+ ct-cleo/SKILL.md
12
+ ct-orchestrator/SKILL.md
13
+ ct-skill-creator/SKILL.md
14
+ ...
15
+ manifest.json <-- CLEO-only metadata
16
+ ```
17
+
18
+ Providers read skills from their own vendor-specific directories. Symlinks point from each provider's skill directory back to the canonical location, so a single SKILL.md serves all providers.
19
+
20
+ **SKILL.md** is the open standard -- every provider reads it. It contains only the 11 standard v2 fields (name, description, etc.) that all providers understand.
21
+
22
+ **manifest.json** is CLEO-only metadata -- tier, tags, capabilities, dispatch routing. Non-CLEO providers ignore it entirely. This is why CLEO-specific fields must never appear in SKILL.md: providers that do not understand them may reject the skill or behave unpredictably.
23
+
24
+ ## Provider Path Table
25
+
26
+ | Provider | Global Skills Path | Project Skills Path | Symlinks |
27
+ |---|---|---|---|
28
+ | claude-code | `$HOME/.claude/skills` | `.claude/skills` | Yes |
29
+ | codex-cli | `$HOME/.agents/skills` | `.agents/skills` | Yes |
30
+ | gemini-cli | `$HOME/.gemini/skills` | `.gemini/skills` | Yes |
31
+ | cursor | `$HOME/.cursor/skills` | `.cursor/skills` | Yes |
32
+ | github-copilot | `$HOME/.copilot/skills` | `.github/skills` | Yes |
33
+ | windsurf | `$HOME/.codeium/windsurf/skills` | `.windsurf/skills` | No |
34
+ | opencode | `$HOME/.config/opencode/skills` | `.opencode/skills` | Yes |
35
+ | kimi-coding | `$HOME/.kimi/skills` | `.kimi/skills` | No |
36
+ | antigravity | `$HOME/.antigravity/skills` | `.agent/skills` | Yes |
37
+
38
+ **Global skills** are available across all projects for that provider. **Project skills** are scoped to the repository they live in.
39
+
40
+ **Symlink support** indicates whether the provider follows symbolic links when reading skill directories. Providers without symlink support (windsurf, kimi-coding) require the skill directory to be copied rather than symlinked.
41
+
42
+ ## What Providers Read
43
+
44
+ ### Standard Providers (non-CLEO)
45
+
46
+ Standard providers read SKILL.md only. They parse the YAML frontmatter for standard v2 fields and load the markdown body when the skill triggers. They have no awareness of manifest.json, dispatch-config.json, or any CLEO infrastructure.
47
+
48
+ Fields they understand: `name`, `description`, `argument-hint`, `disable-model-invocation`, `user-invocable`, `allowed-tools`, `model`, `context`, `agent`, `hooks`, `license`.
49
+
50
+ Fields they do not understand: `version`, `tier`, `core`, `category`, `protocol`, `dependencies`, `sharedResources`, `compatibility`, `tags`, `triggers`, `token_budget`, `capabilities`, `constraints`, `metadata`.
51
+
52
+ ### CLEO-Aware Providers
53
+
54
+ CLEO-aware providers read both SKILL.md and manifest.json. The manifest provides dispatch routing, tier-based loading priorities, token budgets, and capability declarations that enable advanced features like skill chaining and orchestration.
55
+
56
+ ## Deployment Strategies
57
+
58
+ ### CLEO Package Skills
59
+
60
+ Skills in `packages/ct-skills/skills/` are managed by CLEO infrastructure. They are deployed via the CLEO skill system and do not need manual symlink setup. The manifest.json, dispatch-config.json, and provider-skills-map.json coordinate deployment automatically.
61
+
62
+ ### User Global Skills
63
+
64
+ For standalone skills installed directly into a provider's global skill directory:
65
+
66
+ ```bash
67
+ # Claude Code
68
+ cp -r my-skill/ ~/.claude/skills/my-skill/
69
+
70
+ # Gemini CLI
71
+ cp -r my-skill/ ~/.gemini/skills/my-skill/
72
+
73
+ # Codex CLI
74
+ cp -r my-skill/ ~/.agents/skills/my-skill/
75
+ ```
76
+
77
+ ### Multi-Provider via Symlinks
78
+
79
+ For skills that should be available across multiple providers, create the skill in one location and symlink to each provider's directory:
80
+
81
+ ```bash
82
+ # Canonical location
83
+ mkdir -p ~/shared-skills/my-skill
84
+ # ... create SKILL.md and resources in ~/shared-skills/my-skill/
85
+
86
+ # Symlink to each provider
87
+ ln -s ~/shared-skills/my-skill ~/.claude/skills/my-skill
88
+ ln -s ~/shared-skills/my-skill ~/.gemini/skills/my-skill
89
+ ln -s ~/shared-skills/my-skill ~/.agents/skills/my-skill
90
+ ```
91
+
92
+ For providers that do not support symlinks (windsurf, kimi-coding), copy the directory instead:
93
+
94
+ ```bash
95
+ cp -r ~/shared-skills/my-skill ~/.codeium/windsurf/skills/my-skill
96
+ cp -r ~/shared-skills/my-skill ~/.kimi/skills/my-skill
97
+ ```
98
+
99
+ ### Project-Level Skills
100
+
101
+ Place the skill directory inside the project's provider-specific skill path:
102
+
103
+ ```bash
104
+ # Claude Code project skill
105
+ cp -r my-skill/ .claude/skills/my-skill/
106
+
107
+ # Cursor project skill
108
+ cp -r my-skill/ .cursor/skills/my-skill/
109
+ ```
110
+
111
+ Project skills are committed to the repository and shared with all contributors.
112
+
113
+ ## Adding a New Skill to CLEO ct-skills
114
+
115
+ To add a new skill to the CLEO package (`packages/ct-skills/`):
116
+
117
+ 1. **Create the skill directory**:
118
+ ```bash
119
+ mkdir -p packages/ct-skills/skills/my-new-skill
120
+ ```
121
+
122
+ 2. **Write SKILL.md with standard fields only**:
123
+ ```yaml
124
+ ---
125
+ name: my-new-skill
126
+ description: "Clear description of what the skill does and when to use it."
127
+ license: MIT
128
+ ---
129
+ # My New Skill
130
+
131
+ Instructions for using the skill...
132
+ ```
133
+ Include only v2 standard fields. No `version`, `tier`, `category`, or other CLEO-only fields.
134
+
135
+ 3. **Add entry to manifest.json** (`packages/ct-skills/skills/manifest.json`):
136
+ ```json
137
+ {
138
+ "name": "my-new-skill",
139
+ "version": "1.0.0",
140
+ "description": "Same description as SKILL.md",
141
+ "path": "skills/my-new-skill",
142
+ "tags": ["relevant", "tags"],
143
+ "status": "active",
144
+ "tier": 2,
145
+ "token_budget": 6000,
146
+ "references": [],
147
+ "capabilities": {
148
+ "inputs": [],
149
+ "outputs": [],
150
+ "dependencies": [],
151
+ "dispatch_triggers": ["trigger phrase"],
152
+ "compatible_subagent_types": ["general-purpose"],
153
+ "chains_to": [],
154
+ "dispatch_keywords": {
155
+ "primary": ["keyword1", "keyword2"],
156
+ "secondary": ["keyword3", "keyword4"]
157
+ }
158
+ },
159
+ "constraints": {
160
+ "max_context_tokens": 60000,
161
+ "requires_session": false,
162
+ "requires_epic": false
163
+ }
164
+ }
165
+ ```
166
+
167
+ 4. **Add entry to dispatch-config.json** (`packages/ct-skills/dispatch-config.json`):
168
+ Add the skill to relevant `by_task_type`, `by_keyword`, and/or `by_protocol` mappings if it should participate in dispatch routing.
169
+
170
+ 5. **Update totalSkills** in manifest.json `_meta.totalSkills` to reflect the new count.
171
+
172
+ 6. **Validate**: Run the skill validator to confirm the new skill passes all checks:
173
+ ```bash
174
+ python3 packages/ct-skills/skills/ct-skill-creator/scripts/quick_validate.py packages/ct-skills/skills/my-new-skill
175
+ ```