oh-my-codex-cli 0.1.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 (292) hide show
  1. package/.agent/skills/agent-kb/HOW_TO_USE.md +428 -0
  2. package/.agent/skills/agent-kb/README.md +46 -0
  3. package/.agent/skills/agent-kb/SKILL.md +128 -0
  4. package/.agent/skills/agent-kb/references/intelligent-analysis-explained.md +333 -0
  5. package/.agent/skills/agent-kb/references/query-optimization.md +225 -0
  6. package/.agent/skills/aireview/SKILL.md +704 -0
  7. package/.agent/skills/analyze/SKILL.md +81 -0
  8. package/.agent/skills/architect-planner/HOW_TO_USE.md +238 -0
  9. package/.agent/skills/architect-planner/README.md +41 -0
  10. package/.agent/skills/architect-planner/SKILL.md +539 -0
  11. package/.agent/skills/auto-mbti/SKILL.md +291 -0
  12. package/.agent/skills/autopilot/SKILL.md +222 -0
  13. package/.agent/skills/backend-patterns/SKILL.md +602 -0
  14. package/.agent/skills/bdd-generator/README.md +78 -0
  15. package/.agent/skills/bdd-generator/SKILL.md +436 -0
  16. package/.agent/skills/brainstorming/HOW_TO_USE.md +289 -0
  17. package/.agent/skills/brainstorming/README.md +41 -0
  18. package/.agent/skills/brainstorming/SKILL.md +165 -0
  19. package/.agent/skills/build-fix/SKILL.md +190 -0
  20. package/.agent/skills/cancel/SKILL.md +658 -0
  21. package/.agent/skills/checkpoint/SKILL.md +94 -0
  22. package/.agent/skills/code-review/SKILL.md +273 -0
  23. package/.agent/skills/coding-standards/SKILL.md +535 -0
  24. package/.agent/skills/conductor/SKILL.md +128 -0
  25. package/.agent/skills/conductor/commands/conductor/implement.toml +358 -0
  26. package/.agent/skills/conductor/commands/conductor/newTrack.toml +142 -0
  27. package/.agent/skills/conductor/commands/conductor/revert.toml +123 -0
  28. package/.agent/skills/conductor/commands/conductor/setup.toml +429 -0
  29. package/.agent/skills/conductor/commands/conductor/status.toml +57 -0
  30. package/.agent/skills/conductor/scripts/install.sh +89 -0
  31. package/.agent/skills/conductor/templates/code_styleguides/csharp.md +115 -0
  32. package/.agent/skills/conductor/templates/code_styleguides/dart.md +238 -0
  33. package/.agent/skills/conductor/templates/code_styleguides/general.md +23 -0
  34. package/.agent/skills/conductor/templates/code_styleguides/go.md +48 -0
  35. package/.agent/skills/conductor/templates/code_styleguides/html-css.md +49 -0
  36. package/.agent/skills/conductor/templates/code_styleguides/javascript.md +51 -0
  37. package/.agent/skills/conductor/templates/code_styleguides/python.md +37 -0
  38. package/.agent/skills/conductor/templates/code_styleguides/typescript.md +43 -0
  39. package/.agent/skills/conductor/templates/rules/README.md +23 -0
  40. package/.agent/skills/conductor/templates/rules/agents.md +49 -0
  41. package/.agent/skills/conductor/templates/rules/coding-style.md +70 -0
  42. package/.agent/skills/conductor/templates/rules/dev.md +20 -0
  43. package/.agent/skills/conductor/templates/rules/git-workflow.md +45 -0
  44. package/.agent/skills/conductor/templates/rules/hooks.md +6 -0
  45. package/.agent/skills/conductor/templates/rules/patterns.md +55 -0
  46. package/.agent/skills/conductor/templates/rules/performance.md +47 -0
  47. package/.agent/skills/conductor/templates/rules/research.md +26 -0
  48. package/.agent/skills/conductor/templates/rules/review.md +22 -0
  49. package/.agent/skills/conductor/templates/rules/security.md +36 -0
  50. package/.agent/skills/conductor/templates/rules/testing.md +30 -0
  51. package/.agent/skills/conductor/templates/workflow.md +333 -0
  52. package/.agent/skills/consensus/HOW_TO_USE.md +191 -0
  53. package/.agent/skills/consensus/README.md +41 -0
  54. package/.agent/skills/consensus/SKILL.md +317 -0
  55. package/.agent/skills/content-research-writer/SKILL.md +537 -0
  56. package/.agent/skills/debug-analysis/SKILL.md +331 -0
  57. package/.agent/skills/deepinit/SKILL.md +347 -0
  58. package/.agent/skills/deepsearch/SKILL.md +56 -0
  59. package/.agent/skills/doctor/SKILL.md +158 -0
  60. package/.agent/skills/drawio/EXAMPLES.md +382 -0
  61. package/.agent/skills/drawio/QUICK_START.md +237 -0
  62. package/.agent/skills/drawio/README.md +315 -0
  63. package/.agent/skills/drawio/SETUP_GUIDE.md +254 -0
  64. package/.agent/skills/drawio/SKILL.md +1176 -0
  65. package/.agent/skills/e2e/SKILL.md +396 -0
  66. package/.agent/skills/ecomode/SKILL.md +160 -0
  67. package/.agent/skills/electron-driver/SKILL.md +144 -0
  68. package/.agent/skills/electron-driver/scripts/driver-template.js +71 -0
  69. package/.agent/skills/eval/SKILL.md +140 -0
  70. package/.agent/skills/eval-harness/SKILL.md +242 -0
  71. package/.agent/skills/evolve/SKILL.md +213 -0
  72. package/.agent/skills/frontend-design/SKILL.md +42 -0
  73. package/.agent/skills/frontend-patterns/SKILL.md +646 -0
  74. package/.agent/skills/frontend-ui-ux/SKILL.md +70 -0
  75. package/.agent/skills/git-master/SKILL.md +75 -0
  76. package/.agent/skills/help/SKILL.md +89 -0
  77. package/.agent/skills/iterative-retrieval/SKILL.md +217 -0
  78. package/.agent/skills/local-skills-setup/SKILL.md +483 -0
  79. package/.agent/skills/log-analyzer/SKILL.md +187 -0
  80. package/.agent/skills/mcp-setup/SKILL.md +226 -0
  81. package/.agent/skills/multi-model-research/HOW_TO_USE.md +614 -0
  82. package/.agent/skills/multi-model-research/README.md +233 -0
  83. package/.agent/skills/multi-model-research/SKILL.md +541 -0
  84. package/.agent/skills/multi-model-research/references/troubleshooting.md +415 -0
  85. package/.agent/skills/note/SKILL.md +80 -0
  86. package/.agent/skills/omc-setup/SKILL.md +219 -0
  87. package/.agent/skills/orchestrate/SKILL.md +620 -0
  88. package/.agent/skills/patent-workflow/IMPLEMENTATION_SUMMARY.md +500 -0
  89. package/.agent/skills/patent-workflow/README.md +455 -0
  90. package/.agent/skills/patent-workflow/SKILL.md +1036 -0
  91. package/.agent/skills/patent-workflow/tools/irr_checker.py +260 -0
  92. package/.agent/skills/patent-workflow/tools/sample_terminology.json +49 -0
  93. package/.agent/skills/patent-workflow/tools/term_checker.py +355 -0
  94. package/.agent/skills/pattern-recognition/SKILL.md +792 -0
  95. package/.agent/skills/pipeline/SKILL.md +448 -0
  96. package/.agent/skills/plan/SKILL.md +309 -0
  97. package/.agent/skills/planning-methodology/SKILL.md +370 -0
  98. package/.agent/skills/planning-with-files/SKILL.md +210 -0
  99. package/.agent/skills/planning-with-files/examples.md +202 -0
  100. package/.agent/skills/planning-with-files/reference.md +218 -0
  101. package/.agent/skills/planning-with-files/scripts/check-complete.ps1 +42 -0
  102. package/.agent/skills/planning-with-files/scripts/check-complete.sh +44 -0
  103. package/.agent/skills/planning-with-files/scripts/init-session.ps1 +120 -0
  104. package/.agent/skills/planning-with-files/scripts/init-session.sh +120 -0
  105. package/.agent/skills/planning-with-files/scripts/session-catchup.py +208 -0
  106. package/.agent/skills/planning-with-files/templates/findings.md +95 -0
  107. package/.agent/skills/planning-with-files/templates/progress.md +114 -0
  108. package/.agent/skills/planning-with-files/templates/task_plan.md +132 -0
  109. package/.agent/skills/project-analyze/CLAUDE.md +18 -0
  110. package/.agent/skills/project-analyze/HOW_TO_USE.md +145 -0
  111. package/.agent/skills/project-analyze/README.md +42 -0
  112. package/.agent/skills/project-analyze/SKILL.md +289 -0
  113. package/.agent/skills/project-analyze/SKILL.md.backup +287 -0
  114. package/.agent/skills/project-analyze/SKILL.md.backup_20260105_093646 +287 -0
  115. package/.agent/skills/project-analyze/assets/analysis-report-template.md +433 -0
  116. package/.agent/skills/project-analyze/references/analysis-patterns.md +422 -0
  117. package/.agent/skills/project-analyze/references/projectmind-explained.md +535 -0
  118. package/.agent/skills/project-session-manager/SKILL.md +428 -0
  119. package/.agent/skills/project-session-manager/lib/config.sh +86 -0
  120. package/.agent/skills/project-session-manager/lib/parse.sh +121 -0
  121. package/.agent/skills/project-session-manager/lib/session.sh +132 -0
  122. package/.agent/skills/project-session-manager/lib/tmux.sh +103 -0
  123. package/.agent/skills/project-session-manager/lib/worktree.sh +171 -0
  124. package/.agent/skills/project-session-manager/psm.sh +629 -0
  125. package/.agent/skills/project-session-manager/templates/feature.md +56 -0
  126. package/.agent/skills/project-session-manager/templates/issue-fix.md +57 -0
  127. package/.agent/skills/project-session-manager/templates/pr-review.md +65 -0
  128. package/.agent/skills/project-session-manager/templates/projects.json +19 -0
  129. package/.agent/skills/quality-check/HOW_TO_USE.md +171 -0
  130. package/.agent/skills/quality-check/README.md +50 -0
  131. package/.agent/skills/quality-check/SKILL.md +240 -0
  132. package/.agent/skills/quality-check/SKILL.md.backup +238 -0
  133. package/.agent/skills/quality-check/SKILL.md.backup_20260105_093646 +238 -0
  134. package/.agent/skills/quality-check/assets/quality-report-template.md +437 -0
  135. package/.agent/skills/quality-check/references/refactoring-patterns.md +550 -0
  136. package/.agent/skills/quality-check/references/scoring-criteria.md +454 -0
  137. package/.agent/skills/quality-validation/SKILL.md +519 -0
  138. package/.agent/skills/quality-validation/SKILL.md.backup +573 -0
  139. package/.agent/skills/quality-validation/SKILL.md.backup_20260105_093646 +573 -0
  140. package/.agent/skills/ralph/SKILL.md +236 -0
  141. package/.agent/skills/ralph-init/SKILL.md +78 -0
  142. package/.agent/skills/ralplan/SKILL.md +58 -0
  143. package/.agent/skills/refactor-clean/SKILL.md +49 -0
  144. package/.agent/skills/release/SKILL.md +84 -0
  145. package/.agent/skills/research/SKILL.md +526 -0
  146. package/.agent/skills/research-methodology/SKILL.md +268 -0
  147. package/.agent/skills/review/SKILL.md +53 -0
  148. package/.agent/skills/security-review/SKILL.md +509 -0
  149. package/.agent/skills/security-review/cloud-infrastructure-security.md +361 -0
  150. package/.agent/skills/setup-pm/SKILL.md +102 -0
  151. package/.agent/skills/skill/SKILL.md +424 -0
  152. package/.agent/skills/skill-create/SKILL.md +209 -0
  153. package/.agent/skills/skill-debugger/HOW_TO_USE.md +244 -0
  154. package/.agent/skills/skill-debugger/README.md +44 -0
  155. package/.agent/skills/skill-debugger/SKILL.md +326 -0
  156. package/.agent/skills/skill-debugger/diagnostic_checklist.md +115 -0
  157. package/.agent/skills/skill-development/SKILL.md +661 -0
  158. package/.agent/skills/skill-development/references/skill-creator-original.md +209 -0
  159. package/.agent/skills/skill-doc-generator/README.md +37 -0
  160. package/.agent/skills/skill-doc-generator/SKILL.md +331 -0
  161. package/.agent/skills/skill-quality-analyzer/HOW_TO_USE.md +243 -0
  162. package/.agent/skills/skill-quality-analyzer/README.md +61 -0
  163. package/.agent/skills/skill-quality-analyzer/SKILL.md +247 -0
  164. package/.agent/skills/skill-quality-analyzer/analyzer.py +209 -0
  165. package/.agent/skills/skill-quality-analyzer/expected_output.json +81 -0
  166. package/.agent/skills/skill-quality-analyzer/sample_input.json +9 -0
  167. package/.agent/skills/skill-tester/README.md +46 -0
  168. package/.agent/skills/skill-tester/SKILL.md +345 -0
  169. package/.agent/skills/start-dev/SKILL.md +701 -0
  170. package/.agent/skills/swarm/SKILL.md +691 -0
  171. package/.agent/skills/task-kb-lookup/SKILL.md +211 -0
  172. package/.agent/skills/task-kb-record/SKILL.md +417 -0
  173. package/.agent/skills/tdd/SKILL.md +446 -0
  174. package/.agent/skills/tdd-generator/DEMO.md +516 -0
  175. package/.agent/skills/tdd-generator/README.md +89 -0
  176. package/.agent/skills/tdd-generator/SKILL.md +278 -0
  177. package/.agent/skills/tdd-workflow/SKILL.md +424 -0
  178. package/.agent/skills/test-coverage/SKILL.md +48 -0
  179. package/.agent/skills/thinkdeep/HOW_TO_USE.md +183 -0
  180. package/.agent/skills/thinkdeep/README.md +41 -0
  181. package/.agent/skills/thinkdeep/SKILL.md +343 -0
  182. package/.agent/skills/ui-ux-pro-max/SKILL.md +228 -0
  183. package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
  184. package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
  185. package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
  186. package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
  187. package/.agent/skills/ui-ux-pro-max/data/prompts.csv +24 -0
  188. package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  189. package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  190. package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  191. package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  192. package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  193. package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  194. package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  195. package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  196. package/.agent/skills/ui-ux-pro-max/data/styles.csv +59 -0
  197. package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
  198. package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  199. package/.agent/skills/ui-ux-pro-max/scripts/core.py +236 -0
  200. package/.agent/skills/ui-ux-pro-max/scripts/search.py +61 -0
  201. package/.agent/skills/ultrapilot/SKILL.md +647 -0
  202. package/.agent/skills/ultraqa/SKILL.md +152 -0
  203. package/.agent/skills/ultrawork/SKILL.md +123 -0
  204. package/.agent/skills/update-codemaps/SKILL.md +38 -0
  205. package/.agent/skills/update-docs/SKILL.md +52 -0
  206. package/.agent/skills/verification-loop/SKILL.md +140 -0
  207. package/.agent/skills/verify/SKILL.md +80 -0
  208. package/.agent/skills/writer-memory/SKILL.md +459 -0
  209. package/.agent/skills/writer-memory/lib/character-tracker.ts +338 -0
  210. package/.agent/skills/writer-memory/lib/memory-manager.ts +804 -0
  211. package/.agent/skills/writer-memory/lib/relationship-graph.ts +400 -0
  212. package/.agent/skills/writer-memory/lib/scene-organizer.ts +544 -0
  213. package/.agent/skills/writer-memory/lib/synopsis-builder.ts +339 -0
  214. package/.agent/skills/writer-memory/templates/synopsis-template.md +46 -0
  215. package/.governance/skill-lint.allowlist +4 -0
  216. package/.governance/skill-llm.allowlist +4 -0
  217. package/AGENTS.md +59 -0
  218. package/LICENSE +21 -0
  219. package/README.md +169 -0
  220. package/README.zh.md +145 -0
  221. package/bin/omcodex.js +8 -0
  222. package/commands/conductor/implement.toml +358 -0
  223. package/commands/conductor/newTrack.toml +142 -0
  224. package/commands/conductor/revert.toml +123 -0
  225. package/commands/conductor/setup.toml +429 -0
  226. package/commands/conductor/status.toml +57 -0
  227. package/docs/ALIGNMENT.md +40 -0
  228. package/docs/CODEX.md +133 -0
  229. package/docs/NOTIFY.md +81 -0
  230. package/docs/SKILL_GOVERNANCE.md +72 -0
  231. package/docs/SKILL_GOVERNANCE_FRAMEWORK.md +182 -0
  232. package/docs/SKILL_GOVERNANCE_FRAMEWORK.zh.md +170 -0
  233. package/package.json +50 -0
  234. package/prompts/architect.md +105 -0
  235. package/prompts/executor.md +134 -0
  236. package/prompts/planner.md +113 -0
  237. package/scripts/check-skill-governance.sh +84 -0
  238. package/scripts/check-skill-llm-governance.js +302 -0
  239. package/scripts/eval-skills.js +217 -0
  240. package/scripts/generate-catalog-docs.js +95 -0
  241. package/scripts/generate-codex-mcp-config.sh +22 -0
  242. package/scripts/install-codex-force.sh +5 -0
  243. package/scripts/install-codex-incremental.sh +5 -0
  244. package/scripts/install-codex.sh +79 -0
  245. package/scripts/notify-dispatch.js +15 -0
  246. package/scripts/setup-package-manager.js +137 -0
  247. package/src/catalog/generated/public-catalog.json +547 -0
  248. package/src/catalog/manifest.json +542 -0
  249. package/src/catalog/reader.js +43 -0
  250. package/src/catalog/schema.js +79 -0
  251. package/src/cli/doctor.js +62 -0
  252. package/src/cli/index.js +85 -0
  253. package/src/cli/notify.js +127 -0
  254. package/src/cli/route.js +43 -0
  255. package/src/cli/setup.js +155 -0
  256. package/src/cli/team.js +125 -0
  257. package/src/config/generator.js +119 -0
  258. package/src/mcp/memory-server.js +241 -0
  259. package/src/mcp/state-server.js +112 -0
  260. package/src/mcp/trace-server.js +168 -0
  261. package/src/notify/dispatch.js +74 -0
  262. package/src/notify/extensibility/dispatcher.js +113 -0
  263. package/src/notify/extensibility/events.js +15 -0
  264. package/src/notify/extensibility/loader.js +54 -0
  265. package/src/router/skill-router.js +90 -0
  266. package/src/team/auto-advance.js +72 -0
  267. package/src/team/orchestrator.js +82 -0
  268. package/src/team/state-store.js +33 -0
  269. package/src/utils/paths.js +33 -0
  270. package/templates/AGENTS.md +15 -0
  271. package/templates/catalog-manifest.json +542 -0
  272. package/templates/code_styleguides/csharp.md +115 -0
  273. package/templates/code_styleguides/dart.md +238 -0
  274. package/templates/code_styleguides/general.md +23 -0
  275. package/templates/code_styleguides/go.md +48 -0
  276. package/templates/code_styleguides/html-css.md +49 -0
  277. package/templates/code_styleguides/javascript.md +51 -0
  278. package/templates/code_styleguides/python.md +37 -0
  279. package/templates/code_styleguides/typescript.md +43 -0
  280. package/templates/rules/README.md +23 -0
  281. package/templates/rules/agents.md +49 -0
  282. package/templates/rules/coding-style.md +70 -0
  283. package/templates/rules/dev.md +20 -0
  284. package/templates/rules/git-workflow.md +45 -0
  285. package/templates/rules/notify.md +6 -0
  286. package/templates/rules/patterns.md +55 -0
  287. package/templates/rules/performance.md +47 -0
  288. package/templates/rules/research.md +26 -0
  289. package/templates/rules/review.md +22 -0
  290. package/templates/rules/security.md +36 -0
  291. package/templates/rules/testing.md +30 -0
  292. package/templates/workflow.md +333 -0
