oh-my-customcode 0.19.0 → 0.19.4
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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/templates/.claude/hooks/scripts/session-env-check.sh +18 -0
- package/templates/.claude/rules/MUST-agent-teams.md +35 -0
- package/templates/.claude/rules/MUST-parallel-execution.md +13 -0
- package/templates/.claude/skills/analysis/SKILL.md +161 -0
- package/templates/CLAUDE.md.en +5 -1
- package/templates/CLAUDE.md.ko +5 -1
- package/templates/manifest.json +1 -1
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ Claude Code selects the appropriate model and parallelizes independent tasks (up
|
|
|
124
124
|
| **QA** | 3 | qa-planner, qa-writer, qa-engineer |
|
|
125
125
|
| **Total** | **41** | |
|
|
126
126
|
|
|
127
|
-
### Skills (
|
|
127
|
+
### Skills (56)
|
|
128
128
|
|
|
129
129
|
| Category | Count | Skills |
|
|
130
130
|
|----------|-------|--------|
|
package/package.json
CHANGED
|
@@ -27,16 +27,34 @@ if [ "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-0}" = "1" ]; then
|
|
|
27
27
|
AGENT_TEAMS_STATUS="enabled"
|
|
28
28
|
fi
|
|
29
29
|
|
|
30
|
+
# Git workflow reminder
|
|
31
|
+
CURRENT_BRANCH="unknown"
|
|
32
|
+
if command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
33
|
+
CURRENT_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
|
|
34
|
+
fi
|
|
35
|
+
|
|
30
36
|
# Write status to file for other hooks to reference
|
|
31
37
|
STATUS_FILE="/tmp/.claude-env-status-${PPID}"
|
|
32
38
|
cat > "$STATUS_FILE" << ENVEOF
|
|
33
39
|
codex=${CODEX_STATUS}
|
|
34
40
|
agent_teams=${AGENT_TEAMS_STATUS}
|
|
41
|
+
git_branch=${CURRENT_BRANCH}
|
|
35
42
|
ENVEOF
|
|
36
43
|
|
|
37
44
|
# Report to stderr (visible in conversation)
|
|
38
45
|
echo " codex CLI: ${CODEX_STATUS}" >&2
|
|
39
46
|
echo " Agent Teams: ${AGENT_TEAMS_STATUS}" >&2
|
|
47
|
+
echo "" >&2
|
|
48
|
+
echo " [Git Workflow Reminder]" >&2
|
|
49
|
+
echo " Current branch: ${CURRENT_BRANCH}" >&2
|
|
50
|
+
if [ "$CURRENT_BRANCH" = "develop" ] || [ "$CURRENT_BRANCH" = "main" ] || [ "$CURRENT_BRANCH" = "master" ]; then
|
|
51
|
+
echo " ⚠ You are on a protected branch!" >&2
|
|
52
|
+
echo " ⚠ Create a feature branch before making changes:" >&2
|
|
53
|
+
echo " git checkout -b feat/your-feature develop" >&2
|
|
54
|
+
else
|
|
55
|
+
echo " ✓ Feature branch detected" >&2
|
|
56
|
+
fi
|
|
57
|
+
echo " Rules: feature branch → commit → push → PR → merge" >&2
|
|
40
58
|
echo "------------------------------------" >&2
|
|
41
59
|
|
|
42
60
|
# Pass through
|
|
@@ -48,6 +48,28 @@ BEFORE using Task tool for 2+ agent tasks, this check is **ENFORCED**:
|
|
|
48
48
|
╚══════════════════════════════════════════════════════════════════╝
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
### Spawn Completeness Check (MANDATORY)
|
|
52
|
+
|
|
53
|
+
When spawning Agent Teams members:
|
|
54
|
+
|
|
55
|
+
**ALL members MUST be spawned in a SINGLE message.** Partial spawning is a VIOLATION of both R018 and R009.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
59
|
+
║ BEFORE SPAWNING TEAM MEMBERS: ║
|
|
60
|
+
║ ║
|
|
61
|
+
║ 1. How many members does this team need? N = ___ ║
|
|
62
|
+
║ 2. Am I spawning ALL N members in THIS message? ║
|
|
63
|
+
║ YES → Good. Continue. ║
|
|
64
|
+
║ NO → STOP. This is a VIOLATION. ║
|
|
65
|
+
║ All N members MUST be in the same message. ║
|
|
66
|
+
║ ║
|
|
67
|
+
║ Partial spawn (e.g., 1/3) = VIOLATION ║
|
|
68
|
+
║ Sequential spawn (one per message) = VIOLATION ║
|
|
69
|
+
║ All at once in single message = CORRECT ║
|
|
70
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
71
|
+
```
|
|
72
|
+
|
|
51
73
|
## Common Violations
|
|
52
74
|
|
|
53
75
|
```
|
|
@@ -87,6 +109,19 @@ BEFORE using Task tool for 2+ agent tasks, this check is **ENFORCED**:
|
|
|
87
109
|
Task(frontend-dev) + Task(backend-dev) → team members
|
|
88
110
|
Shared TaskList for interface contracts
|
|
89
111
|
SendMessage for API schema coordination
|
|
112
|
+
|
|
113
|
+
❌ WRONG: Spawning team members one at a time
|
|
114
|
+
TeamCreate("research-team")
|
|
115
|
+
Message 1: Task(researcher-1) → Analysis 1 (only 1/3 spawned)
|
|
116
|
+
Message 2: Task(researcher-2) → Analysis 2 (late spawn)
|
|
117
|
+
Message 3: Task(researcher-3) → Analysis 3 (late spawn)
|
|
118
|
+
|
|
119
|
+
✓ CORRECT: All members in a single message
|
|
120
|
+
TeamCreate("research-team")
|
|
121
|
+
Single message:
|
|
122
|
+
Task(researcher-1) → Analysis 1 ┐
|
|
123
|
+
Task(researcher-2) → Analysis 2 ├─ ALL spawned together
|
|
124
|
+
Task(researcher-3) → Analysis 3 ┘
|
|
90
125
|
```
|
|
91
126
|
|
|
92
127
|
## Cost Guidelines
|
|
@@ -39,6 +39,7 @@ Before writing/editing multiple files:
|
|
|
39
39
|
2. Using Write/Edit sequentially for 2+ files? → STOP, parallelize
|
|
40
40
|
3. Specialized agent available? → Use it (not general-purpose)
|
|
41
41
|
4. Agent Teams available + 3+ agents or review cycle? → YES: use Agent Teams instead of Task
|
|
42
|
+
5. Agent Teams members? → ALL members MUST spawn in a single message (no partial spawning)
|
|
42
43
|
|
|
43
44
|
### Common Violations to Avoid
|
|
44
45
|
|
|
@@ -79,6 +80,18 @@ Before writing/editing multiple files:
|
|
|
79
80
|
Task(lang-kotlin-expert → usecase queries) ├─ All spawned together
|
|
80
81
|
Task(be-springboot-expert → persistence) │
|
|
81
82
|
Task(be-springboot-expert → security) ┘
|
|
83
|
+
|
|
84
|
+
❌ WRONG: Agent Teams partial spawn (1 of N members)
|
|
85
|
+
TeamCreate("feature-team")
|
|
86
|
+
Message 1: Task(member-1) ← only 1/3 spawned, VIOLATION
|
|
87
|
+
Message 2: Task(member-2) ← sequential, VIOLATION
|
|
88
|
+
Message 3: Task(member-3) ← sequential, VIOLATION
|
|
89
|
+
|
|
90
|
+
✓ CORRECT: All Agent Teams members in single message
|
|
91
|
+
TeamCreate("feature-team")
|
|
92
|
+
Task(member-1) ┐
|
|
93
|
+
Task(member-2) ├─ Single message, all at once
|
|
94
|
+
Task(member-3) ┘
|
|
82
95
|
```
|
|
83
96
|
|
|
84
97
|
## Execution Rules
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analysis
|
|
3
|
+
description: Analyze project and auto-configure agents, skills, rules, and guides
|
|
4
|
+
argument-hint: "[--dry-run] [--verbose]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Project Analysis Skill
|
|
8
|
+
|
|
9
|
+
Scan a project's tech stack, compare against installed agents/skills, and auto-configure missing items.
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
--dry-run Show what would be added without making changes
|
|
15
|
+
--verbose Show detailed detection reasoning
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### Step 1: Project Scan
|
|
21
|
+
|
|
22
|
+
Detect tech stack by checking indicator files and dependency manifests.
|
|
23
|
+
|
|
24
|
+
| Indicator | Files to Check | Agent | Skill |
|
|
25
|
+
|-----------|---------------|-------|-------|
|
|
26
|
+
| TypeScript | tsconfig.json, *.ts, *.tsx | lang-typescript-expert | typescript-best-practices |
|
|
27
|
+
| React/Next.js | next.config.*, package.json (next dep) | fe-vercel-agent | react-best-practices |
|
|
28
|
+
| Vue.js | vue.config.*, *.vue | fe-vuejs-agent | - |
|
|
29
|
+
| Svelte | svelte.config.*, *.svelte | fe-svelte-agent | - |
|
|
30
|
+
| Python | pyproject.toml, requirements.txt, *.py | lang-python-expert | python-best-practices |
|
|
31
|
+
| FastAPI | "fastapi" in imports/deps | be-fastapi-expert | fastapi-best-practices |
|
|
32
|
+
| Go | go.mod, *.go | lang-golang-expert | go-best-practices |
|
|
33
|
+
| Go Backend | go.mod + cmd/ or internal/ dirs | be-go-backend-expert | go-backend-best-practices |
|
|
34
|
+
| Rust | Cargo.toml, *.rs | lang-rust-expert | rust-best-practices |
|
|
35
|
+
| Kotlin | *.kt, build.gradle.kts | lang-kotlin-expert | kotlin-best-practices |
|
|
36
|
+
| Java | *.java, pom.xml | lang-java21-expert | - |
|
|
37
|
+
| Spring Boot | spring-boot in deps | be-springboot-expert | springboot-best-practices |
|
|
38
|
+
| Express.js | "express" in deps | be-express-expert | - |
|
|
39
|
+
| NestJS | "@nestjs" in deps | be-nestjs-expert | - |
|
|
40
|
+
| Docker | Dockerfile, compose.yml | infra-docker-expert | docker-best-practices |
|
|
41
|
+
| AWS | CDK/SAM/CloudFormation files | infra-aws-expert | aws-best-practices |
|
|
42
|
+
| PostgreSQL | *.sql, pg in deps | db-postgres-expert | postgres-best-practices |
|
|
43
|
+
| Redis | redis in deps | db-redis-expert | redis-best-practices |
|
|
44
|
+
| Supabase | supabase in deps/config | db-supabase-expert | supabase-postgres-best-practices |
|
|
45
|
+
| Airflow | dags/*.py, airflow in deps | de-airflow-expert | airflow-best-practices |
|
|
46
|
+
| dbt | dbt_project.yml | de-dbt-expert | dbt-best-practices |
|
|
47
|
+
| Kafka | kafka in deps/config | de-kafka-expert | kafka-best-practices |
|
|
48
|
+
| Spark | spark in deps/config | de-spark-expert | spark-best-practices |
|
|
49
|
+
| Snowflake | snowflake in deps/config | de-snowflake-expert | snowflake-best-practices |
|
|
50
|
+
|
|
51
|
+
**Detection logic:**
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
1. Read package.json / go.mod / Cargo.toml / pyproject.toml / pom.xml
|
|
55
|
+
2. Glob for indicator files (tsconfig.json, *.vue, Dockerfile, etc.)
|
|
56
|
+
3. Grep dependencies for framework/library names
|
|
57
|
+
4. For verbose mode: log each indicator found and confidence level
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 2: Gap Analysis
|
|
61
|
+
|
|
62
|
+
Compare detected stack against what is already installed.
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
1. List existing agents: ls .claude/agents/*.md
|
|
66
|
+
2. List existing skills: find .claude/skills -name "SKILL.md"
|
|
67
|
+
3. For each detected indicator:
|
|
68
|
+
a. Check if required agent file exists → mark MISSING or PRESENT
|
|
69
|
+
b. Check if required skill directory exists → mark MISSING or PRESENT
|
|
70
|
+
4. Build two lists:
|
|
71
|
+
- missing_agents[] — agents needed but not present
|
|
72
|
+
- missing_skills[] — skills needed but not present
|
|
73
|
+
5. (Optional) Build unused list for suggestions:
|
|
74
|
+
- Agents present but no indicator matched → flag for review
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Step 3: Auto-Configure
|
|
78
|
+
|
|
79
|
+
Apply changes for all missing items (skip in --dry-run mode).
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
For each missing agent:
|
|
83
|
+
- If agent exists in templates/.claude/agents/ → copy to .claude/agents/
|
|
84
|
+
- Else → delegate to mgr-creator with detected domain context
|
|
85
|
+
|
|
86
|
+
For each missing skill:
|
|
87
|
+
- If skill exists in templates/.claude/skills/ → copy to .claude/skills/
|
|
88
|
+
- Else → log as "skill not available in templates, manual setup needed"
|
|
89
|
+
|
|
90
|
+
Rules:
|
|
91
|
+
- Keep all existing rules (they are universal, never remove)
|
|
92
|
+
|
|
93
|
+
Guides:
|
|
94
|
+
- Verify guides/ directory has relevant reference docs
|
|
95
|
+
- Log missing guide topics as suggestions only (no auto-copy)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Step 4: Report
|
|
99
|
+
|
|
100
|
+
Output a structured summary after the run.
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
[analysis] Project: <detected project name or path>
|
|
104
|
+
|
|
105
|
+
Tech Stack Detected:
|
|
106
|
+
- TypeScript (tsconfig.json found)
|
|
107
|
+
- React/Next.js (next in package.json deps)
|
|
108
|
+
- Docker (Dockerfile found)
|
|
109
|
+
|
|
110
|
+
Agents:
|
|
111
|
+
+ lang-typescript-expert [added]
|
|
112
|
+
+ fe-vercel-agent [added]
|
|
113
|
+
~ infra-docker-expert [already present, skipped]
|
|
114
|
+
|
|
115
|
+
Skills:
|
|
116
|
+
+ typescript-best-practices [added]
|
|
117
|
+
+ react-best-practices [added]
|
|
118
|
+
~ docker-best-practices [already present, skipped]
|
|
119
|
+
|
|
120
|
+
Rules: no changes (universal rules kept as-is)
|
|
121
|
+
|
|
122
|
+
Guides: react/ — present
|
|
123
|
+
docker/ — present
|
|
124
|
+
typescript/ — present
|
|
125
|
+
|
|
126
|
+
Suggestions:
|
|
127
|
+
- infra-aws-expert not detected (no CDK/SAM files found)
|
|
128
|
+
- de-* agents not detected (no pipeline indicators found)
|
|
129
|
+
|
|
130
|
+
Summary: 2 agents added, 2 skills added, 0 removed
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**--dry-run output** prefixes all additions with `[would add]` instead of `[added]` and makes no file changes.
|
|
134
|
+
|
|
135
|
+
**--verbose output** adds a Detection section before the report:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
Detection Details:
|
|
139
|
+
tsconfig.json → TypeScript confirmed
|
|
140
|
+
package.json[next] → Next.js confirmed (confidence: high)
|
|
141
|
+
package.json[react] → React confirmed (confidence: high)
|
|
142
|
+
Dockerfile → Docker confirmed
|
|
143
|
+
no go.mod found → Go skipped
|
|
144
|
+
no Cargo.toml found → Rust skipped
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Example Invocation
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
/analysis
|
|
151
|
+
/analysis --dry-run
|
|
152
|
+
/analysis --verbose
|
|
153
|
+
/analysis --dry-run --verbose
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Notes
|
|
157
|
+
|
|
158
|
+
- Always run `--dry-run` first on unfamiliar projects to preview changes
|
|
159
|
+
- Agents and skills are additive only — existing items are never removed automatically
|
|
160
|
+
- For stacks not in the detection table, delegate to `mgr-creator` for dynamic agent creation
|
|
161
|
+
- Rules are never auto-removed; they are project-universal
|
package/templates/CLAUDE.md.en
CHANGED
|
@@ -145,6 +145,7 @@ Violation = immediate correction. No exception for "small changes".
|
|
|
145
145
|
|
|
146
146
|
| Command | Description |
|
|
147
147
|
|---------|-------------|
|
|
148
|
+
| `/analysis` | Analyze project and auto-configure customizations |
|
|
148
149
|
| `/create-agent` | Create a new agent |
|
|
149
150
|
| `/update-docs` | Sync documentation with project structure |
|
|
150
151
|
| `/update-external` | Update agents from external sources |
|
|
@@ -174,7 +175,7 @@ project/
|
|
|
174
175
|
+-- CLAUDE.md # Entry point
|
|
175
176
|
+-- .claude/
|
|
176
177
|
| +-- agents/ # Subagent definitions (41 files)
|
|
177
|
-
| +-- skills/ # Skills (
|
|
178
|
+
| +-- skills/ # Skills (56 directories)
|
|
178
179
|
| +-- rules/ # Global rules (R000-R018)
|
|
179
180
|
| +-- hooks/ # Hook scripts (memory, HUD)
|
|
180
181
|
| +-- contexts/ # Context files (ecomode)
|
|
@@ -238,6 +239,9 @@ Task tool + routing skills remain the fallback for simple/cost-sensitive tasks.
|
|
|
238
239
|
## Quick Reference
|
|
239
240
|
|
|
240
241
|
```bash
|
|
242
|
+
# Project analysis
|
|
243
|
+
/analysis
|
|
244
|
+
|
|
241
245
|
# Show all commands
|
|
242
246
|
/lists
|
|
243
247
|
|
package/templates/CLAUDE.md.ko
CHANGED
|
@@ -145,6 +145,7 @@ oh-my-customcode로 구동됩니다.
|
|
|
145
145
|
|
|
146
146
|
| 커맨드 | 설명 |
|
|
147
147
|
|--------|------|
|
|
148
|
+
| `/analysis` | 프로젝트 분석 및 자동 커스터마이징 |
|
|
148
149
|
| `/create-agent` | 새 에이전트 생성 |
|
|
149
150
|
| `/update-docs` | 프로젝트 구조와 문서 동기화 |
|
|
150
151
|
| `/update-external` | 외부 소스에서 에이전트 업데이트 |
|
|
@@ -174,7 +175,7 @@ project/
|
|
|
174
175
|
+-- CLAUDE.md # 진입점
|
|
175
176
|
+-- .claude/
|
|
176
177
|
| +-- agents/ # 서브에이전트 정의 (41 파일)
|
|
177
|
-
| +-- skills/ # 스킬 (
|
|
178
|
+
| +-- skills/ # 스킬 (56 디렉토리)
|
|
178
179
|
| +-- rules/ # 전역 규칙 (R000-R018)
|
|
179
180
|
| +-- hooks/ # 훅 스크립트 (메모리, HUD)
|
|
180
181
|
| +-- contexts/ # 컨텍스트 파일 (ecomode)
|
|
@@ -238,6 +239,9 @@ Claude Code의 Agent Teams 기능이 활성화되어 있으면 (`CLAUDE_CODE_EXP
|
|
|
238
239
|
## 빠른 참조
|
|
239
240
|
|
|
240
241
|
```bash
|
|
242
|
+
# 프로젝트 분석
|
|
243
|
+
/analysis
|
|
244
|
+
|
|
241
245
|
# 모든 커맨드 표시
|
|
242
246
|
/lists
|
|
243
247
|
|