@wbern/claude-instructions 1.5.0 → 1.6.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 (2) hide show
  1. package/README.md +81 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -30,6 +30,87 @@ The interactive installer lets you choose:
30
30
 
31
31
  After installation, restart Claude Code if it's currently running.
32
32
 
33
+ ### Adding to Your Repository
34
+
35
+ To automatically regenerate commands when teammates install dependencies, add it as a dev dependency with a postinstall script:
36
+
37
+ ```bash
38
+ npm install --save-dev @wbern/claude-instructions
39
+ ```
40
+
41
+ Then add a postinstall script to your `package.json`:
42
+
43
+ ```json
44
+ {
45
+ "scripts": {
46
+ "postinstall": "npx @wbern/claude-instructions --variant=without-beads --scope=project --prefix="
47
+ },
48
+ "devDependencies": {
49
+ "@wbern/claude-instructions": "^1.0.0"
50
+ }
51
+ }
52
+ ```
53
+
54
+ This ensures commands are regenerated whenever anyone runs `npm install`, `pnpm install`, or `yarn install`.
55
+
56
+ **CLI Options:**
57
+
58
+ | Option | Description |
59
+ |--------|-------------|
60
+ | `--variant=with-beads` | Include Beads MCP integration |
61
+ | `--variant=without-beads` | Standard commands only |
62
+ | `--scope=project` | Install to `.claude/commands` in current directory |
63
+ | `--scope=user` | Install to `~/.claude/commands` (global) |
64
+ | `--prefix=my-` | Add prefix to command names (e.g., `my-commit.md`) |
65
+ | `--skip-template-injection` | Don't inject CLAUDE.md template content |
66
+ | `--commands=commit,red,green` | Install only specific commands |
67
+
68
+ ## Customizing Commands
69
+
70
+ You can inject project-specific instructions into generated commands by adding a `<claude-commands-template>` block to your `CLAUDE.md` or `AGENTS.md` file.
71
+
72
+ ### Basic Usage
73
+
74
+ Add this to your project's `CLAUDE.md`:
75
+
76
+ ```markdown
77
+ # My Project
78
+
79
+ Other instructions here...
80
+
81
+ <claude-commands-template>
82
+ ## Project-Specific Rules
83
+
84
+ - Always use pnpm instead of npm
85
+ - Run tests with `pnpm test`
86
+ </claude-commands-template>
87
+ ```
88
+
89
+ When you run `npx @wbern/claude-instructions`, the template content is appended to all generated commands.
90
+
91
+ ### Targeting Specific Commands
92
+
93
+ Use the `commands` attribute to inject content only into specific commands:
94
+
95
+ ```markdown
96
+ <claude-commands-template commands="commit,ask">
97
+ ## Git Conventions
98
+
99
+ - Use conventional commits format
100
+ - Reference issue numbers in commits
101
+ </claude-commands-template>
102
+ ```
103
+
104
+ This injects the content only into `commit.md` and `ask.md`.
105
+
106
+ ### File Priority
107
+
108
+ The generator looks for template blocks in this order:
109
+ 1. `CLAUDE.md` (checked first)
110
+ 2. `AGENTS.md` (fallback)
111
+
112
+ Only the first file found is used.
113
+
33
114
  ## Which Command Should I Use?
34
115
 
35
116
  ### Main Workflow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wbern/claude-instructions",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "TDD workflow commands for Claude Code CLI",
5
5
  "type": "module",
6
6
  "bin": "./bin/cli.js",