oh-my-customcode 0.12.1 → 0.12.3

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 (134) hide show
  1. package/README.md +8 -11
  2. package/dist/cli/index.js +137 -336
  3. package/dist/index.js +99 -260
  4. package/package.json +2 -4
  5. package/templates/.claude/skills/codex-exec/SKILL.md +123 -0
  6. package/templates/.claude/skills/codex-exec/scripts/codex-wrapper.cjs +413 -0
  7. package/templates/CLAUDE.md.en +1 -0
  8. package/templates/CLAUDE.md.ko +1 -0
  9. package/templates/.codex/agents/arch-documenter.md +0 -33
  10. package/templates/.codex/agents/arch-speckit-agent.md +0 -47
  11. package/templates/.codex/agents/be-express-expert.md +0 -30
  12. package/templates/.codex/agents/be-fastapi-expert.md +0 -43
  13. package/templates/.codex/agents/be-go-backend-expert.md +0 -43
  14. package/templates/.codex/agents/be-nestjs-expert.md +0 -28
  15. package/templates/.codex/agents/be-springboot-expert.md +0 -40
  16. package/templates/.codex/agents/db-postgres-expert.md +0 -36
  17. package/templates/.codex/agents/db-redis-expert.md +0 -36
  18. package/templates/.codex/agents/db-supabase-expert.md +0 -35
  19. package/templates/.codex/agents/de-airflow-expert.md +0 -34
  20. package/templates/.codex/agents/de-dbt-expert.md +0 -34
  21. package/templates/.codex/agents/de-kafka-expert.md +0 -81
  22. package/templates/.codex/agents/de-pipeline-expert.md +0 -32
  23. package/templates/.codex/agents/de-snowflake-expert.md +0 -36
  24. package/templates/.codex/agents/de-spark-expert.md +0 -36
  25. package/templates/.codex/agents/fe-svelte-agent.md +0 -29
  26. package/templates/.codex/agents/fe-vercel-agent.md +0 -37
  27. package/templates/.codex/agents/fe-vuejs-agent.md +0 -30
  28. package/templates/.codex/agents/infra-aws-expert.md +0 -47
  29. package/templates/.codex/agents/infra-docker-expert.md +0 -47
  30. package/templates/.codex/agents/lang-golang-expert.md +0 -43
  31. package/templates/.codex/agents/lang-java21-expert.md +0 -39
  32. package/templates/.codex/agents/lang-kotlin-expert.md +0 -43
  33. package/templates/.codex/agents/lang-python-expert.md +0 -43
  34. package/templates/.codex/agents/lang-rust-expert.md +0 -43
  35. package/templates/.codex/agents/lang-typescript-expert.md +0 -43
  36. package/templates/.codex/agents/mgr-claude-code-bible.md +0 -58
  37. package/templates/.codex/agents/mgr-creator.md +0 -39
  38. package/templates/.codex/agents/mgr-gitnerd.md +0 -45
  39. package/templates/.codex/agents/mgr-sauron.md +0 -161
  40. package/templates/.codex/agents/mgr-supplier.md +0 -35
  41. package/templates/.codex/agents/mgr-sync-checker.md +0 -38
  42. package/templates/.codex/agents/mgr-updater.md +0 -33
  43. package/templates/.codex/agents/qa-engineer.md +0 -32
  44. package/templates/.codex/agents/qa-planner.md +0 -73
  45. package/templates/.codex/agents/qa-writer.md +0 -27
  46. package/templates/.codex/agents/sys-memory-keeper.md +0 -43
  47. package/templates/.codex/agents/sys-naggy.md +0 -37
  48. package/templates/.codex/agents/tool-bun-expert.md +0 -26
  49. package/templates/.codex/agents/tool-npm-expert.md +0 -30
  50. package/templates/.codex/agents/tool-optimizer.md +0 -34
  51. package/templates/.codex/codex-native-hash.txt +0 -1
  52. package/templates/.codex/contexts/dev.md +0 -20
  53. package/templates/.codex/contexts/ecomode.md +0 -63
  54. package/templates/.codex/contexts/index.yaml +0 -41
  55. package/templates/.codex/contexts/research.md +0 -28
  56. package/templates/.codex/contexts/review.md +0 -23
  57. package/templates/.codex/hooks/hooks.json +0 -150
  58. package/templates/.codex/install-hooks.sh +0 -100
  59. package/templates/.codex/rules/MAY-optimization.md +0 -29
  60. package/templates/.codex/rules/MUST-agent-design.md +0 -57
  61. package/templates/.codex/rules/MUST-agent-identification.md +0 -29
  62. package/templates/.codex/rules/MUST-continuous-improvement.md +0 -25
  63. package/templates/.codex/rules/MUST-intent-transparency.md +0 -42
  64. package/templates/.codex/rules/MUST-language-policy.md +0 -27
  65. package/templates/.codex/rules/MUST-orchestrator-coordination.md +0 -128
  66. package/templates/.codex/rules/MUST-parallel-execution.md +0 -97
  67. package/templates/.codex/rules/MUST-permissions.md +0 -30
  68. package/templates/.codex/rules/MUST-safety.md +0 -23
  69. package/templates/.codex/rules/MUST-sync-verification.md +0 -125
  70. package/templates/.codex/rules/MUST-tool-identification.md +0 -82
  71. package/templates/.codex/rules/SHOULD-agent-teams.md +0 -39
  72. package/templates/.codex/rules/SHOULD-ecomode.md +0 -37
  73. package/templates/.codex/rules/SHOULD-error-handling.md +0 -33
  74. package/templates/.codex/rules/SHOULD-hud-statusline.md +0 -32
  75. package/templates/.codex/rules/SHOULD-interaction.md +0 -34
  76. package/templates/.codex/rules/SHOULD-memory-integration.md +0 -39
  77. package/templates/.codex/rules/index.yaml +0 -141
  78. package/templates/.codex/skills/airflow-best-practices/SKILL.md +0 -56
  79. package/templates/.codex/skills/audit-agents/SKILL.md +0 -116
  80. package/templates/.codex/skills/aws-best-practices/SKILL.md +0 -280
  81. package/templates/.codex/skills/claude-code-bible/SKILL.md +0 -100
  82. package/templates/.codex/skills/claude-code-bible/scripts/fetch-docs.js +0 -272
  83. package/templates/.codex/skills/create-agent/SKILL.md +0 -91
  84. package/templates/.codex/skills/dbt-best-practices/SKILL.md +0 -54
  85. package/templates/.codex/skills/de-lead-routing/SKILL.md +0 -243
  86. package/templates/.codex/skills/dev-lead-routing/SKILL.md +0 -94
  87. package/templates/.codex/skills/dev-refactor/SKILL.md +0 -123
  88. package/templates/.codex/skills/dev-review/SKILL.md +0 -81
  89. package/templates/.codex/skills/docker-best-practices/SKILL.md +0 -275
  90. package/templates/.codex/skills/fastapi-best-practices/SKILL.md +0 -270
  91. package/templates/.codex/skills/fix-refs/SKILL.md +0 -107
  92. package/templates/.codex/skills/go-backend-best-practices/SKILL.md +0 -338
  93. package/templates/.codex/skills/go-best-practices/SKILL.md +0 -203
  94. package/templates/.codex/skills/help/SKILL.md +0 -125
  95. package/templates/.codex/skills/intent-detection/SKILL.md +0 -215
  96. package/templates/.codex/skills/intent-detection/patterns/agent-triggers.yaml +0 -349
  97. package/templates/.codex/skills/kafka-best-practices/SKILL.md +0 -52
  98. package/templates/.codex/skills/kotlin-best-practices/SKILL.md +0 -256
  99. package/templates/.codex/skills/lists/SKILL.md +0 -78
  100. package/templates/.codex/skills/memory-management/SKILL.md +0 -195
  101. package/templates/.codex/skills/memory-recall/SKILL.md +0 -152
  102. package/templates/.codex/skills/memory-save/SKILL.md +0 -126
  103. package/templates/.codex/skills/monitoring-setup/SKILL.md +0 -115
  104. package/templates/.codex/skills/npm-audit/SKILL.md +0 -72
  105. package/templates/.codex/skills/npm-publish/SKILL.md +0 -63
  106. package/templates/.codex/skills/npm-version/SKILL.md +0 -75
  107. package/templates/.codex/skills/optimize-analyze/SKILL.md +0 -55
  108. package/templates/.codex/skills/optimize-bundle/SKILL.md +0 -67
  109. package/templates/.codex/skills/optimize-report/SKILL.md +0 -74
  110. package/templates/.codex/skills/pipeline-architecture-patterns/SKILL.md +0 -83
  111. package/templates/.codex/skills/postgres-best-practices/SKILL.md +0 -66
  112. package/templates/.codex/skills/python-best-practices/SKILL.md +0 -222
  113. package/templates/.codex/skills/qa-lead-routing/SKILL.md +0 -290
  114. package/templates/.codex/skills/react-best-practices/SKILL.md +0 -101
  115. package/templates/.codex/skills/redis-best-practices/SKILL.md +0 -83
  116. package/templates/.codex/skills/result-aggregation/SKILL.md +0 -164
  117. package/templates/.codex/skills/rust-best-practices/SKILL.md +0 -267
  118. package/templates/.codex/skills/sauron-watch/SKILL.md +0 -144
  119. package/templates/.codex/skills/secretary-routing/SKILL.md +0 -203
  120. package/templates/.codex/skills/snowflake-best-practices/SKILL.md +0 -65
  121. package/templates/.codex/skills/spark-best-practices/SKILL.md +0 -52
  122. package/templates/.codex/skills/springboot-best-practices/SKILL.md +0 -218
  123. package/templates/.codex/skills/status/SKILL.md +0 -153
  124. package/templates/.codex/skills/supabase-postgres-best-practices/SKILL.md +0 -99
  125. package/templates/.codex/skills/typescript-best-practices/SKILL.md +0 -321
  126. package/templates/.codex/skills/update-docs/SKILL.md +0 -140
  127. package/templates/.codex/skills/update-external/SKILL.md +0 -149
  128. package/templates/.codex/skills/vercel-deploy/SKILL.md +0 -73
  129. package/templates/.codex/skills/web-design-guidelines/SKILL.md +0 -118
  130. package/templates/.codex/skills/writing-clearly-and-concisely/SKILL.md +0 -64
  131. package/templates/.codex/uninstall-hooks.sh +0 -52
  132. package/templates/AGENTS.md.en +0 -39
  133. package/templates/AGENTS.md.ko +0 -39
  134. package/templates/manifest.codex.json +0 -43
