@heart-of-gold/toolkit 0.1.16 → 0.1.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heart-of-gold/toolkit",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "type": "module",
5
5
  "description": "Cross-platform installer for Heart of Gold skills — works with Codex, OpenCode, Pi, Claude Code, and more",
6
6
  "bin": {
@@ -7,7 +7,7 @@ description: Use when the user asks to run Claude Code CLI (`claude`, `claude re
7
7
 
8
8
  Use this skill to hand a bounded task to Claude Code from the current harness, capture the result, and summarize it back to the user.
9
9
 
10
- This skill is task-based, not review-only. Use `plan` for safe read-only analysis, but use other permission modes when the task requires command execution or edits.
10
+ This skill is task-based, not review-only. Anthropic's `plan` mode is a read-only analysis mode, but because Claude Code frames it as "Plan Mode," do not treat it as the default for reviews. Prefer `default` for normal reviews and `acceptEdits` for implementation work unless you specifically want strict read-only behavior.
11
11
 
12
12
  The canonical execution path is direct `claude` CLI usage, mirroring the `codex` skill's direct `codex exec` pattern. The bundled wrapper is optional and must not replace the direct path unless the user explicitly asks for it or you are debugging Claude Code invocation behavior itself.
13
13
 
@@ -31,19 +31,19 @@ Choose the permission mode based on what Claude Code needs to do:
31
31
 
32
32
  | Mode | Use when | Notes |
33
33
  | --- | --- | --- |
34
- | `plan` | The task is read-only and Claude does not need to execute commands or edit files | Safest option for reviewing provided diffs, logs, file contents, or design docs |
34
+ | `plan` | You explicitly want strict read-only analysis with no command execution or edits | Best for exploration, planning, or artifact-only analysis; not the default recommendation for review |
35
35
  | `default` | Claude may need to inspect the repo more freely and you can tolerate permission prompts | Good interactive default; less reliable in headless automation unless permissions are pre-arranged |
36
36
  | `acceptEdits` | Claude should be able to make local code changes | Strong default for implementation, refactors, and fixes |
37
37
  | `bypassPermissions` | Full automation is required in a trusted sandbox and the user explicitly approves it | High risk; do not default to this |
38
38
 
39
- `plan` is not the general default for this skill. It is only the safe default for bounded read-only tasks.
39
+ `plan` is not the general default for this skill. Use it only when you specifically want Claude in strict read-only analysis mode.
40
40
 
41
41
  ## Running a Task
42
42
  1. Always ask the user which model alias to use (default: `sonnet`) before running Claude Code, unless the user already specified the model.
43
43
  2. Ask for permission mode in the same prompt when the user did not specify it. Default to:
44
- - `plan` for bounded read-only analysis
44
+ - `default` for reviews and analysis
45
45
  - `acceptEdits` for implementation or refactoring work
46
- - `default` when Claude needs broader repo exploration without auto-edit authority
46
+ - `plan` only when the user explicitly wants strict read-only analysis
47
47
  3. Decide whether Claude should receive the artifact directly or discover it itself:
48
48
  - Pass diffs, logs, or file contents via stdin for safe read-only review
49
49
  - Let Claude inspect the working tree when the task requires tool use
@@ -60,9 +60,9 @@ Choose the permission mode based on what Claude Code needs to do:
60
60
  - `"your prompt here"` as the final positional argument
61
61
  5. Prefer `--output-format text` for human-readable summaries and `--output-format json` for automation or machine parsing.
62
62
  6. In headless automation, prefer explicit permissions:
63
- - `plan` for provided artifacts
63
+ - `default` for most review and analysis runs
64
64
  - `acceptEdits` for edit-capable runs
65
- - `default` only when prompts are acceptable or when permissions are constrained with `--allowedTools`
65
+ - `plan` only when you specifically want read-only analysis with no command execution
66
66
  7. Run the command, capture stdout/stderr, and summarize the outcome for the user.
67
67
  8. If Claude Code does not actually return output, stop and report that failure. Do not substitute your own review or analysis and present it as if it came from Claude Code.
68
68
 
@@ -91,15 +91,15 @@ When this skill is used from Codex, the skill cannot bypass Codex sandbox policy
91
91
 
92
92
  ## Recommended Patterns
93
93
 
94
- ### 1. Review a provided diff safely
94
+ ### 1. Review a provided diff
95
95
 
96
- Pass the diff via stdin and keep Claude in `plan` mode:
96
+ Pass the diff via stdin and ask for review directly. Use `default` unless you specifically want strict read-only analysis:
97
97
 
98
98
  ```bash
99
99
  git diff --staged | claude -p \
100
100
  --output-format text \
101
101
  --model sonnet \
102
- --permission-mode plan \
102
+ --permission-mode default \
103
103
  --max-turns 1 \
104
104
  "Review this diff. Return findings ordered by severity with file paths and concise explanations."
105
105
  ```
@@ -146,11 +146,24 @@ claude -r latest -p \
146
146
  claude -p \
147
147
  --output-format json \
148
148
  --model sonnet \
149
- --permission-mode plan \
149
+ --permission-mode default \
150
150
  --max-turns 1 \
151
151
  "Summarize the provided diff as JSON with keys: verdict, findings, risks."
152
152
  ```
153
153
 
154
+ ### 6. Use strict read-only analysis mode explicitly
155
+
156
+ Use `plan` only when you want Claude prevented from executing commands or editing files:
157
+
158
+ ```bash
159
+ git diff --staged | claude -p \
160
+ --output-format text \
161
+ --model sonnet \
162
+ --permission-mode plan \
163
+ --max-turns 1 \
164
+ "Analyze this diff and explain the key risks. Keep the response concise."
165
+ ```
166
+
154
167
  ## Optional Wrapper
155
168
 
156
169
  This skill also ships a convenience wrapper at `scripts/run-claude-code.sh`.
package/src/index.ts CHANGED
@@ -7,7 +7,7 @@ import { targetsCommand } from "./commands/targets";
7
7
  const main = defineCommand({
8
8
  meta: {
9
9
  name: "heart-of-gold",
10
- version: "0.1.16",
10
+ version: "0.1.17",
11
11
  description:
12
12
  "Cross-platform installer for Heart of Gold skills — Codex, OpenCode, Pi, Claude Code, and more",
13
13
  },