@softspark/ai-toolkit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/AGENTS.md +412 -0
  2. package/CHANGELOG.md +68 -0
  3. package/LICENSE +21 -0
  4. package/README.md +632 -0
  5. package/action.yml +53 -0
  6. package/app/.claude-plugin/plugin.json +44 -0
  7. package/app/ARCHITECTURE.md +306 -0
  8. package/app/CLAUDE.md.template +23 -0
  9. package/app/agents/ai-engineer.md +128 -0
  10. package/app/agents/backend-specialist.md +193 -0
  11. package/app/agents/business-intelligence.md +54 -0
  12. package/app/agents/chaos-monkey.md +67 -0
  13. package/app/agents/chief-of-staff.md +51 -0
  14. package/app/agents/code-archaeologist.md +127 -0
  15. package/app/agents/code-reviewer.md +184 -0
  16. package/app/agents/command-expert.md +131 -0
  17. package/app/agents/data-analyst.md +205 -0
  18. package/app/agents/data-scientist.md +151 -0
  19. package/app/agents/database-architect.md +317 -0
  20. package/app/agents/debugger.md +238 -0
  21. package/app/agents/devops-implementer.md +194 -0
  22. package/app/agents/documenter.md +364 -0
  23. package/app/agents/explorer-agent.md +145 -0
  24. package/app/agents/fact-checker.md +172 -0
  25. package/app/agents/frontend-specialist.md +209 -0
  26. package/app/agents/game-developer.md +216 -0
  27. package/app/agents/incident-responder.md +226 -0
  28. package/app/agents/infrastructure-architect.md +127 -0
  29. package/app/agents/infrastructure-validator.md +247 -0
  30. package/app/agents/llm-ops-engineer.md +237 -0
  31. package/app/agents/mcp-expert.md +228 -0
  32. package/app/agents/mcp-server-architect.md +195 -0
  33. package/app/agents/mcp-testing-engineer.md +292 -0
  34. package/app/agents/meta-architect.md +58 -0
  35. package/app/agents/ml-engineer.md +136 -0
  36. package/app/agents/mobile-developer.md +190 -0
  37. package/app/agents/night-watchman.md +55 -0
  38. package/app/agents/nlp-engineer.md +154 -0
  39. package/app/agents/orchestrator.md +437 -0
  40. package/app/agents/performance-optimizer.md +254 -0
  41. package/app/agents/predictive-analyst.md +57 -0
  42. package/app/agents/product-manager.md +194 -0
  43. package/app/agents/project-planner.md +287 -0
  44. package/app/agents/prompt-engineer.md +103 -0
  45. package/app/agents/qa-automation-engineer.md +182 -0
  46. package/app/agents/rag-engineer.md +201 -0
  47. package/app/agents/research-synthesizer.md +138 -0
  48. package/app/agents/search-specialist.md +101 -0
  49. package/app/agents/security-architect.md +62 -0
  50. package/app/agents/security-auditor.md +293 -0
  51. package/app/agents/seo-specialist.md +111 -0
  52. package/app/agents/system-governor.md +57 -0
  53. package/app/agents/tech-lead.md +62 -0
  54. package/app/agents/technical-researcher.md +103 -0
  55. package/app/agents/test-engineer.md +264 -0
  56. package/app/constitution.md +38 -0
  57. package/app/hooks/_profile-check.sh +11 -0
  58. package/app/hooks/guard-destructive.sh +74 -0
  59. package/app/hooks/guard-path.sh +73 -0
  60. package/app/hooks/post-tool-use.sh +35 -0
  61. package/app/hooks/pre-compact.sh +31 -0
  62. package/app/hooks/quality-check.sh +22 -0
  63. package/app/hooks/quality-gate.sh +49 -0
  64. package/app/hooks/save-session.sh +24 -0
  65. package/app/hooks/session-end.sh +37 -0
  66. package/app/hooks/session-start.sh +29 -0
  67. package/app/hooks/subagent-start.sh +16 -0
  68. package/app/hooks/subagent-stop.sh +16 -0
  69. package/app/hooks/track-usage.sh +50 -0
  70. package/app/hooks/user-prompt-submit.sh +25 -0
  71. package/app/hooks.json +178 -0
  72. package/app/mcp-defaults.json +23 -0
  73. package/app/output-styles/golden-rules.md +43 -0
  74. package/app/plugins/README.md +19 -0
  75. package/app/plugins/csharp-pack/README.md +11 -0
  76. package/app/plugins/csharp-pack/plugin.json +18 -0
  77. package/app/plugins/enterprise-pack/README.md +16 -0
  78. package/app/plugins/enterprise-pack/hooks/output-style.sh +6 -0
  79. package/app/plugins/enterprise-pack/hooks/status-line.sh +8 -0
  80. package/app/plugins/enterprise-pack/plugin.json +24 -0
  81. package/app/plugins/frontend-pack/README.md +14 -0
  82. package/app/plugins/frontend-pack/plugin.json +22 -0
  83. package/app/plugins/java-pack/README.md +11 -0
  84. package/app/plugins/java-pack/plugin.json +18 -0
  85. package/app/plugins/kotlin-pack/README.md +11 -0
  86. package/app/plugins/kotlin-pack/plugin.json +18 -0
  87. package/app/plugins/memory-pack/README.md +24 -0
  88. package/app/plugins/memory-pack/hooks/observation-capture.sh +67 -0
  89. package/app/plugins/memory-pack/hooks/session-summary.sh +71 -0
  90. package/app/plugins/memory-pack/plugin.json +22 -0
  91. package/app/plugins/memory-pack/scripts/init_db.py +81 -0
  92. package/app/plugins/memory-pack/scripts/strip_private.py +22 -0
  93. package/app/plugins/memory-pack/skills/mem-search/SKILL.md +70 -0
  94. package/app/plugins/research-pack/README.md +14 -0
  95. package/app/plugins/research-pack/plugin.json +22 -0
  96. package/app/plugins/ruby-pack/README.md +11 -0
  97. package/app/plugins/ruby-pack/plugin.json +18 -0
  98. package/app/plugins/rust-pack/README.md +11 -0
  99. package/app/plugins/rust-pack/plugin.json +18 -0
  100. package/app/plugins/security-pack/README.md +15 -0
  101. package/app/plugins/security-pack/plugin.json +23 -0
  102. package/app/plugins/swift-pack/README.md +11 -0
  103. package/app/plugins/swift-pack/plugin.json +18 -0
  104. package/app/rules/claude-toolkit-rules.md +21 -0
  105. package/app/rules/git-conventions.md +5 -0
  106. package/app/rules/quality-gates.md +10 -0
  107. package/app/skills/_lib/__init__.py +1 -0
  108. package/app/skills/_lib/detect_utils.py +150 -0
  109. package/app/skills/agent-creator/SKILL.md +82 -0
  110. package/app/skills/analyze/SKILL.md +92 -0
  111. package/app/skills/analyze/scripts/complexity.py +165 -0
  112. package/app/skills/api-patterns/SKILL.md +305 -0
  113. package/app/skills/app-builder/SKILL.md +187 -0
  114. package/app/skills/architecture-audit/SKILL.md +141 -0
  115. package/app/skills/architecture-decision/SKILL.md +55 -0
  116. package/app/skills/architecture-decision/templates/adr-template.md +36 -0
  117. package/app/skills/biz-scan/SKILL.md +30 -0
  118. package/app/skills/briefing/SKILL.md +27 -0
  119. package/app/skills/build/SKILL.md +97 -0
  120. package/app/skills/build/scripts/detect-build.py +151 -0
  121. package/app/skills/chaos/SKILL.md +32 -0
  122. package/app/skills/ci/SKILL.md +77 -0
  123. package/app/skills/ci/scripts/ci-detect.py +135 -0
  124. package/app/skills/ci/templates/github-actions-node.yml +38 -0
  125. package/app/skills/ci/templates/github-actions-python.yml +42 -0
  126. package/app/skills/ci-cd-patterns/SKILL.md +299 -0
  127. package/app/skills/clean-code/SKILL.md +110 -0
  128. package/app/skills/clean-code/reference/dart.md +18 -0
  129. package/app/skills/clean-code/reference/go.md +23 -0
  130. package/app/skills/clean-code/reference/php.md +32 -0
  131. package/app/skills/clean-code/reference/python.md +180 -0
  132. package/app/skills/clean-code/reference/typescript.md +26 -0
  133. package/app/skills/command-creator/SKILL.md +83 -0
  134. package/app/skills/commit/SKILL.md +98 -0
  135. package/app/skills/commit/scripts/pre-commit-check.py +87 -0
  136. package/app/skills/commit/templates/conventional-commit.md +52 -0
  137. package/app/skills/csharp-patterns/SKILL.md +450 -0
  138. package/app/skills/database-patterns/SKILL.md +297 -0
  139. package/app/skills/debug/SKILL.md +154 -0
  140. package/app/skills/debug/scripts/error-parser.py +187 -0
  141. package/app/skills/debugging-tactics/SKILL.md +136 -0
  142. package/app/skills/deploy/SKILL.md +130 -0
  143. package/app/skills/deploy/scripts/pre_deploy_check.py +171 -0
  144. package/app/skills/deploy/templates/deployment-checklist.md +31 -0
  145. package/app/skills/design-an-interface/SKILL.md +105 -0
  146. package/app/skills/design-engineering/SKILL.md +260 -0
  147. package/app/skills/docker-devops/SKILL.md +303 -0
  148. package/app/skills/docs/SKILL.md +145 -0
  149. package/app/skills/docs/scripts/doc-inventory.py +176 -0
  150. package/app/skills/docs/templates/adr-template.md +36 -0
  151. package/app/skills/docs/templates/readme-template.md +67 -0
  152. package/app/skills/documentation-standards/SKILL.md +191 -0
  153. package/app/skills/ecommerce-patterns/SKILL.md +209 -0
  154. package/app/skills/evaluate/SKILL.md +132 -0
  155. package/app/skills/evolve/SKILL.md +27 -0
  156. package/app/skills/explain/SKILL.md +54 -0
  157. package/app/skills/explain/scripts/dependency-graph.py +215 -0
  158. package/app/skills/explore/SKILL.md +112 -0
  159. package/app/skills/explore/scripts/visualize.py +117 -0
  160. package/app/skills/fix/SKILL.md +78 -0
  161. package/app/skills/fix/scripts/error-classifier.py +191 -0
  162. package/app/skills/flutter-patterns/SKILL.md +254 -0
  163. package/app/skills/git-mastery/SKILL.md +70 -0
  164. package/app/skills/grill-me/SKILL.md +38 -0
  165. package/app/skills/health/SKILL.md +91 -0
  166. package/app/skills/health/scripts/health_check.py +162 -0
  167. package/app/skills/hive-mind/SKILL.md +56 -0
  168. package/app/skills/hook-creator/SKILL.md +107 -0
  169. package/app/skills/index/SKILL.md +74 -0
  170. package/app/skills/instinct-review/SKILL.md +77 -0
  171. package/app/skills/java-patterns/SKILL.md +442 -0
  172. package/app/skills/kotlin-patterns/SKILL.md +446 -0
  173. package/app/skills/lint/SKILL.md +103 -0
  174. package/app/skills/lint/scripts/detect-linters.py +112 -0
  175. package/app/skills/mcp-patterns/SKILL.md +270 -0
  176. package/app/skills/mem-search/SKILL.md +70 -0
  177. package/app/skills/migrate/SKILL.md +90 -0
  178. package/app/skills/migrate/scripts/migration-status.py +195 -0
  179. package/app/skills/migration-patterns/SKILL.md +260 -0
  180. package/app/skills/night-watch/SKILL.md +28 -0
  181. package/app/skills/observability-patterns/SKILL.md +203 -0
  182. package/app/skills/onboard/SKILL.md +76 -0
  183. package/app/skills/orchestrate/SKILL.md +86 -0
  184. package/app/skills/panic/SKILL.md +30 -0
  185. package/app/skills/performance-profiling/SKILL.md +59 -0
  186. package/app/skills/plan/SKILL.md +110 -0
  187. package/app/skills/plan/templates/plan-template.md +40 -0
  188. package/app/skills/plan-writing/SKILL.md +201 -0
  189. package/app/skills/plugin-creator/SKILL.md +78 -0
  190. package/app/skills/pr/SKILL.md +129 -0
  191. package/app/skills/pr/scripts/pr-summary.py +175 -0
  192. package/app/skills/prd-to-issues/SKILL.md +108 -0
  193. package/app/skills/prd-to-plan/SKILL.md +120 -0
  194. package/app/skills/predict/SKILL.md +30 -0
  195. package/app/skills/qa-session/SKILL.md +110 -0
  196. package/app/skills/rag-patterns/SKILL.md +203 -0
  197. package/app/skills/refactor/SKILL.md +124 -0
  198. package/app/skills/refactor/scripts/refactor-scan.py +210 -0
  199. package/app/skills/refactor-plan/SKILL.md +112 -0
  200. package/app/skills/repeat/SKILL.md +149 -0
  201. package/app/skills/research-mastery/SKILL.md +56 -0
  202. package/app/skills/review/SKILL.md +141 -0
  203. package/app/skills/review/scripts/diff-analyzer.py +170 -0
  204. package/app/skills/rollback/SKILL.md +87 -0
  205. package/app/skills/rollback/scripts/rollback_info.py +149 -0
  206. package/app/skills/ruby-patterns/SKILL.md +454 -0
  207. package/app/skills/rust-patterns/SKILL.md +446 -0
  208. package/app/skills/search/SKILL.md +64 -0
  209. package/app/skills/security-patterns/SKILL.md +91 -0
  210. package/app/skills/security-patterns/reference/authentication.md +37 -0
  211. package/app/skills/security-patterns/reference/authorization.md +22 -0
  212. package/app/skills/security-patterns/reference/input-validation.md +30 -0
  213. package/app/skills/security-patterns/reference/oauth-csrf-audit.md +131 -0
  214. package/app/skills/skill-creator/SKILL.md +154 -0
  215. package/app/skills/skill-creator/templates/dashboard/index.html +130 -0
  216. package/app/skills/skill-creator/templates/reasoning-engine/assets/example.json +12 -0
  217. package/app/skills/skill-creator/templates/reasoning-engine/search.py +110 -0
  218. package/app/skills/subagent-development/SKILL.md +225 -0
  219. package/app/skills/subagent-development/reference/code-quality-reviewer-prompt.md +145 -0
  220. package/app/skills/subagent-development/reference/implementer-prompt.md +118 -0
  221. package/app/skills/subagent-development/reference/spec-reviewer-prompt.md +100 -0
  222. package/app/skills/swarm/SKILL.md +81 -0
  223. package/app/skills/swift-patterns/SKILL.md +500 -0
  224. package/app/skills/tdd/SKILL.md +174 -0
  225. package/app/skills/tdd/reference/deep-modules.md +32 -0
  226. package/app/skills/tdd/reference/interface-design.md +32 -0
  227. package/app/skills/tdd/reference/mocking.md +52 -0
  228. package/app/skills/tdd/reference/refactoring.md +10 -0
  229. package/app/skills/tdd/reference/tests.md +59 -0
  230. package/app/skills/teams/SKILL.md +101 -0
  231. package/app/skills/test/SKILL.md +107 -0
  232. package/app/skills/test/scripts/detect-runner.py +113 -0
  233. package/app/skills/testing-patterns/SKILL.md +73 -0
  234. package/app/skills/testing-patterns/reference/flutter-testing.md +33 -0
  235. package/app/skills/testing-patterns/reference/go-testing.md +52 -0
  236. package/app/skills/testing-patterns/reference/php-phpunit.md +39 -0
  237. package/app/skills/testing-patterns/reference/python-pytest.md +228 -0
  238. package/app/skills/testing-patterns/reference/typescript-vitest.md +50 -0
  239. package/app/skills/triage-issue/SKILL.md +120 -0
  240. package/app/skills/typescript-patterns/SKILL.md +256 -0
  241. package/app/skills/ubiquitous-language/SKILL.md +74 -0
  242. package/app/skills/verification-before-completion/SKILL.md +108 -0
  243. package/app/skills/workflow/SKILL.md +250 -0
  244. package/app/skills/write-a-prd/SKILL.md +129 -0
  245. package/app/skills/write-a-prd/reference/visual-companion.md +78 -0
  246. package/app/skills/write-a-prd/scripts/frame-template.html +111 -0
  247. package/app/skills/write-a-prd/scripts/visual-server.cjs +79 -0
  248. package/app/templates/skill/generator/SKILL.md.template +40 -0
  249. package/app/templates/skill/knowledge/SKILL.md.template +52 -0
  250. package/app/templates/skill/linter/SKILL.md.template +34 -0
  251. package/app/templates/skill/reviewer/SKILL.md.template +51 -0
  252. package/app/templates/skill/workflow/SKILL.md.template +49 -0
  253. package/benchmarks/README.md +111 -0
  254. package/benchmarks/ecosystem-dashboard.json +148 -0
  255. package/benchmarks/ecosystem-harvest.json +148 -0
  256. package/benchmarks/results.json +38 -0
  257. package/benchmarks/run.py +351 -0
  258. package/bin/ai-toolkit.js +345 -0
  259. package/kb/best-practices/README.md +11 -0
  260. package/kb/howto/README.md +11 -0
  261. package/kb/procedures/maintenance-sop.md +306 -0
  262. package/kb/reference/agents-catalog.md +124 -0
  263. package/kb/reference/anti-pattern-registry-format.md +221 -0
  264. package/kb/reference/architecture-overview.md +232 -0
  265. package/kb/reference/benchmark-config.md +62 -0
  266. package/kb/reference/ci-integration.md +66 -0
  267. package/kb/reference/claude-ecosystem-benchmark-snapshot.md +80 -0
  268. package/kb/reference/claude-ecosystem-expansion-foundations.md +102 -0
  269. package/kb/reference/commands-catalog.md +21 -0
  270. package/kb/reference/distribution-model.md +63 -0
  271. package/kb/reference/global-install-model.md +56 -0
  272. package/kb/reference/hierarchical-override-pattern.md +200 -0
  273. package/kb/reference/hooks-catalog.md +306 -0
  274. package/kb/reference/integrations.md +88 -0
  275. package/kb/reference/language-packs.md +52 -0
  276. package/kb/reference/merge-friendly-install-model.md +58 -0
  277. package/kb/reference/plugin-pack-conventions.md +151 -0
  278. package/kb/reference/quick-wins-implementation-summary.md +70 -0
  279. package/kb/reference/skill-templates.md +50 -0
  280. package/kb/reference/skills-catalog.md +215 -0
  281. package/kb/reference/skills-unification.md +57 -0
  282. package/kb/reference/stats.md +69 -0
  283. package/kb/reference/sync.md +76 -0
  284. package/kb/troubleshooting/README.md +11 -0
  285. package/llms-full.txt +3068 -0
  286. package/llms.txt +39 -0
  287. package/package.json +75 -0
  288. package/scripts/_common.py +160 -0
  289. package/scripts/add_rule.py +50 -0
  290. package/scripts/benchmark_config.py +127 -0
  291. package/scripts/benchmark_ecosystem.py +288 -0
  292. package/scripts/check_deps.py +260 -0
  293. package/scripts/create_skill.py +118 -0
  294. package/scripts/doctor.py +504 -0
  295. package/scripts/eject.py +113 -0
  296. package/scripts/emission.py +256 -0
  297. package/scripts/evaluate_skills.py +260 -0
  298. package/scripts/frontmatter.py +58 -0
  299. package/scripts/generate_agents_md.py +91 -0
  300. package/scripts/generate_aider_conf.py +51 -0
  301. package/scripts/generate_cline.py +35 -0
  302. package/scripts/generate_copilot.py +30 -0
  303. package/scripts/generate_cursor_rules.py +35 -0
  304. package/scripts/generate_gemini.py +28 -0
  305. package/scripts/generate_llms_txt.py +164 -0
  306. package/scripts/generate_roo_modes.py +80 -0
  307. package/scripts/generate_windsurf.py +35 -0
  308. package/scripts/generator_base.py +140 -0
  309. package/scripts/harvest_ecosystem.py +50 -0
  310. package/scripts/inject_rule_cli.py +101 -0
  311. package/scripts/inject_section_cli.py +47 -0
  312. package/scripts/injection.py +180 -0
  313. package/scripts/install.py +236 -0
  314. package/scripts/install_git_hooks.py +71 -0
  315. package/scripts/install_steps/__init__.py +5 -0
  316. package/scripts/install_steps/ai_tools.py +261 -0
  317. package/scripts/install_steps/hooks.py +90 -0
  318. package/scripts/install_steps/markers.py +79 -0
  319. package/scripts/install_steps/symlinks.py +87 -0
  320. package/scripts/merge-hooks.py +192 -0
  321. package/scripts/plugin.py +642 -0
  322. package/scripts/plugin_schema.py +138 -0
  323. package/scripts/remove_rule.py +58 -0
  324. package/scripts/stats.py +81 -0
  325. package/scripts/sync.py +215 -0
  326. package/scripts/uninstall.py +292 -0
  327. package/scripts/validate.py +700 -0
