- install.sh:
- mkdir $AGENTS_DIR/_primitives
- copy *.sh + README.md from kit _primitives/ with backup_dir guard
- chmod +x for the primitive scripts
- extend hooks-copy loop to include tomd-preread.sh (skips if absent,
preserving back-compat with kits that predate the primitive)
- soft-warn (not hard-fail) if pandoc is missing — tomd primitive is
opt-in and works without pandoc for CSV/code/JSON/images
- settings-snippet.json: add PreToolUse(Read) entry for tomd-preread.sh
with statusMessage. New matcher block (no existing Read matcher).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.1 KiB
JSON
46 lines
1.1 KiB
JSON
{
|
|
"_comment": "Merge these entries into your ~/.claude/settings.json under the matching keys. If you already have PostToolUse/PreToolUse arrays, append the objects below to them instead of overwriting.",
|
|
"hooks": {
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "Write|Edit",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "~/.claude/hooks/assemble-agents.sh"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PreToolUse": [
|
|
{
|
|
"matcher": "Bash",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "~/.claude/hooks/assemble-validate.sh"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "~/.claude/hooks/no-hand-edit-agents.sh"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "Read",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "~/.claude/hooks/tomd-preread.sh",
|
|
"statusMessage": "tomd pre-read auto-convert check..."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|