oh-my-customcode 0.72.1 → 0.73.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.
package/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
 
14
14
  **[한국어 문서 (Korean)](./README_ko.md)**
15
15
 
16
- 46 agents. 99 skills. 21 rules. One command.
16
+ 46 agents. 100 skills. 21 rules. One command.
17
17
 
18
18
  ```bash
19
19
  npm install -g oh-my-customcode && cd your-project && omcustom init
@@ -146,7 +146,7 @@ Each agent declares its tools, model, memory scope, and limitations in YAML fron
146
146
 
147
147
  ---
148
148
 
149
- ### Skills (99)
149
+ ### Skills (100)
150
150
 
151
151
  | Category | Count | Includes |
152
152
  |----------|-------|----------|
@@ -282,7 +282,7 @@ your-project/
282
282
  ├── CLAUDE.md # Entry point
283
283
  ├── .claude/
284
284
  │ ├── agents/ # 46 agent definitions
285
- │ ├── skills/ # 99 skill modules
285
+ │ ├── skills/ # 100 skill modules
286
286
  │ ├── rules/ # 21 governance rules (R000-R021)
287
287
  │ ├── hooks/ # 15 lifecycle hook scripts
288
288
  │ ├── schemas/ # Tool input validation schemas
package/dist/cli/index.js CHANGED
@@ -9325,7 +9325,7 @@ var init_package = __esm(() => {
9325
9325
  workspaces: [
9326
9326
  "packages/*"
9327
9327
  ],
9328
- version: "0.72.1",
9328
+ version: "0.73.0",
9329
9329
  description: "Batteries-included agent harness for Claude Code",
9330
9330
  type: "module",
9331
9331
  bin: {
package/dist/index.js CHANGED
@@ -1820,7 +1820,7 @@ var package_default = {
1820
1820
  workspaces: [
1821
1821
  "packages/*"
1822
1822
  ],
1823
- version: "0.72.1",
1823
+ version: "0.73.0",
1824
1824
  description: "Batteries-included agent harness for Claude Code",
1825
1825
  type: "module",
1826
1826
  bin: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "0.72.1",
6
+ "version": "0.73.0",
7
7
  "description": "Batteries-included agent harness for Claude Code",
8
8
  "type": "module",
9
9
  "bin": {
@@ -94,6 +94,29 @@ After updating memory entries, aggregate agent performance:
94
94
  - New agent: append row
95
95
  5. Enforce 20-row budget: prune lowest-usage rows
96
96
 
97
+ ### User Model Extraction (Session-End)
98
+
99
+ After metrics aggregation, extract user model data:
100
+
101
+ 1. **Skill Preferences**: Parse conversation for Skill tool invocations
102
+ - Count each skill's invocations in this session
103
+ - Merge with existing `## User Model > ### Skill Preferences` table
104
+ - Keep top 10 by cumulative invocation count
105
+ 2. **Correction Patterns**: Scan for R016 violation corrections
106
+ - User says "no", "don't", "stop doing X" → potential correction
107
+ - Match to rule ID if possible (R007, R010, etc.)
108
+ - Update or create entry in Correction Patterns
109
+ 3. **Expertise Profile**: Analyze file access patterns
110
+ - Count file extensions accessed (*.ts, *.py, *.go, etc.)
111
+ - Map to domain: .ts→TypeScript, .py→Python, .go→Go, etc.
112
+ - Update primary domains list (top 3 by file access count)
113
+ 4. **Override Decisions**: Detect explicit user overrides
114
+ - User changes agent routing, overrides verdict, rejects suggestion
115
+ - Record with date and context (max 5 most recent)
116
+ 5. Write `## User Model` section to MEMORY.md (max 30 lines)
117
+ - New entries start at `[confidence: low]`
118
+ - Existing entries seen again → promote confidence
119
+
97
120
  ### Failure Handling
98
121
 
99
122
  - MEMORY.md update failure → report error to orchestrator
@@ -438,6 +438,16 @@
438
438
  ],
