From ant_prompt
Install Anthropic-internal coding standard hooks into the current project. Copies hook scripts to .claude/hooks/ and merges configuration into .claude/settings.json. Use when the user says "install ant hooks", "add ant mode", "enable coding standards", "install coding hooks", "enhance hooks", or "set up ant prompt".
How this skill is triggered — by the user, by Claude, or both
Slash command
/ant_prompt:install-ant-hooksThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Installs 4 hook scripts that replicate 7 Anthropic-internal (`USER_TYPE=ant`) coding standards into the current project as project-scoped Claude Code hooks.
Installs 4 hook scripts that replicate 7 Anthropic-internal (USER_TYPE=ant) coding standards into the current project as project-scoped Claude Code hooks.
The hook scripts are bundled as assets alongside this SKILL.md.
assets/ directory relative to this skill — use Glob for **/install-ant-hooks/assets/session-start-guidance.shASSETS_DIRASSETS_DIR:
session-start-guidance.shpost-edit-comments.shstop-verify-completion.shstop-check-length.shsettings.jsonwhich jq — if missing, tell the user:
brew install jqsudo apt-get install jqmkdir -p .claude/hooks in the target project root.claude/settings.json exists, read itsession-start-guidance.sh in any hook command entries.sh files from ASSETS_DIR to .claude/hooks/:
cp ASSETS_DIR/session-start-guidance.sh .claude/hooks/
cp ASSETS_DIR/post-edit-comments.sh .claude/hooks/
cp ASSETS_DIR/stop-verify-completion.sh .claude/hooks/
cp ASSETS_DIR/stop-check-length.sh .claude/hooks/
chmod +x .claude/hooks/*.shASSETS_DIR/settings.json (the template)HOOKS_DIR to the absolute path of .claude/hooks in the current project:
HOOKS_DIR="$(cd .claude/hooks && pwd)"
$HOOKS_DIR occurrences in the template with the resolved absolute pathMerge strategy — handle 3 scenarios:
A. No .claude/settings.json exists:
B. File exists but has no hooks key:
jq to add the hooks key from the resolved template:
jq -s '.[0] * .[1]' .claude/settings.json /tmp/ant-hooks-resolved.json > /tmp/merged.json
mv /tmp/merged.json .claude/settings.json
C. File exists with existing hooks key:
SessionStart, PostToolUse, Stop):
command paths — skip if already presentjq for all JSON operationsjq . .claude/settings.json to confirm valid JSONAnt-mode hooks installed successfully.
| Event | Hook | Behavior |
|-------|------|----------|
| SessionStart | session-start-guidance.sh | Advisory: injects 6 coding standards |
| PostToolUse (Edit) | post-edit-comments.sh | Advisory: reminds if >3 comment lines |
| PostToolUse (Write) | post-edit-comments.sh | Advisory: reminds if >3 comment lines |
| Stop | stop-verify-completion.sh | Enforcing: blocks unverified completion claims |
| Stop | stop-check-length.sh | Soft-enforce: blocks if >200 words |
Restart your Claude Code session for hooks to take effect.
After installation, users can tune behavior:
export HOOK_MAX_WORDS=150 (default: 200).claude/hooks/post-edit-comments.sh line 31, change -gt 3stop-verify-completion.sh, change exit 2 to exit 0.claude/settings.json| Do Not | Do Instead |
|---|---|
Install to global ~/.claude/settings.json | Always use project-scoped .claude/settings.json |
| Overwrite existing hooks in settings.json | Merge/append new entries alongside existing ones |
| Modify the hook scripts during installation | Copy as-is; user customizes after install |
| Skip the verification step | Always run jq . and check file permissions |
npx claudepluginhub touricks/fanshi_personal_skills --plugin ant_promptInstalls plugin hooks into a project's .claude/ directory for persistent use without the plugin loaded. Supports selective or bulk install, dry-run, and conflict resolution.
Guides setup of Claude Code Hooks for production safety, selecting profiles (Minimal, Standard, Autonomous), configuring env vars like CC_CONTEXT_MISSION_FILE, and running verification tests.
Configures, creates, and troubleshoots Claude Code hooks like PreToolUse, PostToolUse, and UserPromptSubmit for automating tasks such as running tests before file edits or formatting outputs with jq.