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,56 @@
1
+ ---
2
+ name: deepsearch
3
+ description: Thorough codebase search
4
+ ---
5
+
6
+ # Deep Search Mode
7
+
8
+
9
+ ## Native Subagent Protocol (Codex)
10
+
11
+ Codex supports native subagents. Delegate with `spawn_agent`, coordinate with `send_input`, collect via `wait`, and clean up with `close_agent`.
12
+
13
+ Execution preference:
14
+ 1. Use native subagents first for independent workstreams (parallel when possible).
15
+ 2. Merge results in main thread and run final verification.
16
+ 3. Fallback only when delegation is blocked: use the `[ANALYST]`/`[ARCHITECT]`/`[EXECUTOR]`/`[REVIEWER]` structure in a single response.
17
+
18
+ Minimal orchestration pattern:
19
+ ```text
20
+ spawn_agent -> send_input (optional) -> wait -> close_agent
21
+ ```
22
+
23
+ > Codex invocation: use `$deepsearch ...` or `deepsearch: ...`
24
+
25
+
26
+ [DEEPSEARCH MODE ACTIVATED]
27
+
28
+ ## Objective
29
+
30
+ Perform thorough search of the codebase for the specified query, pattern, or concept.
31
+
32
+ ## Search Strategy
33
+
34
+ 1. **Broad Search**
35
+ - Search for exact matches
36
+ - Search for related terms and variations
37
+ - Check common locations (components, utils, services, hooks)
38
+
39
+ 2. **Deep Dive**
40
+ - Read files with matches
41
+ - Check imports/exports to find connections
42
+ - Follow the trail (what imports this? what does this import?)
43
+
44
+ 3. **Synthesize**
45
+ - Map out where the concept is used
46
+ - Identify the main implementation
47
+ - Note related functionality
48
+
49
+ ## Output Format
50
+
51
+ - **Primary Locations** (main implementations)
52
+ - **Related Files** (dependencies, consumers)
53
+ - **Usage Patterns** (how it's used across the codebase)
54
+ - **Key Insights** (patterns, conventions, gotchas)
55
+
56
+ Focus on being comprehensive but concise. Cite file paths and line numbers.
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: doctor
3
+ description: Diagnose and fix oh-my-codex installation issues
4
+ ---
5
+
6
+ # Doctor Skill
7
+
8
+
9
+ ## Native Subagent Protocol (Codex)
10
+
11
+ Codex supports native subagents. Delegate with `spawn_agent`, coordinate with `send_input`, collect via `wait`, and clean up with `close_agent`.
12
+
13
+ Execution preference:
14
+ 1. Use native subagents first for independent workstreams (parallel when possible).
15
+ 2. Merge results in main thread and run final verification.
16
+ 3. Fallback only when delegation is blocked: use the `[ANALYST]`/`[ARCHITECT]`/`[EXECUTOR]`/`[REVIEWER]` structure in a single response.
17
+
18
+ Minimal orchestration pattern:
19
+ ```text
20
+ spawn_agent -> send_input (optional) -> wait -> close_agent
21
+ ```
22
+
23
+ > Codex invocation: use `$doctor ...` or `doctor: ...`
24
+
25
+ ## Task: Run Installation Diagnostics
26
+
27
+ You are the OMC Doctor - diagnose and fix installation issues for Codex CLI.
28
+
29
+ ### Step 1: Check Codex CLI
30
+
31
+ ```bash
32
+ # Check if codex is available
33
+ if command -v codex &> /dev/null; then
34
+ echo "Codex CLI: Installed ($(which codex))"
35
+ else
36
+ echo "Codex CLI: CRITICAL - Not found in PATH"
37
+ fi
38
+ ```
39
+
40
+ ### Step 2: Check Configuration Directory
41
+
42
+ ```bash
43
+ # Check global config dir
44
+ if [ -d "$HOME/.codex" ]; then
45
+ echo "Global config: OK (~/.codex)"
46
+ else
47
+ echo "Global config: CRITICAL - ~/.codex missing"
48
+ fi
49
+
50
+ # Check config.toml
51
+ if [ -f "$HOME/.codex/config.toml" ]; then
52
+ echo "Config file: OK (~/.codex/config.toml)"
53
+ # Check for plan mode
54
+ grep -q "collaboration_modes = true" "$HOME/.codex/config.toml" && echo "Plan Mode: Enabled" || echo "Plan Mode: Disabled (Native collaboration_modes=false)"
55
+ else
56
+ echo "Config file: WARN - ~/.codex/config.toml missing"
57
+ fi
58
+ ```
59
+
60
+ ### Step 3: Check Skills Installation
61
+
62
+ ```bash
63
+ # Check global skills
64
+ SKILLS_COUNT=$(find ~/.codex/skills -name "SKILL.md" 2>/dev/null | wc -l)
65
+ if [ "$SKILLS_COUNT" -gt 0 ]; then
66
+ echo "Global Skills: OK ($SKILLS_COUNT skills installed)"
67
+ else
68
+ echo "Global Skills: WARN - No skills found in ~/.codex/skills"
69
+ fi
70
+
71
+ # Check for specific key skills
72
+ [ -f ~/.codex/skills/omc-setup/SKILL.md ] && echo " - omc-setup: OK" || echo " - omc-setup: MISSING"
73
+ [ -f ~/.codex/skills/aireview/SKILL.md ] && echo " - aireview: OK" || echo " - aireview: MISSING"
74
+ ```
75
+
76
+ ### Step 4: Check CLAUDE.md (Project Config)
77
+
78
+ ```bash
79
+ # Check if CLAUDE.md exists globally
80
+ if [ -f ~/.codex/CLAUDE.md ]; then
81
+ echo "Global CLAUDE.md: OK"
82
+ grep -q "oh-my-codex" ~/.codex/CLAUDE.md && echo " - OMC Header: Found" || echo " - OMC Header: Missing"
83
+ else
84
+ echo "Global CLAUDE.md: WARN - Missing"
85
+ fi
86
+ ```
87
+
88
+ ### Step 5: Check Legacy Artifacts
89
+
90
+ ```bash
91
+ # Check for legacy plugin cache from older setups (usually safe to remove)
92
+ if [ -d ~/.codex/plugins ]; then
93
+ echo "Legacy plugin cache found at ~/.codex/plugins (optional cleanup)"
94
+ fi
95
+ ```
96
+
97
+ ---
98
+
99
+ ## Report Format
100
+
101
+ After running all checks, output a report:
102
+
103
+ ```
104
+ ## OMC Doctor Report
105
+
106
+ ### Summary
107
+ [HEALTHY / ISSUES FOUND]
108
+
109
+ ### Checks
110
+
111
+ | Check | Status | Details |
112
+ |-------|--------|---------|
113
+ | Codex CLI | OK/CRITICAL | ... |
114
+ | Config Dir | OK/CRITICAL | ... |
115
+ | Plan Mode | INFO | ... |
116
+ | Global Skills | OK/WARN | ... |
117
+ | CLAUDE.md | OK/WARN | ... |
118
+
119
+ ### Issues Found
120
+ 1. [Issue description]
121
+
122
+ ### Recommended Fixes
123
+ [List fixes based on issues]
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Auto-Fix (if user confirms)
129
+
130
+ If issues found, ask user: "Would you like me to fix these issues automatically?"
131
+
132
+ If yes, apply fixes:
133
+
134
+ ### Fix: Missing Skills
135
+ Recommend running the installer script:
136
+ ```bash
137
+ echo "Run: ./scripts/install-codex.sh --all"
138
+ ```
139
+
140
+ ### Fix: Legacy Plugin Cache
141
+ ```bash
142
+ rm -rf ~/.codex/plugins
143
+ echo "Legacy plugin cache removed (from older setups)."
144
+ ```
145
+
146
+ ### Fix: Missing CLAUDE.md
147
+ Download fresh global CLAUDE.md:
148
+ ```bash
149
+ curl -fsSL "https://raw.githubusercontent.com/Yeachan-Heo/oh-my-codex/main/docs/CLAUDE.md" -o ~/.codex/CLAUDE.md
150
+ echo "Downloaded default CLAUDE.md"
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Post-Fix
156
+
157
+ After applying fixes, inform user:
158
+ > Fixes applied. Run `$doctor` again to verify.
@@ -0,0 +1,382 @@
1
+ # Draw.io 实用案例和代码示例
2
+
3
+ ## 🎯 快速案例索引
4
+
5
+ - [案例1: 微服务架构图](#案例1-微服务架构图)
6
+ - [案例2: AWS云架构图](#案例2-aws云架构图)
7
+ - [案例3: 数据流图](#案例3-数据流图)
8
+ - [案例4: 业务流程图](#案例4-业务流程图)
9
+ - [案例5: 数据库ER图](#案例5-数据库er图)
10
+
11
+ ---
12
+
13
+ ## 案例1: 微服务架构图
14
+
15
+ ### 场景描述
16
+ 为电商系统生成微服务架构图,包含API网关、多个服务和数据库
17
+
18
+ ### 提示词示例
19
+
20
+ ```
21
+ 帮我在Draw.io中创建一个电商系统的微服务架构图:
22
+
23
+ 1. 顶层:API Gateway
24
+ 2. 中层:订单服务、商品服务、用户服务(水平排列)
25
+ 3. 底层:各自对应的数据库
26
+ 4. 使用蓝色系配色
27
+ 5. 添加箭头连线表示调用关系
28
+ ```
29
+
30
+ ### 预期输出结构
31
+
32
+ ```yaml
33
+ 布局:
34
+ API Gateway: (300, 50)
35
+ ↓ ↓ ↓
36
+ 订单服务(100,200) | 商品服务(300,200) | 用户服务(500,200)
37
+ ↓ ↓ ↓
38
+ 订单DB(100,350) | 商品DB(300,350) | 用户DB(500,350)
39
+
40
+ 样式:
41
+ - 服务: 蓝色矩形 (#1ba1e2)
42
+ - 数据库: 绿色圆角矩形 (#43A047)
43
+ - 连线: 实线箭头
44
+ ```
45
+
46
+ ---
47
+
48
+ ## 案例2: AWS云架构图
49
+
50
+ ### 场景描述
51
+ 使用AWS图标生成Serverless架构图
52
+
53
+ ### 提示词示例
54
+
55
+ ```
56
+ 使用Draw.io AWS图标库创建Serverless架构:
57
+
58
+ 1. 前端:S3静态网站托管
59
+ 2. API层:API Gateway
60
+ 3. 计算层:3个Lambda函数
61
+ 4. 数据层:DynamoDB数据库
62
+ 5. 使用AWS官方配色
63
+ 6. 添加数据流向箭头
64
+ ```
65
+
66
+ ### AWS样式参考
67
+
68
+ ```javascript
69
+ // Lambda函数
70
+ fillColor=#FF9900;strokeColor=#232F3E;fontColor=#FFFFFF;rounded=1;
71
+
72
+ // S3
73
+ fillColor=#569A31;strokeColor=#232F3E;fontColor=#FFFFFF;rounded=1;
74
+
75
+ // DynamoDB
76
+ fillColor=#2E73B8;strokeColor=#232F3E;fontColor=#FFFFFF;rounded=1;
77
+
78
+ // API Gateway
79
+ fillColor=#FF4F8B;strokeColor=#232F3E;fontColor=#FFFFFF;rounded=1;
80
+ ```
81
+
82
+ ---
83
+
84
+ ## 案例3: 数据流图
85
+
86
+ ### 场景描述
87
+ 展示用户注册流程的数据流
88
+
89
+ ### 提示词示例
90
+
91
+ ```
92
+ 创建用户注册流程的数据流图:
93
+
94
+ 流程:
95
+ 1. 用户输入 → 前端表单
96
+ 2. 前端表单 → 后端API
97
+ 3. 后端API → 数据库(保存用户)
98
+ 4. 后端API → 邮件服务(发送验证邮件)
99
+ 5. 邮件服务 → 用户邮箱
100
+
101
+ 要求:
102
+ - 主流程用实线箭头
103
+ - 异步操作(邮件)用虚线箭头
104
+ - 使用不同颜色区分组件类型
105
+ ```
106
+
107
+ ### 连线样式参考
108
+
109
+ ```javascript
110
+ // 实线箭头(主流程)
111
+ edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeWidth=2;endArrow=classic;
112
+
113
+ // 虚线箭头(异步操作)
114
+ edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;dashed=1;dashPattern=5 5;strokeWidth=2;endArrow=classic;
115
+
116
+ // 双向箭头
117
+ edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeWidth=2;startArrow=classic;endArrow=classic;
118
+ ```
119
+
120
+ ---
121
+
122
+ ## 案例4: 业务流程图
123
+
124
+ ### 场景描述
125
+ 订单处理业务流程可视化
126
+
127
+ ### 提示词示例
128
+
129
+ ```
130
+ 绘制订单处理流程图:
131
+
132
+ 开始 → 提交订单 → 库存检查
133
+
134
+ 库存足够?
135
+ - 是 → 创建订单 → 发起支付 → 支付成功?
136
+ - 是 → 扣减库存 → 发货 → 结束
137
+ - 否 → 取消订单 → 结束
138
+ - 否 → 显示缺货 → 结束
139
+
140
+ 使用传统流程图符号:
141
+ - 圆角矩形:开始/结束
142
+ - 矩形:处理步骤
143
+ - 菱形:判断节点
144
+ ```
145
+
146
+ ### 流程图图形
147
+
148
+ ```yaml
149
+ 开始/结束:
150
+ 图形: 圆角矩形
151
+ 样式: fillColor=#e1f5fe;strokeColor=#01579b;rounded=1;
152
+
153
+ 处理步骤:
154
+ 图形: 矩形
155
+ 样式: fillColor=#fff9c4;strokeColor=#f57f17;
156
+
157
+ 判断节点:
158
+ 图形: 菱形
159
+ 样式: fillColor=#ffccbc;strokeColor=#bf360c;shape=rhombus;
160
+ ```
161
+
162
+ ---
163
+
164
+ ## 案例5: 数据库ER图
165
+
166
+ ### 场景描述
167
+ 博客系统的实体关系图
168
+
169
+ ### 提示词示例
170
+
171
+ ```
172
+ 创建博客系统的ER图:
173
+
174
+ 实体:
175
+ 1. 用户(Users)
176
+ - id (PK)
177
+ - username
178
+ - email
179
+
180
+ 2. 文章(Posts)
181
+ - id (PK)
182
+ - user_id (FK)
183
+ - title
184
+ - content
185
+ - created_at
186
+
187
+ 3. 评论(Comments)
188
+ - id (PK)
189
+ - post_id (FK)
190
+ - user_id (FK)
191
+ - content
192
+ - created_at
193
+
194
+ 关系:
195
+ - 用户 1:N 文章
196
+ - 文章 1:N 评论
197
+ - 用户 1:N 评论
198
+
199
+ 使用UML类图样式
200
+ ```
201
+
202
+ ### ER图样式
203
+
204
+ ```javascript
205
+ // 实体表
206
+ fillColor=#fff4e6;strokeColor=#e65100;fontColor=#000000;align=left;verticalAlign=top;
207
+
208
+ // 主键
209
+ fontStyle=1;fontColor=#d32f2f;
210
+
211
+ // 外键
212
+ fontStyle=2;fontColor=#1976d2;
213
+
214
+ // 关系线
215
+ edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeWidth=2;endArrow=ERmany;startArrow=ERone;
216
+ ```
217
+
218
+ ---
219
+
220
+ ## 🎨 通用样式模板
221
+
222
+ ### 配色方案
223
+
224
+ #### 1. 现代蓝色系
225
+ ```javascript
226
+ primary: fillColor=#1976d2;strokeColor=#0d47a1;fontColor=#ffffff;
227
+ secondary: fillColor=#42a5f5;strokeColor=#1976d2;fontColor=#ffffff;
228
+ accent: fillColor=#ff9800;strokeColor=#e65100;fontColor=#ffffff;
229
+ ```
230
+
231
+ #### 2. 专业灰色系
232
+ ```javascript
233
+ dark: fillColor=#37474f;strokeColor=#263238;fontColor=#ffffff;
234
+ medium: fillColor=#78909c;strokeColor=#546e7a;fontColor=#ffffff;
235
+ light: fillColor=#cfd8dc;strokeColor=#90a4ae;fontColor=#000000;
236
+ ```
237
+
238
+ #### 3. 清新绿色系
239
+ ```javascript
240
+ primary: fillColor=#4caf50;strokeColor=#2e7d32;fontColor=#ffffff;
241
+ secondary: fillColor=#81c784;strokeColor=#4caf50;fontColor=#ffffff;
242
+ accent: fillColor=#ffc107;strokeColor=#f57c00;fontColor=#000000;
243
+ ```
244
+
245
+ ---
246
+
247
+ ## 💡 最佳实践技巧
248
+
249
+ ### 1. 坐标规划技巧
250
+
251
+ ```yaml
252
+ 网格系统:
253
+ - 使用100的倍数作为基准坐标
254
+ - 水平间距: 200px (标准), 150px (紧凑)
255
+ - 垂直间距: 150px (标准), 100px (紧凑)
256
+
257
+ 示例:
258
+ 第一行: y=50 → (100,50), (300,50), (500,50)
259
+ 第二行: y=200 → (100,200), (300,200), (500,200)
260
+ 第三行: y=350 → (100,350), (300,350), (500,350)
261
+ ```
262
+
263
+ ### 2. 图形尺寸标准
264
+
265
+ ```yaml
266
+ 图标/小组件:
267
+ - 尺寸: 60x60
268
+ - 适用: 图标、小节点
269
+
270
+ 标准组件:
271
+ - 尺寸: 120x60 或 150x80
272
+ - 适用: 服务、API、模块
273
+
274
+ 大容器:
275
+ - 尺寸: 200x120 或 250x150
276
+ - 适用: 系统、子系统、大模块
277
+
278
+ 文本标签:
279
+ - 尺寸: 100x30
280
+ - 适用: 注释、说明文字
281
+ ```
282
+
283
+ ### 3. 分层布局策略
284
+
285
+ ```yaml
286
+ 垂直分层(推荐用于架构图):
287
+ 顶层 (y=50-150): 前端、客户端
288
+ 中层 (y=200-300): API、服务层
289
+ 底层 (y=350-450): 数据库、存储
290
+
291
+ 水平分层(推荐用于流程图):
292
+ 左侧 (x=50-200): 输入、开始
293
+ 中部 (x=250-550): 处理、转换
294
+ 右侧 (x=600-750): 输出、结束
295
+ ```
296
+
297
+ ### 4. 连线最佳实践
298
+
299
+ ```yaml
300
+ 箭头类型:
301
+ - 实线箭头: 主要数据流、直接调用
302
+ - 虚线箭头: 异步操作、间接依赖
303
+ - 双向箭头: 双向通信、同步操作
304
+ - 无箭头: 关联关系、非方向性
305
+
306
+ 连线样式:
307
+ - 正交连线 (orthogonalEdgeStyle): 专业、规整
308
+ - 直线连线 (straight): 简洁、直接
309
+ - 曲线连线 (curved): 优雅、艺术
310
+ ```
311
+
312
+ ---
313
+
314
+ ## 🔥 高级案例
315
+
316
+ ### Kubernetes架构图
317
+
318
+ ```yaml
319
+ 提示词:
320
+ "创建Kubernetes集群架构图:
321
+ - Master节点(API Server, Scheduler, Controller)
322
+ - 3个Worker节点
323
+ - 每个Worker节点有2个Pod
324
+ - Etcd数据库
325
+ - 使用Kubernetes官方图标和配色"
326
+
327
+ 关键点:
328
+ - 使用K8s形状库
329
+ - 分层布局(Master → Workers → Storage)
330
+ - 使用不同颜色区分组件类型
331
+ ```
332
+
333
+ ### CI/CD流程图
334
+
335
+ ```yaml
336
+ 提示词:
337
+ "绘制GitLab CI/CD流程:
338
+ 1. 代码提交 → GitLab
339
+ 2. 触发Pipeline → Build → Test → Deploy
340
+ 3. 部署环境:Dev, Staging, Production
341
+ 4. 每个环节显示通过/失败状态"
342
+
343
+ 关键点:
344
+ - 水平时间线布局
345
+ - 使用不同颜色表示环节状态
346
+ - 添加条件分支(测试失败则停止)
347
+ ```
348
+
349
+ ---
350
+
351
+ ## 📚 形状库参考
352
+
353
+ ### 常用形状分类
354
+
355
+ ```yaml
356
+ 基础形状:
357
+ - Rectangle (矩形)
358
+ - Rounded Rectangle (圆角矩形)
359
+ - Circle (圆形)
360
+ - Ellipse (椭圆)
361
+ - Diamond (菱形)
362
+
363
+ 流程图:
364
+ - Process (处理)
365
+ - Decision (判断)
366
+ - Start/End (开始/结束)
367
+ - Data (数据)
368
+ - Database (数据库)
369
+
370
+ 云服务商:
371
+ - AWS: Lambda, S3, RDS, EC2, API Gateway
372
+ - Azure: Functions, Blob Storage, SQL Database
373
+ - GCP: Cloud Functions, Cloud Storage, Cloud SQL
374
+
375
+ 容器化:
376
+ - Docker: Container, Image, Volume
377
+ - Kubernetes: Pod, Service, Deployment, ConfigMap
378
+ ```
379
+
380
+ ---
381
+
382
+ **💡 提示**: 保存这些案例作为模板,需要时快速复用!