openhermes 1.5.6 → 1.13.1

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 (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +217 -111
  3. package/autorecall.mjs +2 -12
  4. package/bootstrap.mjs +160 -8
  5. package/curator.mjs +1 -5
  6. package/harness/commands/checkpoint.md +68 -0
  7. package/harness/commands/eval.md +89 -0
  8. package/harness/commands/go-build.md +87 -0
  9. package/harness/commands/go-review.md +71 -0
  10. package/harness/commands/harness-audit.md +90 -0
  11. package/harness/commands/learn.md +2 -2
  12. package/harness/commands/loop-start.md +38 -0
  13. package/harness/commands/loop-status.md +30 -0
  14. package/harness/commands/memory-search.md +2 -2
  15. package/harness/commands/model-route.md +32 -0
  16. package/harness/commands/ohc.md +13 -0
  17. package/harness/commands/orchestrate.md +88 -0
  18. package/harness/commands/quality-gate.md +35 -0
  19. package/harness/commands/refactor-clean.md +102 -0
  20. package/harness/commands/rust-build.md +78 -0
  21. package/harness/commands/rust-review.md +65 -0
  22. package/harness/commands/setup-pm.md +65 -0
  23. package/harness/commands/skill-create.md +99 -0
  24. package/harness/commands/test-coverage.md +80 -0
  25. package/harness/commands/update-codemaps.md +81 -0
  26. package/harness/commands/update-docs.md +67 -0
  27. package/harness/commands/verify.md +68 -0
  28. package/harness/instructions/CONVENTIONS.md +206 -0
  29. package/harness/instructions/RUNTIME.md +8 -1
  30. package/harness/prompts/build-cpp.md +84 -0
  31. package/harness/prompts/build-error-resolver.md +2 -1
  32. package/harness/prompts/build-go.md +326 -0
  33. package/harness/prompts/build-java.md +126 -0
  34. package/harness/prompts/build-kotlin.md +123 -0
  35. package/harness/prompts/build-rust.md +94 -0
  36. package/harness/prompts/code-reviewer.md +2 -1
  37. package/harness/prompts/doc-updater.md +193 -0
  38. package/harness/prompts/docs-lookup.md +60 -0
  39. package/harness/prompts/explore.md +1 -0
  40. package/harness/prompts/harness-optimizer.md +30 -0
  41. package/harness/prompts/loop-operator.md +42 -0
  42. package/harness/prompts/planner.md +3 -2
  43. package/harness/prompts/refactor-cleaner.md +242 -0
  44. package/harness/prompts/review-cpp.md +68 -0
  45. package/harness/prompts/review-database.md +248 -0
  46. package/harness/prompts/review-go.md +244 -0
  47. package/harness/prompts/review-java.md +100 -0
  48. package/harness/prompts/review-kotlin.md +130 -0
  49. package/harness/prompts/review-python.md +88 -0
  50. package/harness/prompts/review-rust.md +64 -0
  51. package/harness/prompts/security-reviewer.md +3 -2
  52. package/harness/prompts/tdd-guide.md +214 -0
  53. package/harness/rules/delegation.md +28 -22
  54. package/harness/rules/memory-management.md +4 -4
  55. package/harness/rules/retrieval.md +5 -5
  56. package/harness/rules/runtime-guards.md +1 -1
  57. package/harness/rules/session-start.md +4 -4
  58. package/harness/rules/skills-management.md +2 -2
  59. package/harness/rules/state-drift.md +1 -1
  60. package/harness/rules/verification.md +4 -4
  61. package/harness/scripts/sync-commands.mjs +259 -0
  62. package/harness/skills/coding-standards/SKILL.md +1 -1
  63. package/index.mjs +25 -4
  64. package/lib/hardening.mjs +11 -1
  65. package/lib/memory-tools-plugin.mjs +84 -71
  66. package/lib/ohc/config.mjs +30 -0
  67. package/lib/ohc/pruner.mjs +239 -0
  68. package/lib/ohc/reaper.mjs +61 -0
  69. package/lib/ohc/state.mjs +32 -0
  70. package/lib/ohc/updater.mjs +110 -0
  71. package/package.json +6 -2
  72. package/skill-builder.mjs +2 -6
@@ -0,0 +1,38 @@
1
+ ---
2
+ description: Start a managed autonomous loop pattern with safety defaults
3
+ agent: loop-operator
4
+ subtask: true
5
+ ---
6
+
7
+ # Loop Start Command
8
+
9
+ Start a managed autonomous loop pattern with safety defaults.
10
+
11
+ ## Usage
12
+
13
+ `/loop-start [pattern] [--mode safe|fast]`
14
+
15
+ - `pattern`: `sequential`, `continuous-pr`, `rfc-dag`, `infinite`
16
+ - `--mode`:
17
+ - `safe` (default): strict quality gates and checkpoints
18
+ - `fast`: reduced gates for speed
19
+
20
+ ## Flow
21
+
22
+ 1. Confirm repository state and branch strategy.
23
+ 2. Select loop pattern and model tier strategy.
24
+ 3. Enable required hooks/profile for the chosen mode.
25
+ 4. Create loop plan and write runbook under `.opencode/plans/`.
26
+ 5. Print commands to start and monitor the loop.
27
+
28
+ ## Required Safety Checks
29
+
30
+ - Verify tests pass before first loop iteration.
31
+ - Ensure `OH_HOOK_PROFILE` is not disabled globally.
32
+ - Ensure loop has explicit stop condition.
33
+
34
+ ## Arguments
35
+
36
+ $ARGUMENTS:
37
+ - `<pattern>` optional (`sequential|continuous-pr|rfc-dag|infinite`)
38
+ - `--mode safe|fast` optional
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Inspect active loop state, progress, and failure signals
3
+ agent: OpenHermes
4
+ subtask: true
5
+ ---
6
+
7
+ # Loop Status Command
8
+
9
+ Inspect active loop state, progress, and failure signals.
10
+
11
+ ## Usage
12
+
13
+ `/loop-status [--watch]`
14
+
15
+ ## What to Report
16
+
17
+ - active loop pattern
18
+ - current phase and last successful checkpoint
19
+ - failing checks (if any)
20
+ - estimated time/cost drift
21
+ - recommended intervention (continue/pause/stop)
22
+
23
+ ## Watch Mode
24
+
25
+ When `--watch` is present, refresh status periodically and surface state changes.
26
+
27
+ ## Arguments
28
+
29
+ $ARGUMENTS:
30
+ - `--watch` optional
@@ -10,7 +10,7 @@ Search openhermes memory for: $ARGUMENTS
10
10
 
11
11
  ## Your Task
12
12
 
13
- 1. Call `hm_search` with query="$ARGUMENTS" to get raw results
13
+ 1. Call `search_memory` with query="$ARGUMENTS" to get raw results
14
14
  2. Summarize the top 5 results with natural language interpretation
15
15
  3. Highlight patterns, recurring themes, and actionable insights
16
16
  4. Return a structured report
@@ -34,4 +34,4 @@ Search openhermes memory for: $ARGUMENTS
34
34
 
35
35
  ### Recommended Next Query
36
36
 
37
- [Suggest a follow-up hm_search query for deeper exploration]
37
+ [Suggest a follow-up search_memory query for deeper exploration]
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: Recommend optimal model tier for the current task
3
+ agent: OpenHermes
4
+ subtask: true
5
+ ---
6
+
7
+ # Model Route Command
8
+
9
+ Recommend the best model tier for the current task by complexity and budget.
10
+
11
+ ## Usage
12
+
13
+ `/model-route [task-description] [--budget low|med|high]`
14
+
15
+ ## Routing Heuristic
16
+
17
+ - `haiku`: deterministic, low-risk mechanical changes
18
+ - `sonnet`: default for implementation and refactors
19
+ - `opus`: architecture, deep review, ambiguous requirements
20
+
21
+ ## Required Output
22
+
23
+ - recommended model
24
+ - confidence level
25
+ - why this model fits
26
+ - fallback model if first attempt fails
27
+
28
+ ## Arguments
29
+
30
+ $ARGUMENTS:
31
+ - `[task-description]` optional free-text
32
+ - `--budget low|med|high` optional
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: OHC context management: /ohc status, /ohc compress [focus]
3
+ agent: OpenHermes
4
+ subtask: true
5
+ ---
6
+
7
+ # Ohc Command
8
+
9
+ OHC context management — hook-handled.
10
+
11
+ Run `/ohc status` to check context usage, `/ohc compress [targetTokens] [focus]` to free space.
12
+
13
+ $ARGUMENTS
@@ -0,0 +1,88 @@
1
+ ---
2
+ description: Orchestrate multiple agents for complex tasks
3
+ agent: planner
4
+ subtask: true
5
+ ---
6
+
7
+ # Orchestrate Command
8
+
9
+ Orchestrate multiple specialized agents for this complex task: $ARGUMENTS
10
+
11
+ ## Your Task
12
+
13
+ 1. **Analyze task complexity** and break into subtasks
14
+ 2. **Identify optimal agents** for each subtask
15
+ 3. **Create execution plan** with dependencies
16
+ 4. **Coordinate execution** - parallel where possible
17
+ 5. **Synthesize results** into unified output
18
+
19
+ ## Available Agents
20
+
21
+ | Agent | Specialty | Use For |
22
+ |-------|-----------|---------|
23
+ | planner | Implementation planning | Complex feature design |
24
+ | architect | System design | Architectural decisions |
25
+ | code-reviewer | Code quality | Review changes |
26
+ | security-reviewer | Security analysis | Vulnerability detection |
27
+ | tdd-guide | Test-driven dev | Feature implementation |
28
+ | build-error-resolver | Build fixes | TypeScript/build errors |
29
+ | e2e-runner | E2E testing | User flow testing |
30
+ | doc-updater | Documentation | Updating docs |
31
+ | refactor-cleaner | Code cleanup | Dead code removal |
32
+ | review-go | Go code | Go-specific review |
33
+ | build-go | Go builds | Go build errors |
34
+ | review-database | Database | Query optimization |
35
+
36
+ ## Orchestration Patterns
37
+
38
+ ### Sequential Execution
39
+ ```
40
+ planner → tdd-guide → code-reviewer → security-reviewer
41
+ ```
42
+ Use when: Later tasks depend on earlier results
43
+
44
+ ### Parallel Execution
45
+ ```
46
+ ┌→ security-reviewer
47
+ planner →├→ code-reviewer
48
+ └→ architect
49
+ ```
50
+ Use when: Tasks are independent
51
+
52
+ ### Fan-Out/Fan-In
53
+ ```
54
+ ┌→ agent-1 ─┐
55
+ planner →├→ agent-2 ─┼→ synthesizer
56
+ └→ agent-3 ─┘
57
+ ```
58
+ Use when: Multiple perspectives needed
59
+
60
+ ## Execution Plan Format
61
+
62
+ ### Phase 1: [Name]
63
+ - Agent: [agent-name]
64
+ - Task: [specific task]
65
+ - Depends on: [none or previous phase]
66
+
67
+ ### Phase 2: [Name] (parallel)
68
+ - Agent A: [agent-name]
69
+ - Task: [specific task]
70
+ - Agent B: [agent-name]
71
+ - Task: [specific task]
72
+ - Depends on: Phase 1
73
+
74
+ ### Phase 3: Synthesis
75
+ - Combine results from Phase 2
76
+ - Generate unified output
77
+
78
+ ## Coordination Rules
79
+
80
+ 1. **Plan before execute** - Create full execution plan first
81
+ 2. **Minimize handoffs** - Reduce context switching
82
+ 3. **Parallelize when possible** - Independent tasks in parallel
83
+ 4. **Clear boundaries** - Each agent has specific scope
84
+ 5. **Single source of truth** - One agent owns each artifact
85
+
86
+ ---
87
+
88
+ **NOTE**: Complex tasks benefit from multi-agent orchestration. Simple tasks should use single agents directly.
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: Run quality pipeline on demand for a file or project scope
3
+ agent: OpenHermes
4
+ subtask: true
5
+ ---
6
+
7
+ # Quality Gate Command
8
+
9
+ Run the quality pipeline on demand for a file or project scope.
10
+
11
+ ## Usage
12
+
13
+ `/quality-gate [path|.] [--fix] [--strict]`
14
+
15
+ - default target: current directory (`.`)
16
+ - `--fix`: allow auto-format/fix where configured
17
+ - `--strict`: fail on warnings where supported
18
+
19
+ ## Pipeline
20
+
21
+ 1. Detect language/tooling for target.
22
+ 2. Run formatter checks.
23
+ 3. Run lint/type checks when available.
24
+ 4. Produce a concise remediation list.
25
+
26
+ ## Notes
27
+
28
+ This command mirrors hook behavior but is operator-invoked.
29
+
30
+ ## Arguments
31
+
32
+ $ARGUMENTS:
33
+ - `[path|.]` optional target path
34
+ - `--fix` optional
35
+ - `--strict` optional
@@ -0,0 +1,102 @@
1
+ ---
2
+ description: Remove dead code and consolidate duplicates
3
+ agent: refactor-cleaner
4
+ subtask: true
5
+ ---
6
+
7
+ # Refactor Clean Command
8
+
9
+ Analyze and clean up the codebase: $ARGUMENTS
10
+
11
+ ## Your Task
12
+
13
+ 1. **Detect dead code** using analysis tools
14
+ 2. **Identify duplicates** and consolidation opportunities
15
+ 3. **Safely remove** unused code with documentation
16
+ 4. **Verify** no functionality broken
17
+
18
+ ## Detection Phase
19
+
20
+ ### Run Analysis Tools
21
+
22
+ ```bash
23
+ # Find unused exports
24
+ npx knip
25
+
26
+ # Find unused dependencies
27
+ npx depcheck
28
+
29
+ # Find unused TypeScript exports
30
+ npx ts-prune
31
+ ```
32
+
33
+ ### Manual Checks
34
+
35
+ - Unused functions (no callers)
36
+ - Unused variables
37
+ - Unused imports
38
+ - Commented-out code
39
+ - Unreachable code
40
+ - Unused CSS classes
41
+
42
+ ## Removal Phase
43
+
44
+ ### Before Removing
45
+
46
+ 1. **Search for usage** - grep, find references
47
+ 2. **Check exports** - might be used externally
48
+ 3. **Verify tests** - no test depends on it
49
+ 4. **Document removal** - git commit message
50
+
51
+ ### Safe Removal Order
52
+
53
+ 1. Remove unused imports first
54
+ 2. Remove unused private functions
55
+ 3. Remove unused exported functions
56
+ 4. Remove unused types/interfaces
57
+ 5. Remove unused files
58
+
59
+ ## Consolidation Phase
60
+
61
+ ### Identify Duplicates
62
+
63
+ - Similar functions with minor differences
64
+ - Copy-pasted code blocks
65
+ - Repeated patterns
66
+
67
+ ### Consolidation Strategies
68
+
69
+ 1. **Extract utility function** - for repeated logic
70
+ 2. **Create base class** - for similar classes
71
+ 3. **Use higher-order functions** - for repeated patterns
72
+ 4. **Create shared constants** - for magic values
73
+
74
+ ## Verification
75
+
76
+ After cleanup:
77
+
78
+ 1. `npm run build` - builds successfully
79
+ 2. `npm test` - all tests pass
80
+ 3. `npm run lint` - no new lint errors
81
+ 4. Manual smoke test - features work
82
+
83
+ ## Report Format
84
+
85
+ ```
86
+ Dead Code Analysis
87
+ ==================
88
+
89
+ Removed:
90
+ - file.ts: functionName (unused export)
91
+ - utils.ts: helperFunction (no callers)
92
+
93
+ Consolidated:
94
+ - formatDate() and formatDateTime() → dateUtils.format()
95
+
96
+ Remaining (manual review needed):
97
+ - oldComponent.tsx: potentially unused, verify with team
98
+ ```
99
+
100
+ ---
101
+
102
+ **CAUTION**: Always verify before removing. When in doubt, ask or add `// TODO: verify usage` comment.
@@ -0,0 +1,78 @@
1
+ ---
2
+ description: Fix Rust build errors and borrow checker issues
3
+ agent: build-rust
4
+ subtask: true
5
+ ---
6
+
7
+ # Rust Build Command
8
+
9
+ Fix Rust build, clippy, and dependency errors: $ARGUMENTS
10
+
11
+ ## Your Task
12
+
13
+ 1. **Run cargo check**: `cargo check 2>&1`
14
+ 2. **Run cargo clippy**: `cargo clippy -- -D warnings 2>&1`
15
+ 3. **Fix errors** one at a time
16
+ 4. **Verify fixes** don't introduce new errors
17
+
18
+ ## Common Rust Errors
19
+
20
+ ### Borrow Checker
21
+ ```
22
+ cannot borrow `x` as mutable because it is also borrowed as immutable
23
+ ```
24
+ **Fix**: Restructure to end immutable borrow first; clone only if justified
25
+
26
+ ### Type Mismatch
27
+ ```
28
+ mismatched types: expected `T`, found `U`
29
+ ```
30
+ **Fix**: Add `.into()`, `as`, or explicit type conversion
31
+
32
+ ### Missing Import
33
+ ```
34
+ unresolved import `crate::module`
35
+ ```
36
+ **Fix**: Fix the `use` path or declare the module (add Cargo.toml deps only for external crates)
37
+
38
+ ### Lifetime Errors
39
+ ```
40
+ does not live long enough
41
+ ```
42
+ **Fix**: Use owned type or add lifetime annotation
43
+
44
+ ### Trait Not Implemented
45
+ ```
46
+ the trait `X` is not implemented for `Y`
47
+ ```
48
+ **Fix**: Add `#[derive(Trait)]` or implement manually
49
+
50
+ ## Fix Order
51
+
52
+ 1. **Build errors** - Code must compile
53
+ 2. **Clippy warnings** - Fix suspicious constructs
54
+ 3. **Formatting** - `cargo fmt` compliance
55
+
56
+ ## Build Commands
57
+
58
+ ```bash
59
+ cargo check 2>&1
60
+ cargo clippy -- -D warnings 2>&1
61
+ cargo fmt --check 2>&1
62
+ cargo tree --duplicates
63
+ cargo test
64
+ ```
65
+
66
+ ## Verification
67
+
68
+ After fixes:
69
+ ```bash
70
+ cargo check # Should succeed
71
+ cargo clippy -- -D warnings # No warnings allowed
72
+ cargo fmt --check # Formatting should pass
73
+ cargo test # Tests should pass
74
+ ```
75
+
76
+ ---
77
+
78
+ **IMPORTANT**: Fix errors only. No refactoring, no improvements. Get the build green with minimal changes.
@@ -0,0 +1,65 @@
1
+ ---
2
+ description: Rust code review for ownership, safety, and idiomatic patterns
3
+ agent: review-rust
4
+ subtask: true
5
+ ---
6
+
7
+ # Rust Review Command
8
+
9
+ Review Rust code for idiomatic patterns and best practices: $ARGUMENTS
10
+
11
+ ## Your Task
12
+
13
+ 1. **Analyze Rust code** for idioms and patterns
14
+ 2. **Check ownership** - borrowing, lifetimes, unnecessary clones
15
+ 3. **Review error handling** - proper `?` propagation, no unwrap in production
16
+ 4. **Verify safety** - unsafe usage, injection, secrets
17
+
18
+ ## Review Checklist
19
+
20
+ ### Safety (CRITICAL)
21
+ - [ ] No unchecked `unwrap()`/`expect()` in production paths
22
+ - [ ] `unsafe` blocks have `// SAFETY:` comments
23
+ - [ ] No SQL/command injection
24
+ - [ ] No hardcoded secrets
25
+
26
+ ### Ownership (HIGH)
27
+ - [ ] No unnecessary `.clone()` to satisfy borrow checker
28
+ - [ ] `&str` preferred over `String` in function parameters
29
+ - [ ] `&[T]` preferred over `Vec<T>` in function parameters
30
+ - [ ] No excessive lifetime annotations where elision works
31
+
32
+ ### Error Handling (HIGH)
33
+ - [ ] Errors propagated with `?`; use `.context()` in `anyhow`/`eyre` application code
34
+ - [ ] No silenced errors (`let _ = result;`)
35
+ - [ ] `thiserror` for library errors, `anyhow` for applications
36
+
37
+ ### Concurrency (HIGH)
38
+ - [ ] No blocking in async context
39
+ - [ ] Bounded channels preferred
40
+ - [ ] `Mutex` poisoning handled
41
+ - [ ] `Send`/`Sync` bounds correct
42
+
43
+ ### Code Quality (MEDIUM)
44
+ - [ ] Functions under 50 lines
45
+ - [ ] No deep nesting (>4 levels)
46
+ - [ ] Exhaustive matching on business enums
47
+ - [ ] Clippy warnings addressed
48
+
49
+ ## Report Format
50
+
51
+ ### CRITICAL Issues
52
+ - [file:line] Issue description
53
+ Suggestion: How to fix
54
+
55
+ ### HIGH Issues
56
+ - [file:line] Issue description
57
+ Suggestion: How to fix
58
+
59
+ ### MEDIUM Issues
60
+ - [file:line] Issue description
61
+ Suggestion: How to fix
62
+
63
+ ---
64
+
65
+ **TIP**: Run `cargo clippy -- -D warnings` and `cargo fmt --check` for automated checks.
@@ -0,0 +1,65 @@
1
+ ---
2
+ description: Configure package manager preference for OpenHermes
3
+ agent: OpenHermes
4
+ subtask: true
5
+ ---
6
+
7
+ # Setup Package Manager Command
8
+
9
+ Configure your preferred package manager: $ARGUMENTS
10
+
11
+ ## Your Task
12
+
13
+ Set up package manager preference for the project or globally.
14
+
15
+ ## Detection Order
16
+
17
+ 1. **Environment variable**: `OPENHERMES_PACKAGE_MANAGER`
18
+ 2. **Project config**: `.opencode/package-manager.json`
19
+ 3. **package.json**: `packageManager` field
20
+ 4. **Lock file**: Auto-detect from lock files
21
+ 5. **Global config**: `~/.config/opencode/package-manager.json`
22
+ 6. **Fallback**: First available
23
+
24
+ ## Configuration Options
25
+
26
+ ### Option 1: Environment Variable
27
+ ```bash
28
+ $env:OPENHERMES_PACKAGE_MANAGER="pnpm"
29
+ ```
30
+
31
+ ### Option 2: Project Config
32
+ ```bash
33
+ # Create .opencode/package-manager.json
34
+ echo '{"packageManager": "pnpm"}' | Out-File -Encoding utf8 .opencode/package-manager.json
35
+ ```
36
+
37
+ ### Option 3: package.json
38
+ ```json
39
+ {
40
+ "packageManager": "pnpm@8.0.0"
41
+ }
42
+ ```
43
+
44
+ ### Option 4: Global Config
45
+ ```bash
46
+ # Create ~/.config/opencode/package-manager.json
47
+ echo '{"packageManager": "yarn"}' | Out-File -Encoding utf8 ~/.config/opencode/package-manager.json
48
+ ```
49
+
50
+ ## Supported Package Managers
51
+
52
+ | Manager | Lock File | Commands |
53
+ |---------|-----------|----------|
54
+ | npm | package-lock.json | `npm install`, `npm run` |
55
+ | pnpm | pnpm-lock.yaml | `pnpm install`, `pnpm run` |
56
+ | yarn | yarn.lock | `yarn install`, `yarn run` |
57
+ | bun | bun.lockb | `bun install`, `bun run` |
58
+
59
+ ## Verification
60
+
61
+ Check current setting by inspecting detection order from top down.
62
+
63
+ ---
64
+
65
+ **TIP**: For consistency across team, add `packageManager` field to package.json.
@@ -0,0 +1,99 @@
1
+ ---
2
+ description: Generate SKILL.md files from git history analysis
3
+ agent: OpenHermes
4
+ subtask: true
5
+ ---
6
+
7
+ # Skill Create Command
8
+
9
+ Analyze git history to generate OpenHermes skills: $ARGUMENTS
10
+
11
+ ## Your Task
12
+
13
+ 1. **Analyze commits** - Pattern recognition from history
14
+ 2. **Extract patterns** - Common practices and conventions
15
+ 3. **Generate SKILL.md** - Structured skill documentation in OH harness format
16
+
17
+ ## Analysis Process
18
+
19
+ ### Step 1: Gather Commit Data
20
+ ```bash
21
+ # Recent commits
22
+ git log --oneline -100
23
+
24
+ # Commits by file type
25
+ git log --name-only --pretty=format: | sort | uniq -c | sort -rn
26
+
27
+ # Most changed files
28
+ git log --pretty=format: --name-only | sort | uniq -c | sort -rn | head -20
29
+ ```
30
+
31
+ ### Step 2: Identify Patterns
32
+
33
+ **Commit Message Patterns**:
34
+ - Common prefixes (feat, fix, refactor)
35
+ - Naming conventions
36
+ - Co-author patterns
37
+
38
+ **Code Patterns**:
39
+ - File structure conventions
40
+ - Import organization
41
+ - Error handling approaches
42
+
43
+ **Review Patterns**:
44
+ - Common review feedback
45
+ - Recurring fix types
46
+ - Quality gates
47
+
48
+ ### Step 3: Generate SKILL.md
49
+
50
+ ```markdown
51
+ # [Skill Name]
52
+
53
+ ## Overview
54
+ [What this skill teaches]
55
+
56
+ ## Patterns
57
+
58
+ ### Pattern 1: [Name]
59
+ - When to use
60
+ - Implementation
61
+ - Example
62
+
63
+ ### Pattern 2: [Name]
64
+ - When to use
65
+ - Implementation
66
+ - Example
67
+
68
+ ## Best Practices
69
+
70
+ 1. [Practice 1]
71
+ 2. [Practice 2]
72
+ 3. [Practice 3]
73
+
74
+ ## Common Mistakes
75
+
76
+ 1. [Mistake 1] - How to avoid
77
+ 2. [Mistake 2] - How to avoid
78
+
79
+ ## Examples
80
+
81
+ ### Good Example
82
+ ```[language]
83
+ // Code example
84
+ ```
85
+
86
+ ### Anti-pattern
87
+ ```[language]
88
+ // What not to do
89
+ ```
90
+ ```
91
+
92
+ ## Output
93
+
94
+ Creates:
95
+ - `skills/[name]/SKILL.md` - Skill documentation in OpenHermes harness format
96
+
97
+ ---
98
+
99
+ **TIP**: Run `/skill-create` after several related commits to extract reusable patterns.