@@ -0,0 +1,148 @@
1
+ {
2
+ "generated_at": "2026-03-28T09:37:52Z",
3
+ "mode": "offline",
4
+ "snapshot_date": "2026-03-28",
5
+ "freshness": {
6
+ "stale_threshold_days": 30,
7
+ "age_days": 0,
8
+ "status": "fresh"
9
+ },
10
+ "summary": {
11
+ "repo_count": 6,
12
+ "stars_total": 206035,
13
+ "categories": [
14
+ "cross-tool",
15
+ "ecosystem-scale",
16
+ "hooks-reference",
17
+ "meta-tooling",
18
+ "official",
19
+ "practical-showcase"
20
+ ],
21
+ "official_repo": "anthropics/claude-code"
22
+ },
23
+ "comparison_matrix": [
24
+ {
25
+ "pattern": "plugin-manifest-support",
26
+ "current_state": "implemented",
27
+ "benchmark_signal": "official Claude Code plugin layout",
28
+ "priority": "high",
29
+ "evidence": [
30
+ "anthropics/claude-code"
31
+ ]
32
+ },
33
+ {
34
+ "pattern": "creator-workflows",
35
+ "current_state": "implemented",
36
+ "benchmark_signal": "meta-tooling for commands, hooks, agents, plugins",
37
+ "priority": "high",
38
+ "evidence": [
39
+ "anthropics/claude-code",
40
+ "alirezarezvani/claude-code-skill-factory"
41
+ ]
42
+ },
43
+ {
44
+ "pattern": "lifecycle-breadth",
45
+ "current_state": "implemented",
46
+ "benchmark_signal": "prompt governance, post-tool feedback, subagent hooks, session end",
47
+ "priority": "high",
48
+ "evidence": [
49
+ "disler/claude-code-hooks-mastery",
50
+ "ChrisWiles/claude-code-showcase"
51
+ ]
52
+ },
53
+ {
54
+ "pattern": "plugin-packs",
55
+ "current_state": "implemented-experimental",
56
+ "benchmark_signal": "modular domain packaging",
57
+ "priority": "medium",
58
+ "evidence": [
59
+ "anthropics/claude-code",
60
+ "affaan-m/everything-claude-code"
61
+ ]
62
+ },
63
+ {
64
+ "pattern": "benchmark-harvesting",
65
+ "current_state": "implemented",
66
+ "benchmark_signal": "repeatable evidence for docs and roadmap decisions",
67
+ "priority": "medium",
68
+ "evidence": [
69
+ "anthropics/claude-code",
70
+ "codeaholicguy/ai-devkit"
71
+ ]
72
+ }
73
+ ],
74
+ "repos": [
75
+ {
76
+ "repo": "anthropics/claude-code",
77
+ "category": "official",
78
+ "stars": 83535,
79
+ "updated_at": "2026-03-27T16:50:16Z",
80
+ "commands_md": 18,
81
+ "agents_md": 15,
82
+ "skills": 10,
83
+ "hook_settings_files": 5,
84
+ "notes": "Official Claude Code repo with plugin layout, development kits, and modular commands/agents/hooks.",
85
+ "source": "snapshot"
86
+ },
87
+ {
88
+ "repo": "affaan-m/everything-claude-code",
89
+ "category": "ecosystem-scale",
90
+ "stars": 111863,
91
+ "updated_at": "2026-03-27T16:55:18Z",
92
+ "commands_md": 271,
93
+ "agents_md": 152,
94
+ "skills": 397,
95
+ "hook_settings_files": 2,
96
+ "notes": "Large ecosystem catalog. High inspiration value, high discoverability-debt risk.",
97
+ "source": "snapshot"
98
+ },
99
+ {
100
+ "repo": "ChrisWiles/claude-code-showcase",
101
+ "category": "practical-showcase",
102
+ "stars": 5593,
103
+ "updated_at": "2026-03-27T13:13:35Z",
104
+ "commands_md": 6,
105
+ "agents_md": 2,
106
+ "skills": 6,
107
+ "hook_settings_files": 1,
108
+ "notes": "Practical edit-time hooks, branch safety, formatting, and testing patterns.",
109
+ "source": "snapshot"
110
+ },
111
+ {
112
+ "repo": "disler/claude-code-hooks-mastery",
113
+ "category": "hooks-reference",
114
+ "stars": 3421,
115
+ "updated_at": "2026-03-27T15:49:11Z",
116
+ "commands_md": 21,
117
+ "agents_md": 19,
118
+ "skills": 0,
119
+ "hook_settings_files": 1,
120
+ "notes": "Strong reference for lifecycle breadth, status lines, and operational hook patterns.",
121
+ "source": "snapshot"
122
+ },
123
+ {
124
+ "repo": "codeaholicguy/ai-devkit",
125
+ "category": "cross-tool",
126
+ "stars": 985,
127
+ "updated_at": "2026-03-27T00:00:00Z",
128
+ "commands_md": 0,
129
+ "agents_md": 0,
130
+ "skills": 0,
131
+ "hook_settings_files": 0,
132
+ "notes": "Cross-tool toolkit positioning benchmark.",
133
+ "source": "snapshot"
134
+ },
135
+ {
136
+ "repo": "alirezarezvani/claude-code-skill-factory",
137
+ "category": "meta-tooling",
138
+ "stars": 638,
139
+ "updated_at": "2026-03-27T00:00:00Z",
140
+ "commands_md": 0,
141
+ "agents_md": 0,
142
+ "skills": 0,
143
+ "hook_settings_files": 0,
144
+ "notes": "Skill/agent/prompt factory inspiration for creator workflows.",
145
+ "source": "snapshot"
146
+ }
147
+ ]
148
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "run_date": "2026-03-26",
3
+ "model": "claude-sonnet-4-6",
4
+ "note": "B4 vanilla run found existing test file from with-toolkit run — tool_call count inflated, score still valid",
5
+ "with_toolkit": {
6
+ "agent_routing": "specialized (debugger, code-reviewer, test-engineer, documenter)",
7
+ "results": {
8
+ "B1": { "task": "Debug FastAPI JWT bug", "score": 4, "max": 4, "tool_calls": 1 },
9
+ "B2": { "task": "Code review — 3 bugs", "score": 4, "max": 4, "tool_calls": 1 },
10
+ "B3": { "task": "Refactor god function", "score": 4, "max": 4, "tool_calls": 1 },
11
+ "B4": { "task": "Generate tests (payments)", "score": 4, "max": 4, "tool_calls": 1 },
12
+ "B5": { "task": "Docs for Flask microservice", "score": 4, "max": 4, "tool_calls": 3 }
13
+ },
14
+ "total_score": 20,
15
+ "max_score": 20,
16
+ "completion_rate": 1.0,
17
+ "avg_tool_calls": 1.4
18
+ },
19
+ "without_toolkit": {
20
+ "agent_routing": "general-purpose only",
21
+ "results": {
22
+ "B1": { "task": "Debug FastAPI JWT bug", "score": 4, "max": 4, "tool_calls": 1 },
23
+ "B2": { "task": "Code review — 3 bugs", "score": 4, "max": 4, "tool_calls": 1 },
24
+ "B3": { "task": "Refactor god function", "score": 4, "max": 4, "tool_calls": 2 },
25
+ "B4": { "task": "Generate tests (payments)", "score": 4, "max": 4, "tool_calls": 8 },
26
+ "B5": { "task": "Docs for Flask microservice", "score": 4, "max": 4, "tool_calls": 10 }
27
+ },
28
+ "total_score": 20,
29
+ "max_score": 20,
30
+ "completion_rate": 1.0,
31
+ "avg_tool_calls": 4.4
32
+ },
33
+ "comparison": {
34
+ "score_delta": 0,
35
+ "tool_call_reduction_pct": 68,
36
+ "finding": "Same accuracy on isolated single-file tasks. Toolkit advantage: 3.1x fewer tool calls on complex tasks (B4/B5). Real gains expected on multi-file, multi-step scenarios where agent specialization and skill context matter."
37
+ }
38
+ }
@@ -0,0 +1,351 @@
1
+ #!/usr/bin/env python3
2
+ """benchmarks/run.py — structured benchmark runner for ai-toolkit.
3
+
4
+ Usage:
5
+ ./benchmarks/run.py Show available benchmarks
6
+ ./benchmarks/run.py B1 Scaffold B1 benchmark environment
7
+ ./benchmarks/run.py all Scaffold all 5 benchmarks
8
+ ./benchmarks/run.py --report Print last results
9
+ """
10
+ from __future__ import annotations
11
+
12
+ import json
13
+ import sys
14
+ from pathlib import Path
15
+
16
+ TOOLKIT_DIR = Path(__file__).resolve().parent.parent
17
+ BENCHMARKS_DIR = TOOLKIT_DIR / "benchmarks"
18
+ RESULTS_FILE = BENCHMARKS_DIR / "results.json"
19
+
20
+ USAGE_TEXT = """\
21
+ ai-toolkit Benchmark Runner
22
+
23
+ Usage:
24
+ ./benchmarks/run.py Show available benchmarks
25
+ ./benchmarks/run.py B1 Scaffold B1 (debug) benchmark environment
26
+ ./benchmarks/run.py all Scaffold all 5 benchmarks
27
+ ./benchmarks/run.py --report Print results from last run
28
+
29
+ Benchmarks:
30
+ B1 Debug multi-file bug (FastAPI JWT authentication)
31
+ B2 Code review (SQL injection, error handling, N+1)
32
+ B3 Refactor to clean code (god function -> SRP)
33
+ B4 Generate tests (payment processing module)
34
+ B5 Generate documentation (Flask microservice)
35
+
36
+ Methodology:
37
+ Each benchmark run measures:
38
+ - time_to_first_output (seconds)
39
+ - tool_calls (count)
40
+ - completion_rate (0.0-1.0)
41
+ - corrections_needed (count)
42
+
43
+ Run each benchmark WITH and WITHOUT the toolkit, compare.
44
+ See benchmarks/README.md for full methodology.
45
+ """
46
+
47
+ # ---------------------------------------------------------------------------
48
+ # Benchmark scaffolding files
49
+ # ---------------------------------------------------------------------------
50
+
51
+ B1_AUTH = '''\
52
+ from fastapi import FastAPI, Header, HTTPException
53
+ import jwt
54
+
55
+ app = FastAPI()
56
+ SECRET = "mysecret"
57
+
58
+ @app.get("/protected")
59
+ def protected(authorization: str = Header(None)):
60
+ # BUG: token validation fails silently — no exception raised on invalid token
61
+ try:
62
+ payload = jwt.decode(authorization, SECRET, algorithms=["HS256"])
63
+ except:
64
+ pass # silent failure — any token passes
65
+ return {"user": payload.get("sub", "unknown")}
66
+ '''
67
+
68
+ B2_USERS = '''\
69
+ import sqlite3
70
+
71
+ def get_user(db_path, username):
72
+ # BUG 1: SQL injection
73
+ conn = sqlite3.connect(db_path)
74
+ cursor = conn.cursor()
75
+ cursor.execute(f"SELECT * FROM users WHERE username = '{username}'")
76
+ return cursor.fetchone()
77
+
78
+ def get_user_posts(db_path, user_ids):
79
+ # BUG 2: N+1 query
80
+ conn = sqlite3.connect(db_path)
81
+ posts = []
82
+ for uid in user_ids:
83
+ cursor = conn.cursor()
84
+ cursor.execute("SELECT * FROM posts WHERE user_id = ?", (uid,))
85
+ posts.extend(cursor.fetchall())
86
+ return posts
87
+
88
+ def delete_user(db_path, user_id):
89
+ # BUG 3: No error handling — conn.close() never called on exception
90
+ conn = sqlite3.connect(db_path)
91
+ cursor = conn.cursor()
92
+ cursor.execute("DELETE FROM users WHERE id = ?", (user_id,))
93
+ conn.commit()
94
+ conn.close()
95
+ '''
96
+
97
+ B3_ORDER = '''\
98
+ import sqlite3
99
+ import smtplib
100
+ import logging
101
+ from datetime import datetime
102
+
103
+ # God function — 4 responsibilities in one: validate, calculate, persist, notify
104
+ def process_order(db_path, customer_id, items, discount_code, email):
105
+ # 1. Validate
106
+ if not items:
107
+ raise ValueError("No items")
108
+ if not customer_id:
109
+ raise ValueError("No customer")
110
+ conn = sqlite3.connect(db_path)
111
+ cursor = conn.cursor()
112
+ cursor.execute("SELECT * FROM customers WHERE id = ?", (customer_id,))
113
+ customer = cursor.fetchone()
114
+ if not customer:
115
+ raise ValueError("Customer not found")
116
+
117
+ # 2. Calculate total
118
+ total = 0
119
+ for item in items:
120
+ cursor.execute("SELECT price FROM products WHERE id = ?", (item["product_id"],))
121
+ row = cursor.fetchone()
122
+ if not row:
123
+ raise ValueError(f"Product {item[\\'product_id\\']} not found")
124
+ total += row[0] * item["quantity"]
125
+ if discount_code == "SAVE10":
126
+ total *= 0.9
127
+ elif discount_code == "SAVE20":
128
+ total *= 0.8
129
+ tax = total * 0.23
130
+ total_with_tax = total + tax
131
+
132
+ # 3. Persist
133
+ cursor.execute(
134
+ "INSERT INTO orders (customer_id, total, tax, created_at) VALUES (?, ?, ?, ?)",
135
+ (customer_id, total_with_tax, tax, datetime.now().isoformat())
136
+ )
137
+ order_id = cursor.lastrowid
138
+ for item in items:
139
+ cursor.execute(
140
+ "INSERT INTO order_items (order_id, product_id, quantity) VALUES (?, ?, ?)",
141
+ (order_id, item["product_id"], item["quantity"])
142
+ )
143
+ conn.commit()
144
+ conn.close()
145
+
146
+ # 4. Notify
147
+ try:
148
+ server = smtplib.SMTP("smtp.example.com", 587)
149
+ server.starttls()
150
+ server.login("noreply@example.com", "password123")
151
+ server.sendmail(
152
+ "noreply@example.com", email,
153
+ f"Subject: Order #{order_id} confirmed\\n\\nTotal: {total_with_tax:.2f}"
154
+ )
155
+ server.quit()
156
+ except Exception as e:
157
+ logging.error(f"Email failed: {e}")
158
+
159
+ return order_id
160
+ '''
161
+
162
+ B4_PAYMENTS = '''\
163
+ import uuid
164
+ from dataclasses import dataclass
165
+ from typing import Optional
166
+
167
+ @dataclass
168
+ class Payment:
169
+ id: str
170
+ amount: float
171
+ currency: str
172
+ status: str # pending | completed | failed | refunded
173
+
174
+ class PaymentProcessor:
175
+ def __init__(self, gateway_client):
176
+ self.gateway = gateway_client
177
+
178
+ def charge(self, amount: float, currency: str, card_token: str) -> Payment:
179
+ if amount <= 0:
180
+ raise ValueError("Amount must be positive")
181
+ if currency not in ("USD", "EUR", "GBP"):
182
+ raise ValueError(f"Unsupported currency: {currency}")
183
+ result = self.gateway.charge(card_token, amount, currency)
184
+ return Payment(id=result["id"], amount=amount, currency=currency, status="completed")
185
+
186
+ def refund(self, payment: Payment, amount: Optional[float] = None) -> Payment:
187
+ if payment.status != "completed":
188
+ raise ValueError("Can only refund completed payments")
189
+ refund_amount = amount or payment.amount
190
+ if refund_amount > payment.amount:
191
+ raise ValueError("Refund exceeds original amount")
192
+ self.gateway.refund(payment.id, refund_amount)
193
+ return Payment(id=payment.id, amount=refund_amount, currency=payment.currency, status="refunded")
194
+
195
+ def get_status(self, payment_id: str) -> str:
196
+ result = self.gateway.get_payment(payment_id)
197
+ return result.get("status", "unknown")
198
+
199
+ def batch_charge(self, charges: list) -> list:
200
+ results = []
201
+ for charge in charges:
202
+ try:
203
+ p = self.charge(charge["amount"], charge["currency"], charge["card_token"])
204
+ results.append({"success": True, "payment": p})
205
+ except Exception as e:
206
+ results.append({"success": False, "error": str(e)})
207
+ return results
208
+
209
+ def calculate_fee(self, amount: float, currency: str) -> float:
210
+ base_fee = 0.029 * amount + 0.30
211
+ if currency != "USD":
212
+ base_fee *= 1.015 # FX surcharge
213
+ return round(base_fee, 2)
214
+ '''
215
+
216
+ B5_APP = '''\
217
+ from flask import Flask, request, jsonify
218
+ from models import db, Task
219
+ from auth import require_api_key
220
+
221
+ app = Flask(__name__)
222
+ app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///tasks.db"
223
+ db.init_app(app)
224
+
225
+ @app.route("/tasks", methods=["GET"])
226
+ @require_api_key
227
+ def list_tasks():
228
+ tasks = Task.query.all()
229
+ return jsonify([t.to_dict() for t in tasks])
230
+
231
+ @app.route("/tasks", methods=["POST"])
232
+ @require_api_key
233
+ def create_task():
234
+ data = request.get_json()
235
+ task = Task(title=data["title"], done=False)
236
+ db.session.add(task)
237
+ db.session.commit()
238
+ return jsonify(task.to_dict()), 201
239
+
240
+ @app.route("/tasks/<int:task_id>", methods=["PATCH"])
241
+ @require_api_key
242
+ def update_task(task_id):
243
+ task = Task.query.get_or_404(task_id)
244
+ data = request.get_json()
245
+ if "done" in data:
246
+ task.done = data["done"]
247
+ if "title" in data:
248
+ task.title = data["title"]
249
+ db.session.commit()
250
+ return jsonify(task.to_dict())
251
+
252
+ @app.route("/tasks/<int:task_id>", methods=["DELETE"])
253
+ @require_api_key
254
+ def delete_task(task_id):
255
+ task = Task.query.get_or_404(task_id)
256
+ db.session.delete(task)
257
+ db.session.commit()
258
+ return "", 204
259
+ '''
260
+
261
+ B5_MODELS = '''\
262
+ from flask_sqlalchemy import SQLAlchemy
263
+
264
+ db = SQLAlchemy()
265
+
266
+ class Task:
267
+ id: int
268
+ title: str
269
+ done: bool
270
+
271
+ def to_dict(self):
272
+ return {"id": self.id, "title": self.title, "done": self.done}
273
+ '''
274
+
275
+ B5_AUTH = '''\
276
+ import os
277
+ from functools import wraps
278
+ from flask import request, jsonify
279
+
280
+ API_KEY = os.environ.get("API_KEY", "dev-key")
281
+
282
+ def require_api_key(f):
283
+ @wraps(f)
284
+ def decorated(*args, **kwargs):
285
+ key = request.headers.get("X-API-Key")
286
+ if key != API_KEY:
287
+ return jsonify({"error": "Unauthorized"}), 401
288
+ return f(*args, **kwargs)
289
+ return decorated
290
+ '''
291
+
292
+
293
+ def scaffold(name: str, directory: str, files: dict[str, str], task_desc: str) -> None:
294
+ d = Path(directory)
295
+ d.mkdir(parents=True, exist_ok=True)
296
+ for filename, content in files.items():
297
+ (d / filename).write_text(content, encoding="utf-8")
298
+ print(f"{name} scaffolded at: {directory}")
299
+ print(f"Task: {task_desc}")
300
+
301
+
302
+ def scaffold_b1(d: str = "/tmp/benchmark-b1") -> None:
303
+ scaffold("B1", d, {"auth.py": B1_AUTH},
304
+ "Find why any JWT token (including invalid ones) is accepted.")
305
+
306
+ def scaffold_b2(d: str = "/tmp/benchmark-b2") -> None:
307
+ scaffold("B2", d, {"users.py": B2_USERS},
308
+ "Find 3 issues: SQL injection, N+1 query, missing error handling.")
309
+
310
+ def scaffold_b3(d: str = "/tmp/benchmark-b3") -> None:
311
+ scaffold("B3", d, {"order_processor.py": B3_ORDER},
312
+ "Refactor process_order() — split into 4 single-responsibility functions.")
313
+
314
+ def scaffold_b4(d: str = "/tmp/benchmark-b4") -> None:
315
+ scaffold("B4", d, {"payments.py": B4_PAYMENTS},
316
+ "Generate unit tests for all 5 PaymentProcessor methods with edge cases.")
317
+
318
+ def scaffold_b5(d: str = "/tmp/benchmark-b5") -> None:
319
+ scaffold("B5", d, {"app.py": B5_APP, "models.py": B5_MODELS, "auth.py": B5_AUTH},
320
+ "Generate README, API docs, and docstrings for this Flask task API.")
321
+
322
+
323
+ SCAFFOLDERS = {"B1": scaffold_b1, "B2": scaffold_b2, "B3": scaffold_b3, "B4": scaffold_b4, "B5": scaffold_b5}
324
+
325
+
326
+ def main() -> None:
327
+ arg = sys.argv[1] if len(sys.argv) > 1 else ""
328
+ target = sys.argv[2] if len(sys.argv) > 2 else ""
329
+
330
+ if arg == "--report":
331
+ if RESULTS_FILE.is_file():
332
+ print(RESULTS_FILE.read_text())
333
+ else:
334
+ print("No results yet. Run benchmarks first.")
335
+ print(f"Results will be saved to: {RESULTS_FILE}")
336
+ elif arg == "all":
337
+ for name, fn in SCAFFOLDERS.items():
338
+ fn(f"/tmp/benchmark-{name.lower()}")
339
+ elif arg in SCAFFOLDERS:
340
+ d = target or f"/tmp/benchmark-{arg.lower()}"
341
+ SCAFFOLDERS[arg](d)
342
+ elif arg:
343
+ print(f"Unknown: {arg}")
344
+ print(USAGE_TEXT)
345
+ sys.exit(1)
346
+ else:
347
+ print(USAGE_TEXT)
348
+
349
+
350
+ if __name__ == "__main__":
351
+ main()