@@ -0,0 +1,209 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+ import yaml
5
+ import json
6
+ import re
7
+ import argparse
8
+ from pathlib import Path
9
+
10
+ def load_skill_yaml(skill_path):
11
+ """Loads SKILL.md and parses frontmatter."""
12
+ skill_md_path = skill_path / "SKILL.md"
13
+ if not skill_md_path.exists():
14
+ return None, None
15
+
16
+ try:
17
+ content = skill_md_path.read_text(encoding="utf-8")
18
+ parts = content.split("---")
19
+ if len(parts) < 3:
20
+ return None, content # Malformed frontmatter
21
+
22
+ yaml_content = parts[1]
23
+ markdown_content = "---".join(parts[2:])
24
+ data = yaml.safe_load(yaml_content)
25
+ return data, markdown_content
26
+ except Exception as e:
27
+ print(f"Error parsing SKILL.md: {e}")
28
+ return None, None
29
+
30
+ def analyze_clarity(frontmatter, markdown):
31
+ """Analyzes clarity dimension."""
32
+ score = 100
33
+ issues = []
34
+
35
+ if not frontmatter.get("description"):
36
+ score -= 40
37
+ issues.append("Missing description in frontmatter")
38
+ else:
39
+ desc_len = len(frontmatter["description"])
40
+ if desc_len < 20:
41
+ score -= 20
42
+ issues.append("Description is too short (< 20 chars)")
43
+ if re.search(r"\b(helps|various|many|stuff|things)\b", frontmatter["description"], re.IGNORECASE):
44
+ score -= 10
45
+ issues.append("Description uses vague words")
46
+
47
+ return max(0, score), issues
48
+
49
+ def analyze_structure(skill_path, frontmatter, markdown):
50
+ """Analyzes structure dimension."""
51
+ score = 100
52
+ issues = []
53
+
54
+ if not frontmatter:
55
+ return 0, ["Invalid or missing YAML frontmatter"]
56
+
57
+ if "name" not in frontmatter:
58
+ score -= 20
59
+ issues.append("Missing 'name' in frontmatter")
60
+ elif not re.match(r"^[a-z0-9-]+$", frontmatter["name"]):
61
+ score -= 10
62
+ issues.append("Skill name should be kebab-case")
63
+
64
+ required_sections = ["Capabilities", "Input Requirements", "How to Use"] # approximate matches
65
+ for section in required_sections:
66
+ if not re.search(f"^#+.*{section}", markdown, re.MULTILINE | re.IGNORECASE):
67
+ score -= 15
68
+ issues.append(f"Missing section: {section}")
69
+
70
+ return max(0, score), issues
71
+
72
+ def analyze_examples(skill_path, markdown):
73
+ """Analyzes examples dimension."""
74
+ score = 100
75
+ issues = []
76
+
77
+ # Check for examples in markdown
78
+ code_blocks = re.findall(r"```.*?```", markdown, re.DOTALL)
79
+ if len(code_blocks) < 2:
80
+ score -= 20
81
+ issues.append("Few or no usage examples found in SKILL.md")
82
+
83
+ # Check for sample files
84
+ if not (skill_path / "sample_input.json").exists():
85
+ score -= 15
86
+ issues.append("Missing sample_input.json")
87
+ if not (skill_path / "expected_output.json").exists():
88
+ score -= 15
89
+ issues.append("Missing expected_output.json")
90
+
91
+ return max(0, score), issues
92
+
93
+ def analyze_triggers(frontmatter, markdown):
94
+ """Analyzes trigger detection dimension."""
95
+ score = 100
96
+ issues = []
97
+
98
+ usage_section = re.search(r"^#+.*(How to Use|When to Use)", markdown, re.MULTILINE | re.IGNORECASE)
99
+ if not usage_section:
100
+ score -= 20
101
+ issues.append("No clear 'How to Use' or 'When to Use' section")
102
+
103
+ if frontmatter and "description" in frontmatter:
104
+ desc = frontmatter["description"].lower()
105
+ triggers = ["when", "use this", "trigger", "ask"]
106
+ if not any(t in desc for t in triggers):
107
+ # Less strict check, just looking for specificity
108
+ pass
109
+
110
+ return max(0, score), issues
111
+
112
+ def analyze_best_practices(skill_path, frontmatter):
113
+ """Analyzes best practices dimension."""
114
+ score = 100
115
+ issues = []
116
+
117
+ if not (skill_path / "README.md").exists():
118
+ score -= 10
119
+ issues.append("Missing README.md")
120
+ if not (skill_path / "HOW_TO_USE.md").exists():
121
+ score -= 10
122
+ issues.append("Missing HOW_TO_USE.md")
123
+
124
+ # Check for garbage files
125
+ garbage = list(skill_path.glob("**/*.pyc")) + list(skill_path.glob("**/.DS_Store"))
126
+ if garbage:
127
+ score -= 5
128
+ issues.append(f"Found {len(garbage)} garbage files (.pyc, .DS_Store)")
129
+
130
+ return max(0, score), issues
131
+
132
+ def analyze_maintainability(skill_path, frontmatter):
133
+ """Analyzes maintainability dimension."""
134
+ score = 100
135
+ issues = []
136
+
137
+ if frontmatter and "version" not in frontmatter:
138
+ score -= 10
139
+ issues.append("Missing version in frontmatter")
140
+
141
+ file_count = len(list(skill_path.glob("**/*")))
142
+ if file_count > 20:
143
+ score -= 10
144
+ issues.append("High file count (>20), consider cleaning up")
145
+
146
+ return max(0, score), issues
147
+
148
+ def main():
149
+ parser = argparse.ArgumentParser(description="Skill Quality Analyzer")
150
+ parser.add_argument("--skill-path", required=True, help="Path to the skill directory")
151
+ args = parser.parse_args()
152
+
153
+ skill_path = Path(args.skill_path).expanduser().resolve()
154
+
155
+ if not skill_path.exists():
156
+ print(f"Error: Path {skill_path} does not exist")
157
+ sys.exit(1)
158
+
159
+ frontmatter, markdown = load_skill_yaml(skill_path)
160
+
161
+ if not frontmatter:
162
+ print(json.dumps({
163
+ "overall_score": 0,
164
+ "issues": ["Could not parse SKILL.md or invalid YAML frontmatter"],
165
+ "dimensions": {}
166
+ }, indent=2))
167
+ sys.exit(0)
168
+
169
+ # Calculate scores
170
+ scores = {}
171
+ total_score = 0
172
+ total_weight = 0
173
+ all_issues = []
174
+
175
+ dimensions = [
176
+ ("clarity", lambda s, f, m: analyze_clarity(f, m), 20),
177
+ ("structure", lambda s, f, m: analyze_structure(s, f, m), 20),
178
+ ("examples", lambda s, f, m: analyze_examples(s, m), 15),
179
+ ("trigger_detection", lambda s, f, m: analyze_triggers(f, m), 15),
180
+ ("best_practices", lambda s, f, m: analyze_best_practices(s, f), 15),
181
+ ("maintainability", lambda s, f, m: analyze_maintainability(s, f), 15)
182
+ ]
183
+
184
+ results = {}
185
+
186
+ for name, func, weight in dimensions:
187
+ score, issues = func(skill_path, frontmatter, markdown)
188
+
189
+ results[name] = {
190
+ "score": score,
191
+ "weight": weight,
192
+ "issues": issues
193
+ }
194
+ total_score += score * (weight / 100.0)
195
+ total_weight += weight
196
+ all_issues.extend(issues)
197
+
198
+ output = {
199
+ "skill_name": frontmatter.get("name", "unknown"),
200
+ "overall_score": int(total_score),
201
+ "dimensions": results,
202
+ "all_issues": all_issues,
203
+ "recommendations": [f"Fix: {issue}" for issue in all_issues] # Simple recommendation generation
204
+ }
205
+
206
+ print(json.dumps(output, indent=2))
207
+
208
+ if __name__ == "__main__":
209
+ main()
@@ -0,0 +1,81 @@
1
+ {
2
+ "skill_name": "example-skill",
3
+ "skill_path": "~/.claude/skills/example-skill/",
4
+ "overall_score": 85,
5
+ "quality_level": "Good",
6
+ "dimensions": {
7
+ "clarity": {
8
+ "score": 90,
9
+ "weight": 20,
10
+ "issues": [],
11
+ "recommendations": ["Consider adding more specific capability descriptions"],
12
+ "details": {
13
+ "description_length": 78,
14
+ "vague_words_count": 0,
15
+ "capabilities_count": 5
16
+ }
17
+ },
18
+ "structure": {
19
+ "score": 85,
20
+ "weight": 20,
21
+ "issues": ["Section ordering could be improved"],
22
+ "recommendations": ["Reorder sections to match Anthropic guidelines"],
23
+ "details": {
24
+ "missing_sections": [],
25
+ "section_order_similarity": 0.8
26
+ }
27
+ },
28
+ "examples": {
29
+ "score": 80,
30
+ "weight": 15,
31
+ "issues": ["Missing expected_output file"],
32
+ "recommendations": ["Add expected_output.json showing example output"],
33
+ "details": {
34
+ "usage_examples_count": 4,
35
+ "has_sample_input": true,
36
+ "has_expected_output": false
37
+ }
38
+ },
39
+ "trigger_detection": {
40
+ "score": 90,
41
+ "weight": 15,
42
+ "issues": [],
43
+ "recommendations": [],
44
+ "details": {
45
+ "trigger_indicators": 5,
46
+ "description_has_use_case": true
47
+ }
48
+ },
49
+ "best_practices": {
50
+ "score": 80,
51
+ "weight": 15,
52
+ "issues": ["Missing HOW_TO_USE.md"],
53
+ "recommendations": ["Add HOW_TO_USE.md with detailed usage examples"],
54
+ "details": {
55
+ "has_readme": true,
56
+ "has_how_to_use": false,
57
+ "backup_files_count": 0,
58
+ "has_pycache": false,
59
+ "python_files_count": 2
60
+ }
61
+ },
62
+ "maintainability": {
63
+ "score": 85,
64
+ "weight": 15,
65
+ "issues": ["No version information found"],
66
+ "recommendations": ["Add version number to README.md or SKILL.md"],
67
+ "details": {
68
+ "total_files": 8,
69
+ "has_version_info": false,
70
+ "has_scripts_documentation": true
71
+ }
72
+ }
73
+ },
74
+ "critical_issues": [],
75
+ "high_priority_recommendations": [
76
+ "Add expected_output.json showing example output",
77
+ "Add HOW_TO_USE.md with detailed usage examples",
78
+ "Add version number to README.md or SKILL.md"
79
+ ],
80
+ "comparison_notes": "Skill follows most Anthropic best practices. Minor improvements needed for examples and documentation."
81
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "skill_path": "~/.claude/skills/example-skill/",
3
+ "analysis_type": "detailed",
4
+ "options": {
5
+ "include_recommendations": true,
6
+ "compare_with_best_practices": true,
7
+ "generate_markdown_report": true
8
+ }
9
+ }
@@ -0,0 +1,46 @@
1
+ # Skill Tester
2
+
3
+ TDD tool for testing Claude Code skills functionality.
4
+
5
+ ## Quick Install
6
+
7
+ ```bash
8
+ cp -r skill-tester ~/.claude/skills/
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ "Test financial-analyzer skill"
15
+ "Run full test suite on code-review"
16
+ "Write tests for my new skill before implementing it"
17
+ ```
18
+
19
+ ## What It Does
20
+
21
+ - ✅ Functional testing (correct outputs)
22
+ - ✅ Trigger testing (skill activates when it should)
23
+ - ✅ Edge case testing (handles unusual inputs)
24
+ - ✅ Performance testing (execution time)
25
+ - ✅ TDD workflow (write tests first)
26
+
27
+ ## Quick Example
28
+
29
+ ```
30
+ User: "Test if financial-analyzer calculates P/E correctly"
31
+
32
+ Claude:
33
+ Test: P/E Calculation
34
+ Input: price=100, eps=6.45
35
+ Expected: 15.5
36
+ Result: ✅ 15.504 (PASS)
37
+ ```
38
+
39
+ ## Files
40
+
41
+ - `SKILL.md` - Testing methodology and patterns
42
+ - `README.md` - This file
43
+
44
+ ## TDD Integration
45
+
46
+ Works with TDD Guard to enforce test-first development for skills.
@@ -0,0 +1,345 @@
1
+ ---
2
+ name: skill-tester
3
+ description: Tests Codex skill functionality with TDD approach, verifying skills work correctly through automated test scenarios and validation
4
+ ---
5
+
6
+ # Skill Tester
7
+
8
+ Test-driven development tool for Codex skills. Verifies skill functionality, validates outputs, and ensures skills work correctly before distribution.
9
+
10
+ ## Capabilities
11
+
12
+ - **Functional Testing**: Tests if skills produce expected outputs for given inputs
13
+ - **Trigger Testing**: Verifies skills trigger when they should
14
+ - **Regression Testing**: Ensures changes don't break existing functionality
15
+ - **Integration Testing**: Tests skills work together correctly
16
+ - **Performance Testing**: Measures skill execution time and resource usage
17
+ - **TDD Workflow**: Write tests first, then validate skill meets requirements
18
+ - **Test Coverage Analysis**: Identifies untested skill capabilities
19
+ - **Automated Test Generation**: Creates test cases from skill examples
20
+
21
+ ## TDD for Skills
22
+
23
+ ### Red-Green-Refactor for Skills
24
+
25
+ **Red Phase**: Write test showing skill doesn't work yet
26
+ ```
27
+ Test: "Skill should calculate P/E ratio from price and EPS"
28
+ Result: ❌ Skill doesn't have this capability
29
+ ```
30
+
31
+ **Green Phase**: Implement skill to pass test
32
+ ```
33
+ Test: "Skill should calculate P/E ratio from price and EPS"
34
+ Result: ✅ Skill correctly calculates 15.5 from price=$100, EPS=$6.45
35
+ ```
36
+
37
+ **Refactor Phase**: Improve skill quality
38
+ ```
39
+ Test: "Skill should handle edge cases (zero EPS, negative values)"
40
+ Result: ✅ All edge cases handled correctly
41
+ ```
42
+
43
+ ## Input Requirements
44
+
45
+ **Basic Test**:
46
+ - Skill name or path
47
+ - Test scenario (what should happen)
48
+ - Expected outcome
49
+
50
+ **Comprehensive Test Suite**:
51
+ - Skill path
52
+ - Test cases (inputs + expected outputs)
53
+ - Success criteria
54
+ - Edge cases to verify
55
+
56
+ **Example Test Case**:
57
+ ```json
58
+ {
59
+ "skill": "financial-analyzer",
60
+ "test": "Calculate P/E ratio",
61
+ "input": {"price": 100, "eps": 6.45},
62
+ "expected_output": {"pe_ratio": 15.5},
63
+ "tolerance": 0.1
64
+ }
65
+ ```
66
+
67
+ ## Output Formats
68
+
69
+ **Quick Test Result**:
70
+ ```
71
+ Testing: financial-analyzer
72
+ Test: "Calculate P/E ratio"
73
+ Result: ✅ PASS (output: 15.5, expected: 15.5)
74
+ ```
75
+
76
+ **Detailed Test Report**:
77
+ ```
78
+ === Skill Test Report ===
79
+
80
+ Skill: financial-analyzer
81
+ Tests Run: 12
82
+ Passed: 10 ✅
83
+ Failed: 2 ❌
84
+ Coverage: 83%
85
+
86
+ Failures:
87
+ 1. ❌ Edge case: Zero EPS
88
+ Input: {price: 100, eps: 0}
89
+ Expected: Error or infinity
90
+ Got: Division error
91
+
92
+ 2. ❌ Negative values
93
+ Input: {price: -50, eps: 5}
94
+ Expected: Error message
95
+ Got: Calculated -10
96
+
97
+ Recommendations:
98
+ - Add error handling for zero/negative values
99
+ - Validate inputs before calculation
100
+ - Add edge case tests to skill documentation
101
+ ```
102
+
103
+ **Test Coverage Map**:
104
+ ```
105
+ Capability Coverage:
106
+
107
+ ✅ Calculate P/E ratio - 100% (4/4 tests pass)
108
+ ✅ Calculate ROE - 100% (3/3 tests pass)
109
+ ⚠️ Calculate debt ratio - 67% (2/3 tests pass, missing edge case)
110
+ ❌ DCF valuation - 0% (Not implemented)
111
+
112
+ Overall: 75% coverage
113
+ ```
114
+
115
+ ## Test Types
116
+
117
+ ### 1. Trigger Tests
118
+ **Purpose**: Verify skill triggers when it should
119
+
120
+ **Test**: "Financial-analyzer should trigger for 'calculate P/E ratio'"
121
+ ```
122
+ Query: "Calculate P/E ratio for this stock"
123
+ Expected: financial-analyzer skill activates
124
+ Result: ✅ Triggered correctly
125
+ ```
126
+
127
+ ### 2. Functional Tests
128
+ **Purpose**: Verify correct outputs
129
+
130
+ **Test**: "Should calculate correct P/E ratio"
131
+ ```
132
+ Input: price=100, eps=6.45
133
+ Expected: 15.5
134
+ Result: ✅ Output: 15.504 (within tolerance)
135
+ ```
136
+
137
+ ### 3. Edge Case Tests
138
+ **Purpose**: Handle unusual inputs
139
+
140
+ **Test**: "Should handle zero EPS gracefully"
141
+ ```
142
+ Input: price=100, eps=0
143
+ Expected: Error message or infinity with warning
144
+ Result: ❌ Division error (needs fix)
145
+ ```
146
+
147
+ ### 4. Integration Tests
148
+ **Purpose**: Skills work together
149
+
150
+ **Test**: "Quality-analyzer should use skill-tester"
151
+ ```
152
+ Scenario: Analyze skill quality
153
+ Expected: Skill-tester used to verify examples
154
+ Result: ✅ Integration works
155
+ ```
156
+
157
+ ### 5. Performance Tests
158
+ **Purpose**: Execution within acceptable time
159
+
160
+ **Test**: "Should complete analysis within 5 seconds"
161
+ ```
162
+ Input: Large dataset
163
+ Expected: < 5 seconds
164
+ Result: ✅ 2.3 seconds
165
+ ```
166
+
167
+ ## How to Use
168
+
169
+ **Quick Test**:
170
+ ```
171
+ "Test if financial-analyzer calculates P/E ratio correctly"
172
+ "Verify code-review skill works for pull requests"
173
+ "Test skill-quality-analyzer on itself"
174
+ ```
175
+
176
+ **Comprehensive Test Suite**:
177
+ ```
178
+ "Run full test suite on financial-analyzer with all edge cases"
179
+ "Test all capabilities of aws-solution-architect skill"
180
+ ```
181
+
182
+ **TDD Workflow**:
183
+ ```
184
+ "Write tests for a new skill that should calculate financial ratios"
185
+ "Create test cases for photo-enhancer before implementing it"
186
+ ```
187
+
188
+ **Regression Testing**:
189
+ ```
190
+ "Test if my skill changes broke anything"
191
+ "Run regression tests on code-review after updates"
192
+ ```
193
+
194
+ ## Test Case Structure
195
+
196
+ ```yaml
197
+ test_cases:
198
+ - name: "Basic P/E calculation"
199
+ input:
200
+ price: 100
201
+ eps: 6.45
202
+ expected_output:
203
+ pe_ratio: 15.5
204
+ tolerance: 0.1
205
+ priority: HIGH
206
+
207
+ - name: "Zero EPS edge case"
208
+ input:
209
+ price: 100
210
+ eps: 0
211
+ expected_error: "EPS cannot be zero"
212
+ priority: CRITICAL
213
+
214
+ - name: "Negative price edge case"
215
+ input:
216
+ price: -50
217
+ eps: 5
218
+ expected_error: "Price must be positive"
219
+ priority: HIGH
220
+ ```
221
+
222
+ ## Test Coverage Goals
223
+
224
+ | Skill Type | Target Coverage |
225
+ |-------------|----------------|
226
+ | Critical (financial, security) | 95%+ |
227
+ | Production (widely used) | 80%+ |
228
+ | Experimental (new features) | 60%+ |
229
+ | Utility (simple tools) | 50%+ |
230
+
231
+ ## Integration with Development Workflow
232
+
233
+ ### Phase 1: TDD (Before Implementation)
234
+ ```
235
+ 1. Write test cases based on requirements
236
+ 2. Document expected outputs
237
+ 3. Run tests (all should fail - RED phase)
238
+ 4. Implement skill
239
+ 5. Run tests (should pass - GREEN phase)
240
+ 6. Refactor and optimize
241
+ ```
242
+
243
+ ### Phase 2: Continuous Testing
244
+ ```
245
+ 1. Run tests after every skill change
246
+ 2. Add tests for new capabilities
247
+ 3. Update tests when requirements change
248
+ 4. Track coverage over time
249
+ ```
250
+
251
+ ### Phase 3: Pre-Release
252
+ ```
253
+ 1. Full test suite (100% of capabilities)
254
+ 2. Edge case validation
255
+ 3. Performance benchmarks
256
+ 4. Integration tests
257
+ 5. User acceptance testing
258
+ ```
259
+
260
+ ## Best Practices
261
+
262
+ 1. **Write Tests First**: TDD approach prevents bugs
263
+ 2. **Test Edge Cases**: Zero, negative, null, empty, very large values
264
+ 3. **Use Realistic Data**: Test with actual use case data
265
+ 4. **Automate Testing**: Run tests automatically on changes
266
+ 5. **Track Coverage**: Aim for 80%+ for production skills
267
+ 6. **Document Test Results**: Keep test reports for regression checking
268
+ 7. **Test Integrations**: Verify skills work together
269
+ 8. **Performance Benchmarks**: Set and monitor time limits
270
+
271
+ ## Common Test Patterns
272
+
273
+ ### Pattern 1: Golden Master Testing
274
+ ```
275
+ Input: Known input
276
+ Expected: Known correct output (golden master)
277
+ Verify: Output matches golden master exactly
278
+ ```
279
+
280
+ ### Pattern 2: Property-Based Testing
281
+ ```
282
+ Property: "P/E ratio should always be price / EPS"
283
+ Test: Generate random valid inputs
284
+ Verify: Formula holds for all inputs
285
+ ```
286
+
287
+ ### Pattern 3: Snapshot Testing
288
+ ```
289
+ Input: Complex data structure
290
+ Expected: Snapshot of previous correct output
291
+ Verify: Current output matches snapshot
292
+ ```
293
+
294
+ ## Limitations
295
+
296
+ - **Manual Test Creation**: Tests need to be written (not fully automatic)
297
+ - **No Runtime Monitoring**: Can't test skills during actual use
298
+ - **Static Testing**: Tests predefined scenarios, not all possible inputs
299
+ - **No User Testing**: Can't test user satisfaction or UX
300
+ - **Coverage Gaps**: Can't guarantee 100% coverage of all code paths
301
+
302
+ ## When NOT to Use This Skill
303
+
304
+ - **Quick Experiments**: Testing adds overhead for throwaway skills
305
+ - **Debugging**: Use skill-debugger for trigger/discovery issues
306
+ - **Documentation**: Use skill-doc-generator for doc generation
307
+ - **Quality Analysis**: Use skill-quality-analyzer for static analysis
308
+
309
+ ## Success Criteria
310
+
311
+ A well-tested skill should:
312
+ - ✅ Pass 100% of critical test cases
313
+ - ✅ Handle all documented edge cases
314
+ - ✅ Work within performance limits
315
+ - ✅ Integrate correctly with other skills
316
+ - ✅ Have 80%+ test coverage for production skills
317
+
318
+ ## Example Test Session
319
+
320
+ ```
321
+ User: "Test the financial-analyzer skill"
322
+
323
+ Claude: "Running test suite for financial-analyzer...
324
+
325
+ Test Results:
326
+ ✅ Basic calculations (4/4 passed)
327
+ ✅ Error handling (3/3 passed)
328
+ ⚠️ Edge cases (2/3 passed)
329
+ - Failed: Handling of extremely large numbers
330
+
331
+ ✅ Integration tests (2/2 passed)
332
+ ✅ Performance (under 3 seconds)
333
+
334
+ Overall: 11/12 tests passed (92%)
335
+
336
+ Recommendation: Fix large number handling before production release.
337
+ Would you like detailed failure analysis?"
338
+ ```
339
+
340
+ ## Related Skills
341
+
342
+ - Works with **skill-quality-analyzer**: Test quality after static analysis
343
+ - Works with **skill-debugger**: Test after fixing trigger issues
344
+ - Works with **skill-doc-generator**: Test examples in generated docs
345
+ - Complements **TDD Guard**: Enforces test-first development