feat: adopt Claude Code v2.1.83 → v2.1.122 features#9
Merged
Conversation
Audits the changelog from v2.1.83 to v2.1.122 and pulls every feature
relevant to a starter template into this repo. All additive — no
breaking changes.
Hooks
- New PreCompact hook (v2.1.105+) saves a checkpoint to
.claude/checkpoints/ before compaction drops context
- New redact-secrets PostToolUse hook demonstrates v2.1.122
hookSpecificOutput.updatedToolOutput by scrubbing API keys, JWTs,
PATs, and Slack tokens out of tool output before the model sees them
- session-cost.sh now reads per-tool duration_ms from PostToolUse
logs (v2.1.121) and prints a top-tools-by-time breakdown
- docs/hooks-cookbook.md covers all new events plus the conditional
`if` field (v2.1.85) and `mcp_tool` hook type (v2.1.118)
MCP
- .mcp.json declares alwaysLoad: true on filesystem and git so they
skip tool-search deferral (v2.1.122)
Plugin spec
- Bumped plugin.json to v0.3.0
- Registers new components: themes (.claude/themes/) and bin (bin/)
- Ships .claude/themes/anthropic-clay.json as a demo theme
- Ships bin/claude-template-info as a demo executable; plugins now
add bin/ to the Bash tool's $PATH (v2.1.91+)
Skills
- New effort-aware skill demonstrates ${CLAUDE_EFFORT} interpolation
(v2.1.120+) — adapts guidance to current effort level
Subagents
- dependency-auditor frontmatter now declares mcpServers and hooks
(v2.1.116/117) — agents are more self-contained when invoked via --agent
Settings
- statusLine.refreshInterval: 5 (v2.1.97)
- sandbox.network.deniedDomains for cloud-metadata IPs (v2.1.113)
- prUrlTemplate for footer PR badge (v2.1.119)
- Conditional `if` field on the block-dangerous-bash PreToolUse hook
CI / scripts
- scripts/ci-review.sh adds --ultrareview <target> mode that
delegates to claude ultrareview (v2.1.120) for cloud-based parallel
review
settings.local.json.example
- New env vars: ENABLE_PROMPT_CACHING_1H, CLAUDE_CODE_NO_FLICKER,
CLAUDE_CODE_HIDE_CWD, CLAUDE_CODE_FORK_SUBAGENT, DISABLE_UPDATES,
ANTHROPIC_BEDROCK_SERVICE_TIER
- Default model bumped to claude-opus-4-7
- autoMode block (commented) showing $defaults extension pattern
Docs
- docs/permission-modes.md adds the auto mode and PermissionDenied hook
- docs/plugins.md covers bin/, themes/, monitors, plugin tag/prune
- docs/integrations.md mentions /ultrareview and Routines
- CLAUDE.md and README.md updated to reflect new components
Housekeeping
- .gitignore now excludes .claude/scheduled_tasks.lock,
.claude/checkpoints/, and .claude/*.lock
Refs #8
AI-Tool: claude-code
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audits the Claude Code changelog from v2.1.83 to v2.1.122 and adopts every feature relevant to a starter template. New hook types, new plugin components (
bin/,themes/), new settings, new MCP semantics, an effort-aware skill demo, an agent self-containment demo, and a CI alternative path via/ultrareview. All additive — no breaking changes for existing forks.Closes #8
Changes
Hooks
scripts/hooks/pre-compact.sh(new) —PreCompacthook (v2.1.105+) saves a checkpoint to.claude/checkpoints/before compaction.scripts/hooks/redact-secrets.sh(new) —PostToolUsehook demonstrating v2.1.122hookSpecificOutput.updatedToolOutput. Scrubs API keys, JWTs, AWS access keys, GitHub PATs, and Slack tokens.scripts/hooks/session-cost.sh— now usesPostToolUse.duration_ms(v2.1.121) for a top-tools-by-time breakdown..claude/settings.json— wires the new hooks; adds conditionaliffield onblock-dangerous-bash(v2.1.85).MCP
.mcp.json—alwaysLoad: trueonfilesystemandgit(v2.1.122).Plugin spec
.claude-plugin/plugin.jsonv0.3.0 — registersthemesandbincomponents..claude/themes/anthropic-clay.json(new) — demo theme.bin/claude-template-info(new) — demo executable that goes on the Bash tool's$PATHwhen the plugin is installed (v2.1.91+).Skills
.claude/skills/effort-aware/SKILL.md(new) — demonstrates${CLAUDE_EFFORT}interpolation (v2.1.120+).Subagents
.claude/agents/dependency-auditor.md— frontmatter now declaresmcpServers:andhooks:(v2.1.116/117) for self-contained agent invocations.Settings
statusLine.refreshInterval: 5(v2.1.97)sandbox.network.deniedDomainsfor cloud-metadata IPs (v2.1.113)prUrlTemplatefor the footer PR badge (v2.1.119)CI / scripts
scripts/ci-review.sh --ultrareview <target>— delegates toclaude ultrareview(v2.1.120) for cloud-based parallel review.settings.local.json.example
ENABLE_PROMPT_CACHING_1H,CLAUDE_CODE_NO_FLICKER,CLAUDE_CODE_HIDE_CWD,CLAUDE_CODE_FORK_SUBAGENT,DISABLE_UPDATES,ANTHROPIC_BEDROCK_SERVICE_TIER.claude-opus-4-7.autoModeblock showing the$defaultsextension pattern.Docs
docs/permission-modes.md— addsautomode (v2.1.111+) and thePermissionDeniedhook (v2.1.89+).docs/hooks-cookbook.md— coversPreCompact,updatedToolOutput, conditionalif, andmcp_toolhook type.docs/plugins.md—bin/,themes/,monitors,claude plugin tag/prune.docs/integrations.md—/ultrareviewand Routines.CLAUDE.mdandREADME.md— updated component counts and feature lists.Housekeeping
.gitignore—.claude/scheduled_tasks.lock,.claude/checkpoints/,.claude/*.lock.Code Walkthrough
redact-secrets.sh— emitupdatedToolOutputHook prints JSON to stdout when (and only when) it has a redaction to apply. Claude Code reads stdout as a hook output object and substitutes
tool_outputwith the redacted version before the model sees it. Fail-open on parse error: leaves output untouched.pre-compact.sh— checkpoint before compactionPermissive by default — always allows compaction to proceed. Customize the block-conditions to fit your team (e.g., block if there's an in-progress refactor with no tests yet).
Testing
jq .validates.mcp.json,.claude/settings.json,.claude-plugin/plugin.json,.claude/themes/anthropic-clay.json.bash -npasses on all 7 hook scripts plusbin/claude-template-infoandscripts/ci-review.sh.redact-secrets.shwith a synthetic payload containing aghp_*token — produces the expectedhookSpecificOutput.updatedToolOutputJSON.pre-compact.sh— writes the checkpoint file, exits 0.session-cost.sh— printsSession: 12 turns · 1m22s · $0.42.bin/claude-template-info— produces a one-page component summary.Agent Review Context
.claude/settings.json,scripts/hooks/redact-secrets.sh,scripts/hooks/pre-compact.sh,.claude-plugin/plugin.json,.mcp.jsonChecklist
bash -n🤖 Generated with Claude Code