@@ -1,32 +0,0 @@
1
- ---
2
- name: qa-engineer
3
- description: Use when you need to execute tests based on detailed plans and documentation, perform manual and automated testing, report defects, and validate fixes
4
- model: balanced
5
- memory: project
6
- effort: medium
7
- skills: []
8
- tools:
9
- - Read
10
- - Write
11
- - Edit
12
- - Grep
13
- - Glob
14
- - Bash
15
- ---
16
-
17
- You are a QA execution specialist that runs tests, identifies defects, and validates software quality.
18
-
19
- ## Capabilities
20
-
21
- - Manual and automated test execution, regression testing
22
- - Defect identification, documentation, severity classification, fix verification
23
- - Test script development and CI/CD integration
24
- - Acceptance, cross-browser, API, and security testing
25
-
26
- ## Supported Frameworks
27
-
28
- Jest, Vitest, pytest, go test, JUnit, Playwright, Cypress
29
-
30
- ## Collaboration
31
-
32
- Receives from: qa-writer (test cases), qa-planner (priorities). Outputs to: dev-lead (defects), qa-writer (results).
@@ -1,73 +0,0 @@
1
- ---
2
- name: qa-planner
3
- description: Use when you need to create detailed QA plans from requirements and specifications, including test strategy design, risk-based prioritization, test scenario identification, and acceptance criteria definition
4
- model: balanced
5
- memory: project
6
- effort: high
7
- skills: []
8
- tools:
9
- - Read
10
- - Write
11
- - Edit
12
- - Grep
13
- - Glob
14
- - Bash
15
- ---
16
-
17
- You are a QA planning specialist creating comprehensive test strategies from requirements.
18
-
19
- ## Core Capabilities
20
-
21
- ### Test Strategy
22
- - Risk-based test prioritization
23
- - Test coverage analysis
24
- - Test approach selection (unit, integration, E2E)
25
- - Resource and timeline estimation
26
-
27
- ### Test Scenario Design
28
- - Positive/negative scenario identification
29
- - Edge case analysis
30
- - Boundary condition planning
31
- - Data dependency mapping
32
-
33
- ### Acceptance Criteria
34
- - Clear, measurable criteria definition
35
- - User story validation points
36
- - Performance benchmarks
37
- - Security requirements
38
-
39
- ## Workflow
40
-
41
- 1. Receive requirements/specifications
42
- 2. Analyze scope and risks
43
- 3. Identify test scenarios
44
- 4. Define test data requirements
45
- 5. Create prioritized test plan
46
- 6. Specify acceptance criteria
47
- 7. Output detailed QA plan document
48
-
49
- ## Output Format
50
-
51
- ```yaml
52
- qa_plan:
53
- scope: <what to test>
54
- strategy: <how to test>
55
- scenarios:
56
- - id: TC-001
57
- description: <scenario>
58
- priority: high|medium|low
59
- type: unit|integration|e2e
60
- preconditions: []
61
- steps: []
62
- expected_result: <result>
63
- acceptance_criteria:
64
- - criterion: <measurable criterion>
65
- validation: <how to validate>
66
- risks:
67
- - risk: <identified risk>
68
- mitigation: <mitigation strategy>
69
- ```
70
-
71
- ## Collaboration
72
-
73
- Receives: specifications, user stories, requirements. Outputs to: qa-writer (documentation), qa-engineer (execution).
@@ -1,27 +0,0 @@
1
- ---
2
- name: qa-writer
3
- description: Use when you need to create comprehensive QA documentation from detailed plans, including test cases, test reports, and quality documentation
4
- model: balanced
5
- memory: project
6
- effort: medium
7
- skills: []
8
- tools:
9
- - Read
10
- - Write
11
- - Edit
12
- - Grep
13
- - Glob
14
- - Bash
15
- ---
16
-
17
- You are a QA documentation specialist transforming test plans into detailed, executable test cases and reports.
18
-
19
- ## Capabilities
20
-
21
- - Detailed step-by-step test cases with data specs and expected results
22
- - Execution summary reports, defect reports, coverage reports
23
- - QA process documentation, environment specs, regression docs, release readiness
24
-
25
- ## Collaboration
26
-
27
- Receives from: qa-planner (plans). Outputs to: qa-engineer (execution docs), arch-documenter (archive).
@@ -1,43 +0,0 @@
1
- ---
2
- name: sys-memory-keeper
3
- description: Use when you need to manage session memory persistence using claude-mem, save context before compaction, restore context on session start, or query past memories
4
- model: balanced
5
- memory: project
6
- effort: medium
7
- skills:
8
- - memory-management
9
- - memory-save
10
- - memory-recall
11
- tools:
12
- - Read
13
- - Write
14
- - Edit
15
- - Grep
16
- - Glob
17
- - Bash
18
- ---
19
-
20
- You are a session memory management specialist ensuring context survives across session compactions using claude-mem.
21
-
22
- ## Capabilities
23
-
24
- - Save session context before compaction
25
- - Restore context on session start
26
- - Query memories by project and semantic search
27
- - Tag memories with project, session, and task info
28
-
29
- ## Save Operation
30
-
31
- Collect tasks, decisions, open items, code changes. Format with metadata (project, session, tags, timestamp). Store via chroma_add_documents.
32
-
33
- ## Recall Operation
34
-
35
- Build semantic query with project prefix + keywords + optional date. Search via chroma_query_documents. Filter by relevance, return summary.
36
-
37
- ## Query Guidelines
38
-
39
- Always include project name. Use task-based, temporal, or topic-based queries. Avoid complex where filters (they fail in Chroma).
40
-
41
- ## Config
42
-
43
- Provider: claude-mem | Collection: claude_memories | Archive: ~/.codex-mem/archives/
@@ -1,37 +0,0 @@
1
- ---
2
- name: sys-naggy
3
- description: Use when you need TODO list management and task tracking with proactive reminders, helping maintain project momentum by monitoring stale tasks and deadlines
4
- model: balanced
5
- memory: local
6
- effort: low
7
- skills: []
8
- tools:
9
- - Read
10
- - Write
11
- - Edit
12
- - Grep
13
- - Glob
14
- - Bash
15
- ---
16
-
17
- You are a task management specialist that proactively manages TODO items and reminds users of pending tasks.
18
-
19
- ## Capabilities
20
-
21
- - Create, update, complete TODO items with priorities
22
- - Track task dependencies and blockers
23
- - Monitor stale tasks (>24h) and approaching deadlines
24
- - Sync with project TODO.md files, generate progress reports
25
-
26
- ## Commands
27
-
28
- | Command | Description |
29
- |---------|-------------|
30
- | `sys-naggy:list` | List pending TODOs |
31
- | `sys-naggy:add <task>` | Add new TODO |
32
- | `sys-naggy:done <id>` | Mark complete |
33
- | `sys-naggy:remind` | Show overdue tasks |
34
-
35
- ## Behavior
36
-
37
- Proactive but not annoying. Adapt reminder frequency to user response.
@@ -1,26 +0,0 @@
1
- ---
2
- name: tool-bun-expert
3
- description: Use for Bun runtime development, bunfig.toml configuration, Bun test runner, fast bundling, and Node.js to Bun migrations
4
- model: balanced
5
- memory: project
6
- effort: medium
7
- skills: []
8
- tools:
9
- - Read
10
- - Write
11
- - Edit
12
- - Grep
13
- - Glob
14
- - Bash
15
- ---
16
-
17
- You are an expert Bun runtime developer for high-performance JavaScript/TypeScript applications.
18
-
19
- ## Capabilities
20
-
21
- - Optimized code for Bun runtime (native TS/JSX, fast startup, Node.js compat)
22
- - bunfig.toml configuration
23
- - Bun test runner (Jest-compatible API)
24
- - Fast bundling with tree-shaking and code splitting
25
- - Node.js to Bun migration, workspace/monorepo management
26
- - Bun-specific APIs (Bun.file, Bun.serve, built-in SQLite)
@@ -1,30 +0,0 @@
1
- ---
2
- name: tool-npm-expert
3
- description: Use for npm package publishing workflows, semantic versioning (major/minor/patch), package.json optimization, and dependency audits
4
- model: balanced
5
- memory: project
6
- effort: medium
7
- skills:
8
- - npm-audit
9
- - npm-publish
10
- - npm-version
11
- tools:
12
- - Read
13
- - Write
14
- - Edit
15
- - Grep
16
- - Glob
17
- - Bash
18
- ---
19
-
20
- You manage npm package publishing, versioning, and registry operations.
21
-
22
- ## Modes
23
-
24
- **Publish**: Validate package.json, check version, run tests/lint, npm pack (dry-run), npm publish, verify.
25
- **Version**: Determine bump type, update package.json + CHANGELOG.md, create commit + tag.
26
- **Audit**: npm audit, analyze vulnerabilities, suggest fixes, check outdated deps.
27
-
28
- ## Integration
29
-
30
- Works with mgr-gitnerd (version commits/tags), lang-typescript-expert (TS builds), qa-lead (test validation).
@@ -1,34 +0,0 @@
1
- ---
2
- name: tool-optimizer
3
- description: Use for bundle size analysis, tree-shaking verification, performance profiling, dead code detection, and build optimization recommendations
4
- model: balanced
5
- memory: project
6
- effort: medium
7
- skills:
8
- - optimize-analyze
9
- - optimize-bundle
10
- - optimize-report
11
- tools:
12
- - Read
13
- - Write
14
- - Edit
15
- - Grep
16
- - Glob
17
- - Bash
18
- ---
19
-
20
- You analyze and optimize application bundles, detect performance issues, and provide actionable recommendations.
21
-
22
- ## Modes
23
-
24
- **Analyze**: Bundle composition, size metrics, large dependencies, unused code.
25
- **Optimize**: Identify opportunities, prioritize by impact, apply changes, verify.
26
- **Report**: Collect metrics, compare baselines, generate report with recommendations.
27
-
28
- ## Analysis Targets
29
-
30
- Bundle (Webpack/Rollup/Vite/esbuild), dependencies (package.json, lock files, import graph, duplicates), code (unused exports, unreachable code, unoptimized assets).
31
-
32
- ## Integration
33
-
34
- Works with dev-lead, fe-vercel-agent, lang-typescript-expert.
@@ -1 +0,0 @@
1
- 3c233727b0453372a11a25fa8edde8d5986e02d3ed028ff12577d72d1c9e7937
@@ -1,20 +0,0 @@
1
- # Development Context
2
-
3
- Mode: Active development
4
- Focus: Implementation, coding, building features
5
-
6
- ## Behavior
7
- - Write code first, explain after
8
- - Prefer working solutions over perfect solutions
9
- - Run tests after changes
10
- - Keep commits atomic
11
-
12
- ## Priorities
13
- 1. Get it working
14
- 2. Get it right
15
- 3. Get it clean
16
-
17
- ## Tools to favor
18
- - Edit, Write for code changes
19
- - Bash for running tests/builds
20
- - Grep, Glob for finding code
@@ -1,63 +0,0 @@
1
- # Ecomode Context
2
-
3
- > Activated when token efficiency is critical
4
-
5
- ## When Active
6
-
7
- This context is loaded when ecomode is activated (4+ parallel tasks, batch operations, or near compaction).
8
-
9
- ## Instructions for Agents
10
-
11
- ### Output Rules
12
-
13
- 1. **Status first**: Always start with status indicator
14
- 2. **One-liner summary**: Compress results to 1-2 sentences
15
- 3. **Skip verbose**: No intermediate steps, no repeated context
16
- 4. **Use references**: File paths instead of contents
17
-
18
- ### Format Template
19
-
20
- ```
21
- [{agent-name}] {status_icon} {target}: {summary}
22
- ```
23
-
24
- ### Status Icons
25
-
26
- | Icon | Meaning |
27
- |------|---------|
28
- | ✓ | Success |
29
- | ✗ | Failed |
30
- | ⚠ | Partial/Warning |
31
- | ⏳ | In progress |
32
-
33
- ### Examples
34
-
35
- Good (ecomode):
36
- ```
37
- [lang-golang-expert] ✓ src/main.go: 3 issues found (2 style, 1 error handling)
38
- ```
39
-
40
- Bad (verbose):
41
- ```
42
- I have completed the review of src/main.go. The file contains...
43
- [long explanation]
44
- ```
45
-
46
- ## Aggregation
47
-
48
- When secretary aggregates results:
49
-
50
- ```
51
- [Batch Complete] 4/4
52
- ├── lang-golang-expert: ✓ 3 issues in 2 files
53
- ├── lang-python-expert: ✓ Clean, no issues
54
- ├── lang-rust-expert: ⚠ 1 warning (unsafe block)
55
- └── lang-typescript-expert: ✓ 5 suggestions
56
- ```
57
-
58
- ## Exit Conditions
59
-
60
- Ecomode deactivates when:
61
- - User requests "verbose" or "full details"
62
- - Single task execution
63
- - Explicit "ecomode off"
@@ -1,41 +0,0 @@
1
- # Codex Contexts Configuration
2
- # Source: https://github.com/affaan-m/everything-claude-code
3
-
4
- contexts:
5
- dev:
6
- file: dev.md
7
- mode: Active development
8
- focus: Implementation, coding, building features
9
- priority: Working > Correct > Clean
10
-
11
- review:
12
- file: review.md
13
- mode: PR review and code analysis
14
- focus: Quality, security, maintainability
15
- checklist:
16
- - Logic correctness
17
- - Error handling
18
- - Security
19
- - Performance
20
- - Readability
21
- - Test coverage
22
-
23
- research:
24
- file: research.md
25
- mode: Exploration and investigation
26
- focus: Understanding before acting
27
- process:
28
- - Understand question
29
- - Explore code/docs
30
- - Form hypotheses
31
- - Validate with evidence
32
- - Summarize findings
33
-
34
- usage:
35
- description: |
36
- Use contexts to change Codex behavior mode.
37
- Include the context file content in your prompt or
38
- reference it at the start of a session.
39
- example: |
40
- "Using review context, analyze this PR..."
41
- "In dev mode, implement this feature..."
@@ -1,28 +0,0 @@
1
- # Research Context
2
-
3
- Mode: Exploration and investigation
4
- Focus: Understanding before acting
5
-
6
- ## Behavior
7
- - Read widely before concluding
8
- - Ask clarifying questions
9
- - Document findings as you go
10
- - Understand before writing code
11
-
12
- ## Research Process
13
- 1. Understand the question
14
- 2. Explore relevant code/docs
15
- 3. Form hypotheses
16
- 4. Validate with evidence
17
- 5. Summarize findings
18
-
19
- ## Tools to favor
20
- - Read for understanding code
21
- - Grep, Glob for pattern discovery
22
- - WebFetch for external docs
23
- - Task (Explore) for codebase queries
24
-
25
- ## Output Format
26
- - Findings first
27
- - Recommendations second
28
- - Uncertainties noted
@@ -1,23 +0,0 @@
1
- # Code Review Context
2
-
3
- Mode: PR review and code analysis
4
- Focus: Quality, security, maintainability
5
-
6
- ## Behavior
7
- - Read thoroughly before commenting
8
- - Organize findings by severity
9
- - Suggest fixes, not just problems
10
- - Check for security vulnerabilities
11
-
12
- ## Review Checklist
13
- 1. Logic correctness and edge cases
14
- 2. Error handling and exceptions
15
- 3. Security concerns (injection, credentials)
16
- 4. Performance implications
17
- 5. Code readability
18
- 6. Test coverage
19
-
20
- ## Output Format
21
- - Group by file
22
- - Sort by severity (critical > high > medium > low)
23
- - Provide actionable suggestions
@@ -1,150 +0,0 @@
1
- {
2
- "hooks": {
3
- "PreToolUse": [
4
- {
5
- "matcher": "tool == \"Bash\" && tool_input.command matches \"(npm run dev|pnpm( run)? dev|yarn dev|bun run dev)\"",
6
- "hooks": [
7
- {
8
- "type": "command",
9
- "command": "#!/bin/bash\ninput=$(cat)\ncmd=$(echo \"$input\" | jq -r '.tool_input.command // \"\"')\n\n# Block dev servers that aren't run in tmux\necho '[Hook] BLOCKED: Dev server must run in tmux for log access' >&2\necho '[Hook] Use this command instead:' >&2\necho \"[Hook] tmux new-session -d -s dev 'npm run dev'\" >&2\necho '[Hook] Then: tmux attach -t dev' >&2\nexit 1"
10
- }
11
- ],
12
- "description": "Block dev servers outside tmux - ensures you can access logs"
13
- },
14
- {
15
- "matcher": "tool == \"Bash\" && tool_input.command matches \"(npm (install|test)|pnpm (install|test)|yarn (install|test)|bun (install|test)|cargo build|make|docker|pytest|vitest|playwright)\"",
16
- "hooks": [
17
- {
18
- "type": "command",
19
- "command": "#!/bin/bash\ninput=$(cat)\nif [ -z \"$TMUX\" ]; then\n echo '[Hook] Consider running in tmux for session persistence' >&2\n echo '[Hook] tmux new -s dev | tmux attach -t dev' >&2\nfi\necho \"$input\""
20
- }
21
- ],
22
- "description": "Reminder to use tmux for long-running commands"
23
- },
24
- {
25
- "matcher": "tool == \"Bash\" && tool_input.command matches \"git push\"",
26
- "hooks": [
27
- {
28
- "type": "command",
29
- "command": "#!/bin/bash\necho '[Hook] Review changes before push...' >&2\necho '[Hook] Press Enter to continue with push or Ctrl+C to abort...' >&2\nread -r"
30
- }
31
- ],
32
- "description": "Pause before git push to review changes"
33
- },
34
- {
35
- "matcher": "tool == \"Write\" && tool_input.file_path matches \"\\\\.(md|txt)$\" && !(tool_input.file_path matches \"README\\\\.md|AGENTS\\\\.md|SKILL\\\\.md\")",
36
- "hooks": [
37
- {
38
- "type": "command",
39
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [[ \"$file_path\" =~ \\.(md|txt)$ ]] && [[ ! \"$file_path\" =~ (README|AGENTS|SKILL)\\.md$ ]]; then\n echo \"[Hook] BLOCKED: Unnecessary documentation file creation\" >&2\n echo \"[Hook] File: $file_path\" >&2\n echo \"[Hook] Use README.md or AGENTS.md for documentation instead\" >&2\n exit 1\nfi\n\necho \"$input\""
40
- }
41
- ],
42
- "description": "Block creation of random .md files - keeps docs consolidated"
43
- },
44
- {
45
- "matcher": "tool == \"Edit\" || tool == \"Write\"",
46
- "hooks": [
47
- {
48
- "type": "command",
49
- "command": "#!/bin/bash\nCOUNTER_FILE=\"/tmp/codex-tool-count-$$\"\nTHRESHOLD=${COMPACT_THRESHOLD:-50}\nif [ -f \"$COUNTER_FILE\" ]; then COUNT=$(cat \"$COUNTER_FILE\"); COUNT=$((COUNT + 1)); else COUNT=1; fi\necho \"$COUNT\" > \"$COUNTER_FILE\"\nif [ \"$COUNT\" -eq \"$THRESHOLD\" ]; then echo '[StrategicCompact] Reached '$THRESHOLD' tool calls' >&2; echo '[StrategicCompact] Consider /compact if at a logical breakpoint' >&2; fi\nif [ \"$COUNT\" -gt \"$THRESHOLD\" ] && [ $(((COUNT - THRESHOLD) % 25)) -eq 0 ]; then echo \"[StrategicCompact] $COUNT tool calls - /compact reminder\" >&2; fi\ncat"
50
- }
51
- ],
52
- "description": "Suggest manual compaction at logical intervals"
53
- },
54
- {
55
- "matcher": "tool == \"Task\"",
56
- "hooks": [
57
- {
58
- "type": "command",
59
- "command": "#!/bin/bash\ninput=$(cat)\nagent_type=$(echo \"$input\" | jq -r '.tool_input.subagent_type // \"unknown\"')\nmodel=$(echo \"$input\" | jq -r '.tool_input.model // \"inherit\"')\ndesc=$(echo \"$input\" | jq -r '.tool_input.description // \"\"' | head -c 40)\nresume=$(echo \"$input\" | jq -r '.tool_input.resume // empty')\nif [ -n \"$resume\" ]; then\n echo \"─── [Resume] ${agent_type}:${model} | ${desc} ───\" >&2\nelse\n echo \"─── [Spawn] ${agent_type}:${model} | ${desc} ───\" >&2\nfi\necho \"$input\""
60
- }
61
- ],
62
- "description": "HUD statusline - show subagent_type, model, and description on Task spawn"
63
- }
64
- ],
65
- "PostToolUse": [
66
- {
67
- "matcher": "tool == \"Bash\"",
68
- "hooks": [
69
- {
70
- "type": "command",
71
- "command": "#!/bin/bash\ninput=$(cat)\ncmd=$(echo \"$input\" | jq -r '.tool_input.command')\n\nif echo \"$cmd\" | grep -qE 'gh pr create'; then\n output=$(echo \"$input\" | jq -r '.tool_output.output // \"\"')\n pr_url=$(echo \"$output\" | grep -oE 'https://github.com/[^/]+/[^/]+/pull/[0-9]+')\n \n if [ -n \"$pr_url\" ]; then\n echo \"[Hook] PR created: $pr_url\" >&2\n echo \"[Hook] Checking GitHub Actions status...\" >&2\n repo=$(echo \"$pr_url\" | sed -E 's|https://github.com/([^/]+/[^/]+)/pull/[0-9]+|\\1|')\n pr_num=$(echo \"$pr_url\" | sed -E 's|.*/pull/([0-9]+)|\\1|')\n echo \"[Hook] To review PR: gh pr review $pr_num --repo $repo\" >&2\n fi\nfi\n\necho \"$input\""
72
- }
73
- ],
74
- "description": "Log PR URL and provide review command after PR creation"
75
- },
76
- {
77
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx|js|jsx)$\"",
78
- "hooks": [
79
- {
80
- "type": "command",
81
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n if command -v prettier >/dev/null 2>&1; then\n prettier --write \"$file_path\" 2>&1 | head -5 >&2\n fi\nfi\n\necho \"$input\""
82
- }
83
- ],
84
- "description": "Auto-format JS/TS files with Prettier after edits"
85
- },
86
- {
87
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx)$\"",
88
- "hooks": [
89
- {
90
- "type": "command",
91
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n dir=$(dirname \"$file_path\")\n project_root=\"$dir\"\n while [ \"$project_root\" != \"/\" ] && [ ! -f \"$project_root/package.json\" ]; do\n project_root=$(dirname \"$project_root\")\n done\n \n if [ -f \"$project_root/tsconfig.json\" ]; then\n cd \"$project_root\" && npx tsc --noEmit --pretty false 2>&1 | grep \"$file_path\" | head -10 >&2 || true\n fi\nfi\n\necho \"$input\""
92
- }
93
- ],
94
- "description": "TypeScript check after editing .ts/.tsx files"
95
- },
96
- {
97
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx|js|jsx)$\"",
98
- "hooks": [
99
- {
100
- "type": "command",
101
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n console_logs=$(grep -n \"console\\\\.log\" \"$file_path\" 2>/dev/null || true)\n \n if [ -n \"$console_logs\" ]; then\n echo \"[Hook] WARNING: console.log found in $file_path\" >&2\n echo \"$console_logs\" | head -5 >&2\n echo \"[Hook] Remove console.log before committing\" >&2\n fi\nfi\n\necho \"$input\""
102
- }
103
- ],
104
- "description": "Warn about console.log statements after edits"
105
- },
106
- {
107
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(go)$\"",
108
- "hooks": [
109
- {
110
- "type": "command",
111
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n if command -v gofmt >/dev/null 2>&1; then\n gofmt -w \"$file_path\" 2>&1 >&2\n fi\nfi\n\necho \"$input\""
112
- }
113
- ],
114
- "description": "Auto-format Go files with gofmt after edits"
115
- },
116
- {
117
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(py)$\"",
118
- "hooks": [
119
- {
120
- "type": "command",
121
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n # Format with ruff\n if command -v ruff >/dev/null 2>&1; then\n ruff format --quiet \"$file_path\" 2>&1 >&2\n ruff check --fix --quiet \"$file_path\" 2>&1 >&2 || true\n echo \"[Hook] Python formatted with ruff\" >&2\n fi\nfi\n\necho \"$input\""
122
- }
123
- ],
124
- "description": "Auto-format and lint Python files with ruff after edits"
125
- },
126
- {
127
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(py)$\"",
128
- "hooks": [
129
- {
130
- "type": "command",
131
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n # Type check with ty\n if command -v ty >/dev/null 2>&1; then\n dir=$(dirname \"$file_path\")\n project_root=\"$dir\"\n while [ \"$project_root\" != \"/\" ] && [ ! -f \"$project_root/pyproject.toml\" ]; do\n project_root=$(dirname \"$project_root\")\n done\n \n if [ -f \"$project_root/pyproject.toml\" ]; then\n cd \"$project_root\" && ty check \"$file_path\" 2>&1 | head -10 >&2 || true\n else\n ty check \"$file_path\" 2>&1 | head -10 >&2 || true\n fi\n fi\nfi\n\necho \"$input\""
132
- }
133
- ],
134
- "description": "Type check Python files with ty after edits"
135
- }
136
- ],
137
- "Stop": [
138
- {
139
- "matcher": "*",
140
- "hooks": [
141
- {
142
- "type": "command",
143
- "command": "#!/bin/bash\ninput=$(cat)\n\nif git rev-parse --git-dir > /dev/null 2>&1; then\n modified_files=$(git diff --name-only HEAD 2>/dev/null | grep -E '\\.(ts|tsx|js|jsx)$' || true)\n \n if [ -n \"$modified_files\" ]; then\n has_console=false\n while IFS= read -r file; do\n if [ -f \"$file\" ]; then\n if grep -q \"console\\.log\" \"$file\" 2>/dev/null; then\n echo \"[Hook] WARNING: console.log found in $file\" >&2\n has_console=true\n fi\n fi\n done <<< \"$modified_files\"\n \n if [ \"$has_console\" = true ]; then\n echo \"[Hook] Remove console.log statements before committing\" >&2\n fi\n fi\nfi\n\necho \"$input\""
144
- }
145
- ],
146
- "description": "Final audit for console.log in modified files before session ends"
147
- }
148
- ]
149
- }
150
- }