@heart-of-gold/toolkit 0.1.9 → 0.1.11
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Don't Panic.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
29 skills for AI coding agents. Five plugins. Works with **Claude Code, Codex, OpenCode, Pi**, and any tool supporting the [agentskills.io](https://agentskills.io) standard. Named after *The Hitchhiker's Guide to the Galaxy* because the universe is absurd and your tools should at least have personality.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -107,13 +107,14 @@ Your personal content engine.
|
|
|
107
107
|
|
|
108
108
|
Configurable sources (RSS, Gmail, HN, web search), narrative briefs, LinkedIn drafts, blog outlines, voice fidelity checking, iMessage delivery, and two-way captures.
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
7 skills · 2 agents · 5 scripts
|
|
111
111
|
|
|
112
112
|
```
|
|
113
113
|
/guide:setup # configure your sources, themes, and voice
|
|
114
114
|
/guide:pipeline # run the full content engine
|
|
115
115
|
/guide:capture # morning/evening thought capture
|
|
116
116
|
/guide:write-post # guided blog writing (7 phases)
|
|
117
|
+
/guide:claude-code # Claude Code CLI guidance
|
|
117
118
|
/guide:codex # Codex CLI guidance
|
|
118
119
|
/guide:gemini # Gemini CLI guidance
|
|
119
120
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heart-of-gold/toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
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": {
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"./plugins/deep-thought/skills/review",
|
|
60
60
|
"./plugins/deep-thought/skills/think",
|
|
61
61
|
"./plugins/guide/skills/capture",
|
|
62
|
+
"./plugins/guide/skills/claude-code",
|
|
62
63
|
"./plugins/guide/skills/codex",
|
|
63
64
|
"./plugins/guide/skills/gemini",
|
|
64
65
|
"./plugins/guide/skills/pipeline",
|
package/plugins/guide/README.md
CHANGED
|
@@ -73,6 +73,12 @@ Guided blog writing in seven phases:
|
|
|
73
73
|
|
|
74
74
|
Can pick up blog outlines generated by the pipeline (`needs_write_post: true` in frontmatter).
|
|
75
75
|
|
|
76
|
+
### /guide:claude-code
|
|
77
|
+
|
|
78
|
+
Headless Claude Code handoff for second opinions, code review, targeted analysis, or follow-up on a bounded task.
|
|
79
|
+
|
|
80
|
+
Use it when you want another agent harness to invoke Claude Code non-interactively, capture the result, and summarize it back. The skill ships with a small wrapper script that standardizes `claude -p` / resume usage across installs.
|
|
81
|
+
|
|
76
82
|
## How the Pipeline Works
|
|
77
83
|
|
|
78
84
|
```
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claude-code
|
|
3
|
+
description: Use when the user asks to run Claude Code CLI (`claude`, `claude resume`) or asks for a second opinion, review, analysis, refactor, or follow-up specifically from Claude Code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Claude Code CLI Skill Guide
|
|
7
|
+
|
|
8
|
+
## Available Models
|
|
9
|
+
|
|
10
|
+
| Model | Best for |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| `sonnet` | Default recommendation for most coding, review, and analysis tasks |
|
|
13
|
+
| `opus` | Stronger reasoning for ambiguous or high-stakes reviews |
|
|
14
|
+
| `haiku` | Faster and cheaper for lightweight follow-ups |
|
|
15
|
+
|
|
16
|
+
Default recommendation: `sonnet` for most tasks, `opus` when depth matters more than speed.
|
|
17
|
+
|
|
18
|
+
## Running a Task
|
|
19
|
+
1. Ask the user which model to use (default: `sonnet`) AND which permission mode to use (`plan`, `acceptEdits`, `default`, `auto`, or `bypassPermissions`) in a single prompt when both matter.
|
|
20
|
+
2. Default to `--permission-mode plan` for reviews, read-only analysis, and second opinions.
|
|
21
|
+
3. Assemble the command with the appropriate options:
|
|
22
|
+
- `-p, --print` for non-interactive output
|
|
23
|
+
- `--output-format <text|json|stream-json>`
|
|
24
|
+
- `--model <MODEL>`
|
|
25
|
+
- `--permission-mode <MODE>`
|
|
26
|
+
- `--effort <low|medium|high|max>`
|
|
27
|
+
- `--add-dir <DIR>` when Claude Code must read outside the current working directory
|
|
28
|
+
- `"your prompt here"` as the final positional argument
|
|
29
|
+
4. Prefer `--output-format text` unless the caller explicitly needs JSON.
|
|
30
|
+
5. Run the command, capture stdout/stderr, and summarize the outcome for the user.
|
|
31
|
+
6. After Claude Code completes, tell the user they can resume by asking for `claude resume` or another Claude Code follow-up.
|
|
32
|
+
|
|
33
|
+
### Quick Reference
|
|
34
|
+
| Use case | Permission mode | Key flags |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| Read-only review or analysis | `plan` | `-p --output-format text --permission-mode plan` |
|
|
37
|
+
| Apply local edits | `acceptEdits` | `-p --output-format text --permission-mode acceptEdits` |
|
|
38
|
+
| Stronger review pass | `plan` | `--model opus --effort high` |
|
|
39
|
+
| Resume recent session | Inherited | `-r latest -p "new prompt" --output-format text` |
|
|
40
|
+
|
|
41
|
+
## Recommended Commands
|
|
42
|
+
|
|
43
|
+
### Review the current diff
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
claude -p \
|
|
47
|
+
--output-format text \
|
|
48
|
+
--model sonnet \
|
|
49
|
+
--permission-mode plan \
|
|
50
|
+
--effort medium \
|
|
51
|
+
"Review the current git diff. Return findings ordered by severity with file paths and concise explanations."
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Review a specific file
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
claude -p \
|
|
58
|
+
--output-format text \
|
|
59
|
+
--model sonnet \
|
|
60
|
+
--permission-mode plan \
|
|
61
|
+
--effort high \
|
|
62
|
+
"Review src/server.ts for correctness, regressions, and missing tests. Keep the response concise."
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Continue the latest Claude Code session
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
claude -r latest -p \
|
|
69
|
+
--output-format text \
|
|
70
|
+
"Focus only on the migration risk you mentioned. What is the safest rollout plan?"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Optional Wrapper
|
|
74
|
+
|
|
75
|
+
This skill also ships a convenience wrapper at `scripts/run-claude-code.sh`.
|
|
76
|
+
|
|
77
|
+
Use it only as a thin helper around the direct `claude` commands above:
|
|
78
|
+
|
|
79
|
+
- `scripts/run-claude-code.sh --check` verifies that Claude Code is installed
|
|
80
|
+
- `scripts/run-claude-code.sh --prompt "..." --permission-mode plan` mirrors the direct CLI usage
|
|
81
|
+
|
|
82
|
+
Prefer the direct `claude` commands in this document when debugging, because they are easier to inspect and adapt.
|
|
83
|
+
|
|
84
|
+
## Following Up
|
|
85
|
+
|
|
86
|
+
- After every Claude Code command, confirm whether the user wants a follow-up, a resume, or a different model / permission mode.
|
|
87
|
+
- When resuming, keep the new prompt narrow instead of restating the whole task.
|
|
88
|
+
- Restate the chosen model, effort, and permission mode when proposing a retry.
|
|
89
|
+
|
|
90
|
+
## Critical Evaluation of Claude Code Output
|
|
91
|
+
|
|
92
|
+
Claude Code is a colleague, not an authority.
|
|
93
|
+
|
|
94
|
+
### Guidelines
|
|
95
|
+
- Trust your own knowledge when confident.
|
|
96
|
+
- Push back if Claude Code makes a claim that conflicts with the code or docs in front of you.
|
|
97
|
+
- Research disagreements before accepting them for high-impact decisions.
|
|
98
|
+
- Do not defer blindly on models, tool flags, or fast-moving best practices.
|
|
99
|
+
|
|
100
|
+
### When Claude Code Seems Wrong
|
|
101
|
+
1. State the disagreement clearly to the user.
|
|
102
|
+
2. Provide evidence from the codebase, documentation, or your own verification.
|
|
103
|
+
3. Optionally resume the Claude Code session with a corrective prompt:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
claude -r latest -p \
|
|
107
|
+
--output-format text \
|
|
108
|
+
"I disagree with your earlier conclusion because [evidence]. Re-evaluate only that point."
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
4. Treat the exchange as a discussion, not a correction ritual.
|
|
112
|
+
|
|
113
|
+
## Error Handling
|
|
114
|
+
|
|
115
|
+
- Stop and report failures whenever `claude --version` or a `claude -p` command exits non-zero.
|
|
116
|
+
- If Claude Code reports permission issues, retry only after choosing the correct `--permission-mode`.
|
|
117
|
+
- Do not use `bypassPermissions` unless the user explicitly approves it.
|
|
118
|
+
- If debugging a failing wrapper invocation, fall back to the direct `claude` command first.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
cat <<'EOF'
|
|
6
|
+
Usage:
|
|
7
|
+
run-claude-code.sh --check
|
|
8
|
+
run-claude-code.sh --prompt "..." [options]
|
|
9
|
+
|
|
10
|
+
Options:
|
|
11
|
+
--check Verify that Claude Code is installed
|
|
12
|
+
--prompt TEXT Prompt to send to Claude Code
|
|
13
|
+
--model MODEL Claude model or alias (default: sonnet)
|
|
14
|
+
--permission-mode MODE plan, acceptEdits, default, auto, dontAsk, bypassPermissions
|
|
15
|
+
--effort LEVEL low, medium, high, max
|
|
16
|
+
--output-format FORMAT text, json, stream-json (default: text)
|
|
17
|
+
--resume VALUE Resume a session, for example: latest
|
|
18
|
+
--continue Continue the most recent session in the current directory
|
|
19
|
+
--add-dir PATH Additional directory to allow tool access to; repeatable
|
|
20
|
+
--cwd PATH Working directory to run Claude Code from
|
|
21
|
+
--help Show this help text
|
|
22
|
+
EOF
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
check_only=0
|
|
26
|
+
prompt=""
|
|
27
|
+
model="sonnet"
|
|
28
|
+
permission_mode=""
|
|
29
|
+
effort=""
|
|
30
|
+
output_format="text"
|
|
31
|
+
resume_value=""
|
|
32
|
+
continue_mode=0
|
|
33
|
+
cwd=""
|
|
34
|
+
declare -a add_dirs=()
|
|
35
|
+
|
|
36
|
+
while [[ $# -gt 0 ]]; do
|
|
37
|
+
case "$1" in
|
|
38
|
+
--check)
|
|
39
|
+
check_only=1
|
|
40
|
+
shift
|
|
41
|
+
;;
|
|
42
|
+
--prompt)
|
|
43
|
+
[[ $# -ge 2 ]] || { echo "Missing value for --prompt" >&2; exit 2; }
|
|
44
|
+
prompt="$2"
|
|
45
|
+
shift 2
|
|
46
|
+
;;
|
|
47
|
+
--model)
|
|
48
|
+
[[ $# -ge 2 ]] || { echo "Missing value for --model" >&2; exit 2; }
|
|
49
|
+
model="$2"
|
|
50
|
+
shift 2
|
|
51
|
+
;;
|
|
52
|
+
--permission-mode)
|
|
53
|
+
[[ $# -ge 2 ]] || { echo "Missing value for --permission-mode" >&2; exit 2; }
|
|
54
|
+
permission_mode="$2"
|
|
55
|
+
shift 2
|
|
56
|
+
;;
|
|
57
|
+
--effort)
|
|
58
|
+
[[ $# -ge 2 ]] || { echo "Missing value for --effort" >&2; exit 2; }
|
|
59
|
+
effort="$2"
|
|
60
|
+
shift 2
|
|
61
|
+
;;
|
|
62
|
+
--output-format)
|
|
63
|
+
[[ $# -ge 2 ]] || { echo "Missing value for --output-format" >&2; exit 2; }
|
|
64
|
+
output_format="$2"
|
|
65
|
+
shift 2
|
|
66
|
+
;;
|
|
67
|
+
--resume)
|
|
68
|
+
[[ $# -ge 2 ]] || { echo "Missing value for --resume" >&2; exit 2; }
|
|
69
|
+
resume_value="$2"
|
|
70
|
+
shift 2
|
|
71
|
+
;;
|
|
72
|
+
--continue)
|
|
73
|
+
continue_mode=1
|
|
74
|
+
shift
|
|
75
|
+
;;
|
|
76
|
+
--add-dir)
|
|
77
|
+
[[ $# -ge 2 ]] || { echo "Missing value for --add-dir" >&2; exit 2; }
|
|
78
|
+
add_dirs+=("$2")
|
|
79
|
+
shift 2
|
|
80
|
+
;;
|
|
81
|
+
--cwd)
|
|
82
|
+
[[ $# -ge 2 ]] || { echo "Missing value for --cwd" >&2; exit 2; }
|
|
83
|
+
cwd="$2"
|
|
84
|
+
shift 2
|
|
85
|
+
;;
|
|
86
|
+
--help|-h)
|
|
87
|
+
usage
|
|
88
|
+
exit 0
|
|
89
|
+
;;
|
|
90
|
+
*)
|
|
91
|
+
echo "Unknown argument: $1" >&2
|
|
92
|
+
usage >&2
|
|
93
|
+
exit 2
|
|
94
|
+
;;
|
|
95
|
+
esac
|
|
96
|
+
done
|
|
97
|
+
|
|
98
|
+
if [[ "$check_only" -eq 1 ]]; then
|
|
99
|
+
exec claude --version
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
if [[ -z "$prompt" ]]; then
|
|
103
|
+
echo "--prompt is required unless --check is used" >&2
|
|
104
|
+
exit 2
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
if [[ -n "$resume_value" && "$continue_mode" -eq 1 ]]; then
|
|
108
|
+
echo "--resume and --continue cannot be used together" >&2
|
|
109
|
+
exit 2
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
cmd=(claude)
|
|
113
|
+
|
|
114
|
+
if [[ -n "$resume_value" ]]; then
|
|
115
|
+
cmd+=(-r "$resume_value")
|
|
116
|
+
elif [[ "$continue_mode" -eq 1 ]]; then
|
|
117
|
+
cmd+=(-c)
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
cmd+=(--print --output-format "$output_format" --model "$model")
|
|
121
|
+
|
|
122
|
+
if [[ -n "$permission_mode" ]]; then
|
|
123
|
+
cmd+=(--permission-mode "$permission_mode")
|
|
124
|
+
fi
|
|
125
|
+
|
|
126
|
+
if [[ -n "$effort" ]]; then
|
|
127
|
+
cmd+=(--effort "$effort")
|
|
128
|
+
fi
|
|
129
|
+
|
|
130
|
+
if ((${#add_dirs[@]} > 0)); then
|
|
131
|
+
for dir in "${add_dirs[@]}"; do
|
|
132
|
+
cmd+=(--add-dir "$dir")
|
|
133
|
+
done
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
cmd+=("$prompt")
|
|
137
|
+
|
|
138
|
+
if [[ -n "$cwd" ]]; then
|
|
139
|
+
cd "$cwd"
|
|
140
|
+
fi
|
|
141
|
+
|
|
142
|
+
exec "${cmd[@]}"
|
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.
|
|
10
|
+
version: "0.1.11",
|
|
11
11
|
description:
|
|
12
12
|
"Cross-platform installer for Heart of Gold skills — Codex, OpenCode, Pi, Claude Code, and more",
|
|
13
13
|
},
|
package/src/utils/transform.ts
CHANGED
|
@@ -9,6 +9,7 @@ const CODEX_COMMAND_ALIASES: Record<string, string> = {
|
|
|
9
9
|
"/brainstorm": "$brainstorm",
|
|
10
10
|
"/capture": "$capture",
|
|
11
11
|
"/coach": "$coach",
|
|
12
|
+
"/claude-code": "$claude-code",
|
|
12
13
|
"/codex": "$codex",
|
|
13
14
|
"/compound": "$compound",
|
|
14
15
|
"/craft-skill": "$craft-skill",
|
|
@@ -26,6 +27,7 @@ const CODEX_COMMAND_ALIASES: Record<string, string> = {
|
|
|
26
27
|
"/goal-checkin": "$goal-checkin",
|
|
27
28
|
"/goal-setting": "$goal-setting",
|
|
28
29
|
"/guide:capture": "$capture",
|
|
30
|
+
"/guide:claude-code": "$claude-code",
|
|
29
31
|
"/guide:codex": "$codex",
|
|
30
32
|
"/guide:gemini": "$gemini",
|
|
31
33
|
"/guide:pipeline": "$pipeline",
|