Releases: kimon1230/claude_extensions
Release list
v0.9
Runtime hooks ported to cross-platform Python (statusline, format-python, run-tests): drops the jq dependency, adds unit-test coverage the shell versions lacked, and runs under any shell including Git Bash on Windows and WSL2. New hooks/lib/platformutil.py resolves .venv/bin vs .venv\Scripts*.exe; fileutil.py guards os.chmod behind os.name != nt.
Windows setup documented (README): CLI via WSL2 + install.sh (automated), and the desktop app's Code tab natively on Windows via a manual copy + settings.json merge. No native-Windows installer; install.sh / uninstall.sh remain POSIX/bash.
v0.8 - no more pinning of models
After killing Fable 5, we're just going to use whatever the latest model is and no more pinning. See CHANGELOG [0.8].
v0.7 — Review-skill model ladder: fable/opus
Raised the review-skill model ladder one tier for Fable 5: /code-review, /security-audit, and /critical-review now spawn high-stakes passes with fable and breadth passes with opus (previously opus/sonnet). Breadth slots dropped sonnet after a 2026-06-11 comparison showed its false-positive rate cost more verification time than it saved. /implement-batch unchanged. See CHANGELOG [0.7].
v0.6 — Harness Modernization
Harness modernization for current Claude Code (CLI 2.1.x). All 6 batches implemented and validated. Plan: ~/.claude/plans/claude_extensions/harness-modernization-20260527.md.
Existing installs: re-run install.sh to pick up the hook-wiring change (re-merges settings.json — moves auto-capture to SessionEnd, drops the removed ref-scorer hook — and cleans up symlinks from removed components).
Added
session-init.pyre-injects persisted context on session start/resume and after native compaction (source: "compact") — emits a recency-ordered summary of recentsession-progress.mdentries viaadditionalContext(stdout JSON, 4 KB cap, source-gated; diagnostics stay on stderr). Closes the write-only loop so persisted status returns to the model automatically instead of only being written to disk. NoUserPromptSubmitfallback needed (Batch 1 validated thatSessionStartre-fires on compaction).
Removed
- Context-compression subsystem — deleted
hooks/lib/compressor.py(4-tier Active→Compressed→Archived→Dropped rotation), the/compressskill, theref-scorer.pyPostToolUse hook +ref_scorer_mod.py, andhooks/lib/ref_tracker.py. An audit found the compressor had never fired in 29 sessions (nolast_compressionkey, noarchive.md, no## Compressed Contextsection) and its tiers were write-only; native context compaction now summarizes the live conversation. Removed theref-scorerentry fromsettings.json.referenceand ~125 associated tests. session-init.pyno longer computes active/stale counts or triggers compression — it incrementssession_countand logs a plain entry count.auto-capture.pyno longer writesscorestoref-cache.json(dead data with no remaining consumer).
Changed
README.mdstatusline example model labelSonnet 4.6 → Opus 4.7; README/DEVELOPER updated to drop the removed subsystem.auto-capturemoved from theStophook toSessionEnd— runs once at session teardown instead of after every response. Refactored into a reusablecapture(workdir)that resolves the project dir fromCLAUDE_PROJECT_DIR(fallback cwd) andchdirs before running git, fixing a non-project-CWD silent no-op; captures on all SessionEnd reasons (reason is logging-only, parsed best-effort so malformed/empty stdin never suppresses a capture).- Per-subagent model selection in the multi-agent skills —
/code-review,/security-audit,/critical-review, and/implement-batchnow spawn each subagent with an explicitmodel:opusfor the higher-stakes passes (architecture, correctness, injection/auth/crypto, implementers) andsonnetfor the rest. Review/audit agents never default tohaiku.CLAUDE_CODE_SUBAGENT_MODELoverrides these. Documented the mapping in DEVELOPER.md. - Shared review output-contract fragments — extracted the boilerplate that is identical verbatim between the
/code-reviewand/security-auditsubagent prompts (scope/context opening, findings-list-format line, closing instruction) intorules/review-output-contract.md; each skill inlines the fragments at<<shared:…>>markers. Audit found the field list, severity scale, rationalizations, and red flags are intentionally domain-specific (not duplicated), so they stay per-skill;/critical-reviewreviews plans and does not consume the fragments. Addedtests/test_review_contract.py.
Fixed
tests/test_fileutil.py— moved a module-level assignment below the deferred import to clear a long-standing ruff E402.
v0.5 — Skill improvements, sensitive-file-guard, installer auto-merge
Added
sensitive-file-guard.py(PreToolUse hook) — blocks reads of.env, SSH keys, credentials, AWS configs, and package tokens. Intercepts bothReadtool andBashcommands viashlex.split()tokenization. Case-insensitive basename matching with explicit allowlists (.env.example,.envrc).*.keyrequires keyword guard to avoid false positives. 83 tests.- Output Contracts for
/code-review,/critical-review,/security-audit— each skill now defines the required structure of its final synthesized report (findings table, aggregate counts, verdict, remediation offer). - Rationalizations to Reject — 9 security dismissals injected into
/security-auditsubagent prompts ("It's behind a VPN", "Only admins can reach this", etc.) and 6 code quality dismissals into/code-review. - Red Flags — thought-pattern watchlists injected into
/security-audit(5 items) and/code-review(5 items) targeting the agent's own corner-cutting impulses. - CTF-sourced detection patterns for
/security-audit— PHP attack surface (gated behindphp_detectedflag), encoding/parsing mismatches (Unicode normalization, Shift-JIS, U+00A0), Golen()byte/rune confusion, prototype pollution, JWE token handling, auth race conditions, deserialization depth (XMLDecoder, Castor XML, pickle, PHP serialization), SSRF-to-Docker/gopher, CSP bypass taxonomy, DOM clobbering, behavioral framework XSS narrowing. - Implementer status protocol for
/implement-batch— subagents reportSTATUS: DONE,DONE_WITH_CONCERNS,NEEDS_CONTEXT, orBLOCKED. Main session handles each status with defined escalation paths. - Contradiction detection for
/implement-batch— scans subagent output for phrases like "requires manual", "should work", "TODO" alongside success claims. Catches the "claims done but admits failure" pattern. - Cascading-fix escalation for
/implement-batch— 3-strike rule. If fixes keep breaking previously-passing modules, stop and flag as architectural issue. - Complexity gate for
/implement-batch— flags tasks meeting 2-of-3 conditions (>5 files, >3 acceptance criteria, cross-module dependencies) before spawning subagents. Soft gate — user can override. - Decision logging for
/critical-review— appends accept/reject/defer decisions todecision-log.mdwith rationale. Triggers on all user response paths. - Task Delivery States in
CLAUDE.md— mental model for task progression (intake → planning → executing → validating → reviewing → done / blocked). - Subagent context isolation rule in
CLAUDE.md— always paste full task text into subagent prompts, never make subagents read plan files. - Blast radius risk labeling for
/code-review— findings includeRisk: HIGH|MED|LOWbased on structural heuristics. Secondary sort by risk within same severity. - Mock quality detection for
/code-review— Agent 5 now flags mock-heavy tests (3:1 ratio), missing real module imports, behavioral-only assertions, and over-mocked integration tests. - BEFORE/AFTER remediation verification for
/code-reviewand/security-audit— records failing state before fix, verifies passing state after. Uses function/symbol anchors for non-testable findings.
Changed
- Skill descriptions — all 6 skills rewritten for CSO compliance (trigger conditions only, no workflow summaries). Prevents Claude from shortcutting skill bodies.
- Skill frontmatter — all 6 skills now include
risk: safe|criticalfield and optionalrisk-note. - Rules frontmatter —
python.md,javascript.md,shell.mdnow includepathsfrontmatter for file-type-specific loading. /implement-batchstep 4 — split into 4 (triage: status + contradiction), 4b (consistency review), 4c (validation)./implement-batchstep 7 — phase gate: recommends new session for batch ≥ 3./critical-review— renumbered to 8 steps (decision logging is step 5; non-approval path explicitly logs rejections).CLAUDE.mdCode Quality — overloaded paragraph broken into sub-bullets.CLAUDE.mdPlanning — batch numbering convention: always start at 1, never 0.install.sh— now fully supports upgrades in addition to fresh installs:install_settings()function:jq-based merge of hooks and statusLine fromsettings.json.referenceinto~/.claude/settings.json. Backs up before modifying.- Already-installed symlinks detected and skipped without prompting (compares raw and resolved paths).
- Stale symlink cleanup: broken symlinks pointing into the repo (from removed/renamed components) are detected and offered for removal.
- Settings.json upgrade: repo-managed hook entries are stripped and re-added from the current reference on every run, handling renamed hooks, changed command formats, and removed hooks. User hooks are preserved.
- Duplicate hook entries from older installer versions are deduplicated.
- Repo-managed statusLine is updated to match the current reference; custom statusLine configurations are preserved.
- CLAUDE.md, settings.json, and component prompts all skip when already current — a fully up-to-date install produces no prompts.
- Extracted
merge_settings_json()andinstall_settings_needed()helpers to eliminate logic duplication.
uninstall.sh— newuninstall_settings()function: removes hook entries pointing to/.claude/hooks/and statusLine from~/.claude/settings.json. Replaces old manual reminder.settings.json.reference— addedPreToolUsesection for sensitive-file-guard (Read + Bash matchers)./security-auditsynthesis — now reportsphp_detectedstatus alongsideweb_appandiac_detected.
v0.4.1: /code-review + /security-audit enhancements
[0.4] - 2026-03-13
Added
/code-reviewskill — parallel subagent code quality review from a senior distinguished engineer's perspective. 5 agents with explicit non-overlapping boundaries: Architecture & Design, Code Quality & Readability, Correctness & Robustness, Performance & Efficiency, Maintainability & Testing. Language-aware with idiomatic checks for Python, JS/TS, Go, Rust, and Java. Reads project rule files (rules/<language>.md) for project-specific conventions.
Changed
/security-audit— 5 improvements from external security engineer analysis:- Threat context (new Section 1 subsection): main session examines up to 10 files to identify trust boundaries, data sensitivity, and high-risk components before spawning agents. Relevant context subsets composed into each agent's prompt.
- Agent 7 — CI/CD Pipeline Security (new always-on agent): checks for SAST (Semgrep, CodeQL), SCA (Trivy, Snyk, Dependabot), and DAST tooling in CI configs. Delineated from Agent 5 (secrets vs. tooling presence).
- IaC security review: detects Terraform, CloudFormation, Pulumi, Kubernetes, and Helm files. Adds conditional checks to Agent 4 (IAM policies, public exposure, encryption gaps, hardcoded values, K8s misconfigs) with increased finding limit (max 15).
- Compliance context (optional):
compliance: pci-dss|hipaa|soc2|gdprparameter adds framework-specific checks distributed as conditional blocks across relevant agents. Includes disclaimer in synthesis. - Quantified impact: verbatim template now instructs agents to quantify blast radius from code context.
/security-auditscope — removed artificial 30-file cap for entire-project reviews; agents now review all source files with intelligent distribution by domain relevance/code-reviewscope — same: no artificial file cap, full project coverage with prioritization by architectural significance
v0.3
Full Changelog: v0.2...v0.3
v0.2 — Context Persistence & Security Hardening
Changelog
All notable changes to this project will be documented in this file.
[0.2] - 2026-03-09
Added
- Context persistence system — hooks and libraries for maintaining awareness across sessions
hooks/lib/entries.py— typed entry parsing/serialization (decision/observation with IDs)hooks/lib/fileutil.py— atomic writes and safe JSON read/write with.bakfallbackhooks/lib/ref_tracker.py— 3-tier reference scoring (path match, directory overlap, keyword overlap)hooks/lib/paths.py— project name resolution from git remote/root/cwdhooks/lib/scribe.py— git diff classification and observation generationhooks/lib/compressor.py— 4-tier context compression (Active → Compressed → Archived → Dropped)
- New hooks
ref-scorer.py(PostToolUse) — scores status entries against tool contextsession-init.py(SessionStart) — increments session count, checks compression triggersauto-capture.py(Stop) — generates observation entries from uncommitted git changes
- New skills
/compress— force context compression on demand, bypassing automatic thresholds
- Test suite — 285 tests covering all libraries and hooks
.gitignorewith comprehensive coverage (secrets, AI tools, credentials, OS artifacts, build dirs)DEVELOPER.md— development setup and architecture guide
Changed
skills/save/SKILL.md— typed entry format with decision/observation classification and unique IDsinstall.sh— extended hook discovery tohooks/*.{sh,py}settings.json.reference— added hook wiring for ref-scorer, session-init, and auto-captureREADME.md— full documentation of context persistence system, updating section
Security
hooks/format-python.sh— removed PATH fallback forruff/black; venv-only resolution (CWE-427)hooks/run-tests.sh— removed PATH fallback forpytest; venv-only resolution (CWE-427)hooks/lib/paths.py— sanitized project name to prevent path traversal (CWE-22); status dirs created with mode 0700 (CWE-276)hooks/lib/fileutil.py— temp files set to mode 0600 before replace (CWE-276); error messages use basename only (CWE-209)hooks/ref_scorer_mod.py— 1MB stdin read limit (CWE-400)- Hook entry points now log exception types to stderr instead of silently swallowing
[0.1] - 2026-03-07
Added
- Initial release with existing extensions
CLAUDE.md— global instructions for Claude Codehooks/format-python.sh— PostToolUse hook for auto-formatting Python with ruff + blackhooks/run-tests.sh— Stop hook for running pytest after Claude respondsstatusline-command.sh— PS1-style status line with context window bar- Skills:
/save,/critical-review,/implement-batch,/security-audit - Rules:
python.md,javascript.md,shell.md settings.json.reference— reference configuration for~/.claude/settings.jsoninstall.sh/uninstall.sh— interactive symlink-based installer and uninstaller