439
439
  "description": "Auto-extract failure patterns from session outcomes (advisory, exit 0)"
440
440
  },
441
+ {
442
+ "matcher": "*",
443
+ "hooks": [
444
+ {
445
+ "type": "command",
446
+ "command": "bash .claude/hooks/scripts/skill-extractor-analyzer.sh"
447
+ }
448
+ ],
449
+ "description": "Detect reusable skill candidates from session task outcomes (advisory, exit 0)"
450
+ },
441
451
  {
442
452
  "matcher": "*",
443
453
  "hooks": [
@@ -0,0 +1,42 @@
1
+ #!/bin/bash
2
+ # skill-extractor-analyzer.sh — Stop hook for skill candidate detection
3
+ # Advisory-only: exit 0 always. Emits stderr message if candidates found.
4
+
5
+ set -euo pipefail
6
+
7
+ OUTCOMES_FILE="/tmp/.claude-task-outcomes-${PPID}"
8
+ PROPOSALS_FILE="/tmp/.claude-skill-proposals-${PPID}"
9
+
10
+ # Early exit if no outcomes
11
+ if [ ! -f "$OUTCOMES_FILE" ] || [ ! -s "$OUTCOMES_FILE" ]; then
12
+ exit 0
13
+ fi
14
+
15
+ # Count qualifying patterns (3+ successes with 80%+ rate)
16
+ # Group by agent_type+skill, count successes
17
+ CANDIDATES=0
18
+
19
+ if command -v jq &>/dev/null; then
20
+ # Parse JSONL and group by agent_type+skill
21
+ CANDIDATES=$(cat "$OUTCOMES_FILE" | \
22
+ jq -s '
23
+ group_by(.agent_type + "|" + (.skill // "none"))
24
+ | map({
25
+ key: .[0].agent_type + "|" + (.[0].skill // "none"),
26
+ total: length,
27
+ successes: [.[] | select(.outcome == "success")] | length
28
+ })
29
+ | map(select(.successes >= 3 and (.successes / .total) >= 0.8))
30
+ | length
31
+ ' 2>/dev/null || echo "0")
32
+ fi
33
+
34
+ if [ "$CANDIDATES" -gt 0 ] 2>/dev/null; then
35
+ echo "[skill-extractor] ${CANDIDATES} skill candidate(s) detected from session outcomes" >&2
36
+ echo "[skill-extractor] Run /skill-extractor to review and create" >&2
37
+
38
+ # Save proposal count for Stop prompt hook to pick up
39
+ echo "{\"candidates\": $CANDIDATES, \"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" > "$PROPOSALS_FILE"
40
+ fi
41
+
42
+ exit 0
@@ -213,6 +213,70 @@ The Metrics section shares the 200-line MEMORY.md budget:
213
213
 
214
214
  -->
215
215
 
216
+ <!-- DETAIL: User Model (sys-memory-keeper reference)
217
+
218
+ MEMORY.md supports an optional `## User Model` section (DISTINCT from `## Behaviors`) for tracking structured user interaction patterns.
219
+
220
+ ### User Model vs Behaviors
221
+
222
+ | Aspect | Behaviors | User Model |
223
+ |--------|-----------|------------|
224
+ | Focus | Communication/workflow preferences | Correction patterns, expertise, skill usage |
225
+ | Source | Conversation style observations | R016 violations, tool invocations, override decisions |
226
+ | Update | Session-end extraction | Session-end aggregation from task outcomes |
227
+
228
+ ### User Model Section Format
229
+
230
+ ## User Model [auto-updated by sys-memory-keeper]
231
+
232
+ ### Correction Patterns [confidence: medium]
233
+ - R010 direct-write attempts: 3 times → now delegates consistently
234
+ - Prefers explicit agent selection over auto-routing
235
+
236
+ ### Skill Preferences [confidence: high]
237
+ | Skill | Invocations | Last Used |
238
+ |-------|------------|-----------|
239
+ | /research | 12 | 2026-04-03 |
240
+ | /pipeline auto-dev | 8 | 2026-04-03 |
241
+
242
+ ### Expertise Profile [confidence: medium]
243
+ - Primary domains: TypeScript, Python, Go
244
+ - Focus: AI agent orchestration, CLI tooling
245
+
246
+ ### Override Decisions [confidence: low]
247
+ - Overrode /scout SKIP verdict → INTEGRATE for RTK (#756)
248
+
249
+ ### Categories
250
+
251
+ | Category | Source | Description |
252
+ |----------|--------|-------------|
253
+ | Correction Patterns | R016 violation history | Rules the user corrected most |
254
+ | Skill Preferences | Skill tool invocation count | Most-invoked skills ranked |
255
+ | Expertise Profile | File patterns + routing history | User's domain expertise areas |
256
+ | Override Decisions | Explicit user overrides | When user disagreed with agent recommendation |
257
+
258
+ ### Budget Management
259
+
260
+ User Model shares the 200-line MEMORY.md budget:
261
+ - Max 30 lines for User Model section
262
+ - Prune low-confidence entries first
263
+ - Skill Preferences table: max 10 rows (top by invocation count)
264
+ - Override Decisions: max 5 entries (most recent)
265
+
266
+ ### Extraction Guidelines
267
+
268
+ sys-memory-keeper extracts user model data at session end:
269
+ 1. Parse task outcomes for Skill invocations → update Skill Preferences
270
+ 2. Scan conversation for R016 violations → update Correction Patterns
271
+ 3. Analyze file patterns and routing decisions → update Expertise Profile
272
+ 4. Detect explicit user overrides (verdict changes, agent redirects) → update Override Decisions
273
+
274
+ ### Precedence
275
+
276
+ User Model data feeds into intent-detection (R015) and routing skill confidence scoring. Higher expertise in a domain → higher confidence for auto-routing to that domain's agent.
277
+
278
+ -->
279
+
216
280
  ## Session-End Auto-Save
217
281
 
218
282
  ### Trigger
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: skill-extractor
3
+ description: Analyze task trajectories to propose reusable SKILL.md candidates from successful patterns
4
+ scope: core
5
+ user-invocable: true
6
+ argument-hint: "[--threshold <n>] [--dry-run]"
7
+ version: 1.0.0
8
+ ---
9
+
10
+ # Skill Extractor
11
+
12
+ Analyze completed task outcomes to identify reusable patterns and propose new SKILL.md candidates. Inspired by Hermes Agent's self-learning skill extraction — adapted for oh-my-customcode's compilation metaphor.
13
+
14
+ ## Philosophy
15
+
16
+ In the compilation metaphor: task trajectories are runtime traces, and extracted skills are new source code. This skill turns successful execution patterns into reusable knowledge artifacts.
17
+
18
+ ```
19
+ Runtime traces (task outcomes) → Pattern analysis → SKILL.md proposal → User approval → mgr-creator
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ```
25
+ /skill-extractor # Analyze current session outcomes
26
+ /skill-extractor --threshold 2 # Lower success threshold (default: 3)
27
+ /skill-extractor --dry-run # Preview proposals without writing
28
+ ```
29
+
30
+ ## Options
31
+
32
+ ```
33
+ --threshold, -t Minimum success count for pattern qualification (default: 3)
34
+ --dry-run, -d Preview proposals to stdout only, no file writes
35
+ --all Include all sessions (not just current, requires task outcome history)
36
+ ```
37
+
38
+ ## Workflow
39
+
40
+ ### Phase 1: Collect Task Outcomes
41
+
42
+ Read task outcome data from the session:
43
+
44
+ ```bash
45
+ # Current session outcomes (from task-outcome-recorder hook)
46
+ OUTCOMES_FILE="/tmp/.claude-task-outcomes-${PPID}"
47
+ ```
48
+
49
+ If file doesn't exist or is empty: report "No task outcomes recorded in this session." and stop.
50
+
51
+ Parse JSONL entries. Each entry has:
52
+ ```json
53
+ {"agent_type": "lang-typescript-expert", "skill": "typescript-best-practices", "description": "Fix type error in auth module", "outcome": "success", "model": "sonnet", "timestamp": "2026-04-05T09:30:00Z", "duration_ms": 15000}
54
+ ```
55
+
56
+ ### Phase 2: Pattern Detection
57
+
58
+ Group outcomes by `(agent_type, skill)` tuple:
59
+
60
+ ```
61
+ Pattern: (lang-typescript-expert, typescript-best-practices)
62
+ → success: 5, failure: 1, total: 6
63
+ → success_rate: 0.83
64
+ → descriptions: ["Fix type error...", "Refactor module...", ...]
65
+ ```
66
+
67
+ Filter qualifying patterns:
68
+ - `success_count >= threshold` (default: 3)
69
+ - `success_rate >= 0.8`
70
+ - Not already an existing skill (check `.claude/skills/*/SKILL.md`)
71
+
72
+ ### Phase 3: Generate Proposals
73
+
74
+ For each qualifying pattern, generate a SKILL.md proposal:
75
+
76
+ ```markdown
77
+ ## Proposal: {proposed-skill-name}
78
+
79
+ **Source Pattern**: {agent_type} + {skill} ({success_count} successes, {success_rate}% rate)
80
+ **Confidence**: {low|medium|high} (based on count and rate)
81
+
82
+ ### Proposed SKILL.md
83
+
84
+ name: {proposed-name}
85
+ description: {inferred from common description patterns}
86
+ scope: core
87
+ user-invocable: false
88
+
89
+ ### Rationale
90
+ {Why this pattern should be extracted as a skill — based on frequency and success rate}
91
+
92
+ ### Overlap Check
93
+ {List any existing skills with >50% keyword overlap}
94
+ ```
95
+
96
+ **Confidence scoring**:
97
+ | Successes | Rate | Confidence |
98
+ |-----------|------|------------|
99
+ | 3-5 | >= 0.8 | low |
100
+ | 6-10 | >= 0.85 | medium |
101
+ | 10+ | >= 0.9 | high |
102
+
103
+ ### Phase 4: Present to User
104
+
105
+ Display proposals in ranked order (highest confidence first):
106
+
107
+ ```
108
+ [skill-extractor] {N} skill candidates detected
109
+
110
+ 1. [high] proposed-skill-name
111
+ Source: {agent_type} + {skill} (12 successes, 92%)
112
+ Description: {inferred description}
113
+
114
+ 2. [medium] another-skill-name
115
+ Source: {agent_type} + {skill} (7 successes, 86%)
116
+ Description: {inferred description}
117
+
118
+ Select [1-N] to create, "all" to create all, or "skip" to cancel:
119
+ ```
120
+
121
+ ### Phase 5: Create Skill (on approval)
122
+
123
+ Delegate to mgr-creator with the proposal context:
124
+ - Proposed name and description
125
+ - Source pattern data
126
+ - Confidence level
127
+ - Any overlap warnings
128
+
129
+ mgr-creator handles: SKILL.md creation, template sync, ontology registration.
130
+
131
+ ## Integration
132
+
133
+ | System | How |
134
+ |--------|-----|
135
+ | task-outcome-recorder | Reads JSONL outcomes as input data |
136
+ | feedback-collector | Complementary: feedback-collector extracts failure patterns, skill-extractor extracts success patterns |
137
+ | mgr-creator | Delegated skill creation on user approval |
138
+ | skills-sh-search | Check agentskills.io for existing equivalent before creating |
139
+ | R011 (memory) | User Model tracks extraction decisions in Override Decisions |
140
+
141
+ ## Hook Integration
142
+
143
+ The `skill-extractor-analyzer.sh` Stop hook provides a lightweight pre-analysis:
144
+ - Reads task outcomes file
145
+ - Counts qualifying patterns
146
+ - Emits advisory stderr message if candidates found
147
+ - Does NOT create skills (that requires user approval via the skill)
148
+
149
+ ## Safety
150
+
151
+ - **User approval required**: Never auto-creates skills
152
+ - **Overlap check**: Prevents duplicating existing skills
153
+ - **Dry-run mode**: Preview without side effects
154
+ - **Advisory hook**: Stop hook is advisory-only (exit 0)
155
+ - **Confidence transparency**: All proposals show confidence scores
@@ -23,6 +23,7 @@ Search the [skills.sh](https://skills.sh/) marketplace for reusable AI agent ski
23
23
  --global, -g Install to ~/.claude/skills/ instead of project .claude/skills/
24
24
  --list, -l List currently installed skills.sh skills
25
25
  --check, -c Check for updates on installed skills.sh skills
26
+ --source, -s Search source: "skills-sh" (default) | "agentskills" | "all"
26
27
  ```
27
28
 
28
29
  ## Workflow
@@ -123,6 +124,44 @@ Suggestions:
123
124
  - Consider creating a custom skill with /create-agent
124
125
  ```
125
126
 
127
+ ## Alternative Sources
128
+
129
+ ### agentskills.io (opt-in)
130
+
131
+ Search the [agentskills.io](https://agentskills.io/) community skill registry as an alternative source.
132
+
133
+ **Search workflow:**
134
+ ```
135
+ 1. Try: npx --yes @agentskill.sh/cli search "<query>"
136
+ 2. If CLI unavailable: WebSearch "site:agentskills.io <query>"
137
+ 3. Present results with source attribution
138
+ ```
139
+
140
+ **Install workflow:**
141
+ ```
142
+ 1. Run: npx --yes @agentskill.sh/cli install <slug>
143
+ 2. Verify installation in .claude/skills/
144
+ 3. Add source metadata:
145
+ ├── source-type: agentskills-io
146
+ └── source-origin: <slug>
147
+ ```
148
+
149
+ **Usage:**
150
+ ```bash
151
+ # Search agentskills.io only
152
+ /skills-sh-search "memory management" --source agentskills
153
+
154
+ # Search both sources
155
+ /skills-sh-search "testing patterns" --source all
156
+ ```
157
+
158
+ **Fallback chain:**
159
+ | Step | Tool | Condition |
160
+ |------|------|-----------|
161
+ | 1 | `@agentskill.sh/cli search` | Primary — if CLI available |
162
+ | 2 | `WebSearch site:agentskills.io` | CLI unavailable or no results |
163
+ | 3 | Report no results | Both failed |
164
+
126
165
  ## Examples
127
166
 
128
167
  ```bash
@@ -140,6 +179,12 @@ Suggestions:
140
179
 
141
180
  # Check for updates
142
181
  /skills-sh-search --check
182
+
183
+ # Search agentskills.io
184
+ /skills-sh-search "agent memory" --source agentskills
185
+
186
+ # Search all sources
187
+ /skills-sh-search "code review" --source all --install
143
188
  ```
144
189
 
145
190
  ## Integration
@@ -153,6 +198,9 @@ Installed skills.sh skills are tracked with `source-type: skills-sh` metadata, e
153
198
  ### With create-agent
154
199
  If a skills.sh skill provides domain knowledge, `create-agent` can reference it when building a new agent for that domain.
155
200
 
201
+ ### With agentskills.io
202
+ Installed agentskills.io skills are tracked with `source-type: agentskills-io` metadata, enabling `update-external` to check for updates. Default source remains skills.sh; agentskills.io is opt-in via `--source` flag.
203
+
156
204
  ## Safety
157
205
 
158
206
  - **Read-only by default**: Search does not modify anything
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.72.1",
2
+ "version": "0.73.0",
3
3
  "lastUpdated": "2026-03-24T00:00:00.000Z",
4
4
  "components": [
5
5
  {
@@ -18,7 +18,7 @@
18
18
  "name": "skills",
19
19
  "path": ".claude/skills",
20
20
  "description": "Reusable skill modules (includes slash commands)",
21
- "files": 99
21
+ "files": 100
22
22
  },
23
23
  {
24
24
  "name": "guides",