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,428 @@
1
+ # Agent-KB - Detailed Usage Guide
2
+
3
+ ## Overview
4
+
5
+ Agent-KB is an intelligent reasoning system that searches 300+ expert cases and uses local LLM to synthesize actionable recommendations. Optimizes context by 83% (2500+ words → 400 words).
6
+
7
+ ---
8
+
9
+ ## Basic Usage
10
+
11
+ ### Trigger Automatically
12
+
13
+ Agent-KB auto-triggers when you ask:
14
+ - "How to..." technical questions
15
+ - "Best practices for..."
16
+ - "What's the recommended approach..."
17
+ - Performance optimization queries
18
+ - Architecture decision questions
19
+
20
+ **Examples**:
21
+ ```
22
+ "How to optimize database queries in Node.js?"
23
+ "Best practices for error handling in microservices?"
24
+ "What's the recommended approach for state management in React?"
25
+ ```
26
+
27
+ ### Manual Invocation
28
+
29
+ If auto-trigger doesn't work:
30
+ ```
31
+ Use agent-kb to answer: [your question]
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Usage Scenarios
37
+
38
+ ### Scenario 1: Performance Optimization
39
+
40
+ **Use Case**: Need to improve application performance
41
+
42
+ **Example Query**:
43
+ ```
44
+ "How to reduce React component re-renders?"
45
+ ```
46
+
47
+ **What Happens**:
48
+ 1. Claude executes: `python ~/Agent-KB/intelligent_summarizer.py "React component re-renders optimization"`
49
+ 2. Searches 300+ cases for React performance patterns
50
+ 3. LLM analyzes and synthesizes key insights
51
+ 4. Returns structured recommendations:
52
+ - Core techniques (useMemo, useCallback, React.memo)
53
+ - Quantitative metrics (render count reduction %)
54
+ - Common pitfalls (premature optimization)
55
+ - Best practices (profiling first, measure impact)
56
+
57
+ **Expected Output Format**:
58
+ ```markdown
59
+ ## 🧠 Agent-KB Expert Analysis
60
+
61
+ **Query**: How to reduce React component re-renders?
62
+
63
+ ### Core Recommendations
64
+ - Use React.memo for expensive components
65
+ - useMemo for heavy computations
66
+ - useCallback for functions passed as props
67
+ - Virtual scrolling for large lists
68
+
69
+ ### Quantitative Metrics
70
+ - React.memo: 60-80% re-render reduction
71
+ - useMemo: 40-70% computation time savings
72
+ - Virtual scrolling: 95%+ performance gain for 1000+ items
73
+
74
+ ### Common Pitfalls
75
+ - Over-memoization adds complexity
76
+ - Profiling skipped → random optimization
77
+ - Missing key dependencies in useMemo/useCallback
78
+
79
+ ### Best Practices
80
+ 1. Profile with React DevTools first
81
+ 2. Measure before/after performance
82
+ 3. Focus on components that re-render frequently
83
+ 4. Keep memoization simple
84
+
85
+ ### Related Topics
86
+ - React Profiler API
87
+ - Code splitting
88
+ - Lazy loading
89
+ ```
90
+
91
+ ---
92
+
93
+ ### Scenario 2: Architecture Decisions
94
+
95
+ **Use Case**: Choosing between architectural patterns
96
+
97
+ **Example Query**:
98
+ ```
99
+ "Should I use REST or GraphQL for my API?"
100
+ ```
101
+
102
+ **What Happens**:
103
+ 1. Executes: `python ~/Agent-KB/intelligent_summarizer.py "REST vs GraphQL API design"`
104
+ 2. Retrieves historical cases comparing both approaches
105
+ 3. Analyzes trade-offs, use cases, team considerations
106
+ 4. Provides decision framework based on project constraints
107
+
108
+ **Output Includes**:
109
+ - **Trade-off Analysis**: REST simplicity vs GraphQL flexibility
110
+ - **Use Case Matching**: When to use each (data fetching patterns, client diversity)
111
+ - **Team Considerations**: Learning curve, tooling, debugging
112
+ - **Performance Metrics**: Request count reduction, payload size
113
+ - **Migration Path**: If starting with REST, when to switch
114
+
115
+ ---
116
+
117
+ ### Scenario 3: Best Practices Discovery
118
+
119
+ **Use Case**: Learning recommended approaches for new technology
120
+
121
+ **Example Query**:
122
+ ```
123
+ "Best practices for TypeScript in large codebases"
124
+ ```
125
+
126
+ **What Happens**:
127
+ 1. Executes: `python ~/Agent-KB/intelligent_summarizer.py "TypeScript large codebase best practices"`
128
+ 2. Aggregates lessons from 300+ enterprise TypeScript projects
129
+ 3. Identifies common success patterns and anti-patterns
130
+ 4. Returns validated practices with confidence levels
131
+
132
+ **Output Includes**:
133
+ - **Strict Mode Configuration**: Recommended tsconfig.json settings
134
+ - **Code Organization**: Monorepo vs multi-repo, module structure
135
+ - **Type Safety**: Avoiding `any`, generic patterns, type guards
136
+ - **Build Performance**: Incremental compilation, project references
137
+ - **Team Workflows**: Pre-commit hooks, CI/CD integration
138
+
139
+ ---
140
+
141
+ ## Advanced Usage
142
+
143
+ ### Combining with Other Skills
144
+
145
+ **Agent-KB + multi-model-research**:
146
+ ```
147
+ 1. Use agent-kb to get historical expert insights
148
+ 2. Use multi-model-research for current architectural analysis
149
+ 3. Synthesize historical lessons + fresh perspectives
150
+ ```
151
+
152
+ **Agent-KB + code-review**:
153
+ ```
154
+ 1. Use code-review to identify issues
155
+ 2. Use agent-kb to find best practices for fixing them
156
+ 3. Apply validated patterns from historical cases
157
+ ```
158
+
159
+ ### Fallback Strategy
160
+
161
+ If `intelligent_summarizer.py` times out or fails:
162
+
163
+ **Automatic Fallback**:
164
+ ```bash
165
+ python ~/Agent-KB/claude_kb_query_optimized.py "query"
166
+ ```
167
+
168
+ This provides:
169
+ - Raw cases without LLM analysis (faster)
170
+ - Full historical context (more verbose)
171
+ - No 400-word limit (comprehensive)
172
+
173
+ **When to Use Fallback Manually**:
174
+ - Need complete case details
175
+ - Want to see original expert responses
176
+ - LLM summary seems incomplete
177
+
178
+ ---
179
+
180
+ ## Input/Output Format
181
+
182
+ ### Input Format
183
+
184
+ **Natural Language Questions**:
185
+ - "How to..." questions
186
+ - "Best practices for..."
187
+ - "What's the recommended..."
188
+ - "Should I use X or Y..."
189
+ - Performance/architecture queries
190
+
191
+ **Keywords to Include** (improves retrieval):
192
+ - Technology names (React, Node.js, PostgreSQL)
193
+ - Problem domain (performance, security, scalability)
194
+ - Constraints (large scale, microservices, real-time)
195
+
196
+ ### Output Format
197
+
198
+ **Structured Analysis**:
199
+ ```markdown
200
+ ## 🧠 Agent-KB Expert Analysis
201
+
202
+ **Query**: [Your question]
203
+
204
+ ### Core Recommendations
205
+ [3-5 key actionable insights]
206
+
207
+ ### Quantitative Metrics
208
+ [Performance numbers, benchmarks, impact percentages]
209
+
210
+ ### Common Pitfalls
211
+ [Known failure modes from historical cases]
212
+
213
+ ### Best Practices
214
+ [Validated approaches with confidence levels]
215
+
216
+ ### Related Topics
217
+ [Areas for deeper exploration]
218
+
219
+ ---
220
+ **Source**: Agent-KB (300+ cases)
221
+ **Analysis Method**: Local LLM intelligent summarization
222
+ ```
223
+
224
+ ---
225
+
226
+ ## Performance Characteristics
227
+
228
+ ### Speed
229
+
230
+ | Scenario | Response Time | Cache Hit |
231
+ |----------|--------------|-----------|
232
+ | First query (cold) | 8 seconds | No |
233
+ | Repeated query | 0.001s | Yes (~100%) |
234
+ | Similar query | 1-2 seconds | Partial |
235
+
236
+ ### Context Optimization
237
+
238
+ | Metric | Before | After | Savings |
239
+ |--------|--------|-------|---------|
240
+ | Raw cases | 2500+ words | 400 words | 83% |
241
+ | Token count | ~3000 | ~500 | 83% |
242
+ | Reading time | 10 minutes | 2 minutes | 80% |
243
+
244
+ ### Knowledge Coverage
245
+
246
+ **Covered Domains**:
247
+ - Frontend (40%): React, Vue, TypeScript, Performance
248
+ - Backend (30%): Node.js, Python, APIs, Microservices
249
+ - Database (15%): SQL, NoSQL, Query Optimization
250
+ - Architecture (10%): System Design, Scalability, Patterns
251
+ - DevOps (5%): CI/CD, Deployment, Monitoring
252
+
253
+ ---
254
+
255
+ ## Troubleshooting
256
+
257
+ ### Issue 1: Skill Doesn't Auto-Trigger
258
+
259
+ **Symptoms**: Asking technical question but agent-kb doesn't activate
260
+
261
+ **Solutions**:
262
+ 1. Include trigger keywords: "how to", "best practices", "optimization"
263
+ 2. Manually invoke: `Use agent-kb to answer: [question]`
264
+ 3. Check SKILL.md for description updates
265
+
266
+ ### Issue 2: Python Script Fails
267
+
268
+ **Symptoms**: `intelligent_summarizer.py` returns error
269
+
270
+ **Solutions**:
271
+ 1. **Fallback to optimized query**:
272
+ ```bash
273
+ python ~/Agent-KB/claude_kb_query_optimized.py "query"
274
+ ```
275
+ 2. **Check script exists**:
276
+ ```bash
277
+ ls ~/Agent-KB/intelligent_summarizer.py
278
+ ```
279
+ 3. **Verify Python environment**:
280
+ ```bash
281
+ python --version # Should be 3.8+
282
+ ```
283
+
284
+ ### Issue 3: Results Too Generic
285
+
286
+ **Symptoms**: Analysis doesn't address specific question
287
+
288
+ **Solutions**:
289
+ 1. **Add more context to query**:
290
+ - ❌ "How to optimize code?"
291
+ - ✅ "How to optimize React list rendering with 10,000+ items?"
292
+ 2. **Include constraints**:
293
+ - Technology stack (React, Node.js, PostgreSQL)
294
+ - Scale (1M+ users, 100+ microservices)
295
+ - Requirements (real-time, low latency)
296
+
297
+ ### Issue 4: Cache Not Working
298
+
299
+ **Symptoms**: Same query takes 8s every time
300
+
301
+ **Solutions**:
302
+ 1. Check cache file: `~/Agent-KB/.cache/`
303
+ 2. Verify query exact match (case-sensitive)
304
+ 3. Clear cache if corrupted: `rm -rf ~/Agent-KB/.cache/`
305
+
306
+ ---
307
+
308
+ ## Tips & Best Practices
309
+
310
+ ### Query Formulation
311
+
312
+ **Good Queries** ✅:
313
+ - "How to reduce API response time from 2s to 200ms in Node.js Express?"
314
+ - "Best practices for managing state in React app with 50+ components?"
315
+ - "Should I use MongoDB or PostgreSQL for e-commerce product catalog with 1M+ SKUs?"
316
+
317
+ **Poor Queries** ❌:
318
+ - "Make code faster" (too vague)
319
+ - "Fix bug" (no context)
320
+ - "Help me" (not specific)
321
+
322
+ ### Maximizing Value
323
+
324
+ 1. **Start Broad, Then Narrow**:
325
+ ```
326
+ First: "Best practices for microservices"
327
+ Then: "How to handle distributed transactions in microservices?"
328
+ ```
329
+
330
+ 2. **Combine Insights**:
331
+ - Query related topics
332
+ - Build comprehensive understanding
333
+ - Cross-reference recommendations
334
+
335
+ 3. **Validate with Follow-up**:
336
+ - Ask for code examples
337
+ - Request implementation assistance
338
+ - Explore related topics
339
+
340
+ ### Integration Workflows
341
+
342
+ **Research → Plan → Implement**:
343
+ ```
344
+ 1. agent-kb: Get historical best practices
345
+ 2. multi-model-research: Get current analysis
346
+ 3. brainstorming: Design approach
347
+ 4. Implement with validated patterns
348
+ ```
349
+
350
+ **Debug → Learn → Prevent**:
351
+ ```
352
+ 1. Encounter bug or performance issue
353
+ 2. agent-kb: Find similar cases and solutions
354
+ 3. code-review: Apply lessons to current code
355
+ 4. Document pattern to prevent recurrence
356
+ ```
357
+
358
+ ---
359
+
360
+ ## Real-World Examples
361
+
362
+ ### Example 1: Database Query Optimization
363
+
364
+ **Query**: "How to optimize slow PostgreSQL queries in production?"
365
+
366
+ **Agent-KB Returns**:
367
+ - **Core Recommendations**: Add indexes, use EXPLAIN ANALYZE, connection pooling
368
+ - **Metrics**: 10-100x speedup with proper indexes, 40% reduction with connection pooling
369
+ - **Pitfalls**: Over-indexing slows writes, missing vacuum causes bloat
370
+ - **Best Practices**: Monitor query performance, use read replicas, cache frequent queries
371
+
372
+ **Follow-up Actions**:
373
+ - Apply EXPLAIN ANALYZE to specific slow queries
374
+ - Implement recommended indexes
375
+ - Set up query performance monitoring
376
+
377
+ ---
378
+
379
+ ### Example 2: React Performance Debugging
380
+
381
+ **Query**: "React app slows down after 30 minutes of use - how to diagnose?"
382
+
383
+ **Agent-KB Returns**:
384
+ - **Core Recommendations**: Check for memory leaks, profile with Chrome DevTools, inspect event listeners
385
+ - **Metrics**: Memory leaks cause 2-10x slowdown over time, event listener accumulation common cause
386
+ - **Pitfalls**: Forgetting to cleanup useEffect, closures capturing old state
387
+ - **Best Practices**: Use React DevTools Profiler, cleanup in useEffect return, avoid inline functions in JSX
388
+
389
+ **Follow-up Actions**:
390
+ - Profile app with Chrome DevTools Performance
391
+ - Check for useEffect cleanup issues
392
+ - Identify components with high re-render count
393
+
394
+ ---
395
+
396
+ ### Example 3: Microservices Communication Pattern
397
+
398
+ **Query**: "Should I use message queue or HTTP for microservices communication?"
399
+
400
+ **Agent-KB Returns**:
401
+ - **Trade-off Analysis**: HTTP for synchronous, message queue for async/decoupled
402
+ - **Use Cases**: HTTP for user-facing APIs, queue for background processing
403
+ - **Metrics**: HTTP adds coupling, queue adds eventual consistency complexity
404
+ - **Best Practices**: Hybrid approach, HTTP for queries, queue for commands
405
+
406
+ **Follow-up Actions**:
407
+ - Map services to synchronous vs asynchronous needs
408
+ - Choose appropriate pattern per service pair
409
+ - Design retry and error handling strategy
410
+
411
+ ---
412
+
413
+ ## Skill Metadata
414
+
415
+ - **Version**: 2.0 (Intelligent Analysis with LLM)
416
+ - **Last Updated**: 2025-12-30
417
+ - **Knowledge Base**: ~/Agent-KB/ (300+ cases)
418
+ - **Python Scripts**:
419
+ - ~/Agent-KB/intelligent_summarizer.py (primary)
420
+ - ~/Agent-KB/claude_kb_query_optimized.py (fallback)
421
+ - **Cache**: ~/Agent-KB/.cache/
422
+
423
+ ## Related Skills
424
+
425
+ - **multi-model-research**: Combine historical insights with fresh analysis
426
+ - **code-review**: Apply best practices to code review findings
427
+ - **quality-check**: Use patterns from agent-kb in quality assessments
428
+ - **brainstorming**: Leverage historical lessons in design phase
@@ -0,0 +1,46 @@
1
+ # Agent-KB Intelligent Analysis
2
+
3
+ Query 300+ expert technical cases with intelligent LLM summarization. Get actionable recommendations with 83% context optimization.
4
+
5
+ ## Quick Install
6
+
7
+ ```bash
8
+ # Already installed at:
9
+ ~/.claude/skills/agent-kb/
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ```
15
+ "How to optimize React list rendering?"
16
+ "Best practices for microservices communication?"
17
+ "What's the recommended approach for API rate limiting?"
18
+ ```
19
+
20
+ ## What It Does
21
+
22
+ - ✅ Searches 300+ historical expert cases
23
+ - ✅ Analyzes with local LLM (83% context reduction)
24
+ - ✅ Returns 400-word actionable summaries
25
+ - ✅ ~100% cache hit rate for common questions
26
+
27
+ ## Files
28
+
29
+ - `SKILL.md` - Complete skill methodology
30
+ - `README.md` - This quick start guide
31
+ - `HOW_TO_USE.md` - Detailed usage examples
32
+ - `scripts/` - Empty (intelligent_summarizer.py at ~/Agent-KB/)
33
+
34
+ ## Performance
35
+
36
+ - **Speed**: 0.001s (cached), 8s (first query)
37
+ - **Coverage**: Frontend, Backend, Database, Architecture, DevOps
38
+ - **Knowledge Base**: ~/Agent-KB/ (300+ cases)
39
+
40
+ ## When to Use
41
+
42
+ - Technical "how to" questions
43
+ - Best practices inquiries
44
+ - Performance optimization advice
45
+ - Architecture decisions
46
+ - Implementation guidance
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: Agent-KB Intelligent Analysis
3
+ description: Query the Agent-KB knowledge base for expert technical advice, best practices, and implementation guidance with 83% context optimization.
4
+ ---
5
+
6
+ # Agent-KB Intelligent Analysis Skill
7
+
8
+ ## When to Use This Skill
9
+
10
+ Automatically invoke this Skill when:
11
+ - User asks "how to" technical questions
12
+ - User requests best practices or patterns
13
+ - User needs performance optimization advice
14
+ - User asks about architecture decisions
15
+ - User wants to know implementation approaches
16
+ - Keywords: "best practice", "how to", "optimization", "pattern", "architecture"
17
+
18
+ ## What This Skill Does
19
+
20
+ **Agent-KB** is an intelligent reasoning system that:
21
+ 1. **Searches** 300+ historical expert cases
22
+ 2. **Analyzes** with local LLM to extract insights
23
+ 3. **Summarizes** into 400-word actionable recommendations
24
+ 4. **Optimizes** context by 83% vs raw cases
25
+
26
+ ## Instructions
27
+
28
+ When this Skill is invoked:
29
+
30
+ ### Step 1: Execute the Query
31
+
32
+ **IMPORTANT**: You MUST execute this Python command:
33
+
34
+ ```bash
35
+ python /Users/WangQiao/Agent-KB/intelligent_summarizer.py "user's technical question"
36
+ ```
37
+
38
+ ### Step 2: Present Results
39
+
40
+ Format the output as:
41
+
42
+ ```markdown
43
+ ## 🧠 Agent-KB Expert Analysis
44
+
45
+ **Query**: [User's Question]
46
+
47
+ ### Core Recommendations
48
+ [Key actionable insights from analysis]
49
+
50
+ ### Quantitative Metrics
51
+ [Performance data, benchmarks, specific numbers]
52
+
53
+ ### Common Pitfalls
54
+ [Known issues from historical cases]
55
+
56
+ ### Best Practices
57
+ [Validated approaches from successful implementations]
58
+
59
+ ### Related Topics
60
+ [Relevant areas for deeper exploration]
61
+
62
+ ---
63
+ **Source**: Agent-KB Knowledge Base (300+ expert cases)
64
+ **Analysis Method**: Local LLM intelligent summarization
65
+ ```
66
+
67
+ ### Step 3: Offer Follow-up
68
+
69
+ Ask if the user wants:
70
+ - More details on any recommendation
71
+ - Related topics exploration
72
+ - Implementation assistance
73
+ - Code examples
74
+
75
+ ## Examples
76
+
77
+ ### Example 1: Performance Question
78
+ **User**: "How to optimize React list rendering?"
79
+
80
+ **You execute**:
81
+ ```bash
82
+ python /Users/WangQiao/Agent-KB/intelligent_summarizer.py "React list rendering optimization"
83
+ ```
84
+
85
+ **You present**: Structured analysis with useMemo/useCallback recommendations, virtual scrolling suggestions, and performance metrics.
86
+
87
+ ### Example 2: Architecture Question
88
+ **User**: "Best practices for microservices communication?"
89
+
90
+ **You execute**:
91
+ ```bash
92
+ python /Users/WangQiao/Agent-KB/intelligent_summarizer.py "microservices communication patterns"
93
+ ```
94
+
95
+ **You present**: Analysis of message queues, service mesh, API gateways with pros/cons.
96
+
97
+ ## Performance Characteristics
98
+
99
+ - **Retrieval Speed**: 0.001s (cached queries), 8s (first query)
100
+ - **Context Savings**: 83% reduction (2500+ words → 400 words)
101
+ - **Knowledge Base**: 300+ expert cases
102
+ - **Cache Hit Rate**: ~100% for common questions
103
+
104
+ ## Fallback Strategy
105
+
106
+ If `intelligent_summarizer.py` fails, use the optimized query:
107
+
108
+ ```bash
109
+ python /Users/WangQiao/Agent-KB/claude_kb_query_optimized.py "query"
110
+ ```
111
+
112
+ This provides raw cases without LLM analysis.
113
+
114
+ ## Important Notes
115
+
116
+ - **Always execute** the Python command, don't just describe what it would do
117
+ - **Present structured output**, not raw Python output
118
+ - **Offer actionable advice**, not just information
119
+ - **Include metrics** when available from the analysis
120
+ - **Cite confidence** levels from the analysis results
121
+
122
+ ## Knowledge Coverage
123
+
124
+ - Frontend: React, Vue, TypeScript, Performance
125
+ - Backend: Node.js, Python, Microservices, APIs
126
+ - Database: SQL, NoSQL, Query Optimization
127
+ - Architecture: System Design, Scalability, Patterns
128
+ - DevOps: CI/CD, Deployment, Monitoring