Repository navigation
feat: add config-health — runtime config integrity monitoring - #2496
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Pre-merge checks:
|
[Medium impact] The PR adds an optional monitor and hook registration to Claude Code installs. Changes are required before merging because both reproduced startup failures can prevent the promised configuration checks from running. Findings
Fix with agent prompt### Issue 1
manifests/install-assets/config-health-hooks.json:10
If a host exposes Python 3 only as `python`, this new SessionStart command cannot launch the monitor because it hardcodes `python3`. Installation can succeed, but ordinary sessions get a startup error instead of configuration checks. Executing the materialized command with only a working `python` on PATH failed before the monitor ran; invoking the same installed script through `python` successfully reported the seeded configuration problem. Resolve an available Python 3 interpreter or provide a version-checked fallback.
### Issue 2
manifests/install-assets/config-health-hooks.json:10
If the install directory contains shell expansion characters, this command can point Python at the wrong script. `materializeManagedHooks` inserts the root unchanged inside double quotes, which still allow expansion. In an executed fixture with a literal `install-$client` directory and `client` unset, the generated command tried to open `install-/scripts/config-health.py` and exited 2 instead of running the existing monitor. Direct invocation of the same installed script succeeded. Encode the root or escape it for the shell before inserting it.
### Issue 3
scripts/config-health.py:213-214
For an existing relative project hook, this comparison checks its file path against the project directory and counts it as satisfied by the user home or plugin root. The resulting `--check` report overstates fallback coverage, so users cannot rely on that count to tell whether a project hook was found in the project.
```suggestion
if status == AUDIT_OK and relative and stats is not None \
and not is_within(paths[0], [project_norm]):
```
### Issue 4
scripts/config-health.py:320-321
The new monitor is 1,014 lines and its test file is 1,041 lines; `scan_command` also exceeds 50 lines. This violates the repository’s limits of 800 lines per file and fewer than 50 lines per function. Split these into focused files and functions. This repository requirement must be satisfied before merging.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
|
daltino
left a comment
There was a problem hiding this comment.
This PR adds a new skill, config-health, for runtime configuration integrity monitoring. The SKILL.md file is clear, well-structured, and adheres to the contribution guidelines, with a descriptive name, a concise summary of its purpose, and metadata specifying its origin. The addition complements existing functionality (delivery-gate) effectively, providing a proactive layer for identifying issues during the session. No issues spotted with the implementation.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/config-health/SKILL.md`:
- Around line 8-22: Add canonical ## When to Activate, ## How It Works, and ##
Examples sections to the config-health skill documentation. Under When to
Activate, specify concrete conditions such as session start, before high-risk
tool calls, and guard-script maintenance checks; under How It Works, describe
the monitoring workflow and responses; under Examples, provide representative
configuration-health scenarios.
- Around line 24-38: Update the Install section in SKILL.md so the hook
configuration is explicitly merged into existing Claude settings rather than
replacing the full hooks object. Add instructions to provision or copy
config-health.py into ~/.claude/scripts/config-health.py and verify that the
file exists before enabling the hooks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: eb49f71c-1f5a-4ce1-8048-609fa90d2e45
📒 Files selected for processing (1)
skills/config-health/SKILL.md
📜 Review details
⏰ Context from checks skipped due to timeout. (28)
- GitHub Check: CodeRabbit / Review
- GitHub Check: Test (macos-latest, Node 20.x, npm)
- GitHub Check: Test (macos-latest, Node 22.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 20.x, bun)
- GitHub Check: Test (macos-latest, Node 18.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 20.x, yarn)
- GitHub Check: Test (macos-latest, Node 20.x, bun)
- GitHub Check: Test (ubuntu-latest, Node 22.x, pnpm)
- GitHub Check: Test (windows-latest, Node 18.x, yarn)
- GitHub Check: Test (macos-latest, Node 18.x, npm)
- GitHub Check: Test (windows-latest, Node 20.x, npm)
- GitHub Check: Test (windows-latest, Node 18.x, pnpm)
- GitHub Check: Test (windows-latest, Node 20.x, yarn)
- GitHub Check: Test (windows-latest, Node 22.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 22.x, npm)
- GitHub Check: Test (windows-latest, Node 18.x, npm)
- GitHub Check: Test (windows-latest, Node 20.x, pnpm)
- GitHub Check: Test (windows-latest, Node 22.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 22.x, bun)
- GitHub Check: Test (ubuntu-latest, Node 22.x, yarn)
- GitHub Check: Test (windows-latest, Node 22.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, bun)
- GitHub Check: Test (ubuntu-latest, Node 18.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 20.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 20.x, pnpm)
- GitHub Check: Coverage
🧰 Additional context used
📓 Path-based instructions (4)
skills/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Skills should be formatted as Markdown with clear sections for When to Use, How It Works, and Examples.
Files:
skills/config-health/SKILL.md
{agents,skills,commands}/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Use lowercase filenames with hyphens (e.g.,
python-reviewer.md,tdd-workflow.md) for agents, skills, and commands.
Files:
skills/config-health/SKILL.md
skills/**
📄 CodeRabbit inference engine (AGENTS.md)
New workflow contributions should land in
skills/first;skills/is the canonical workflow surface.
Files:
skills/config-health/SKILL.md
{skills,commands,agents,rules}/**
⚙️ CodeRabbit configuration file
{skills,commands,agents,rules}/**: Focus on prompt-injection resilience, tool-permission scope, destructive action guards, and secret exfiltration risks.
Files:
skills/config-health/SKILL.md
🧠 Learnings (2)
📚 Learning: 2026-03-15T19:02:43.245Z
Learnt from: imrobinsingh
Repo: affaan-m/everything-claude-code PR: 503
File: skills/data-scraper-agent/SKILL.md:1-748
Timestamp: 2026-03-15T19:02:43.245Z
Learning: In this repository, skill folders should use a lowercase-hyphen name (e.g., data-scraper-agent, claude-api) and the skill description file inside each folder should be named SKILL.md (uppercase). Do not flag SKILL.md as a naming violation; treat SKILL.md as the canonical file name inside each skill directory.
Applied to files:
skills/config-health/SKILL.md
📚 Learning: 2026-04-15T15:52:59.963Z
Learnt from: manja316
Repo: affaan-m/everything-claude-code PR: 1360
File: skills/security-bounty-hunter/SKILL.md:11-18
Timestamp: 2026-04-15T15:52:59.963Z
Learning: In this repository’s skills documentation (skills/**/SKILL.md), use the canonical auto-activation skill section header `## When to Activate`—do not use `## When to Use`. CONTRIBUTING.md and docs/SKILL-DEVELOPMENT-GUIDE.md confirm the required header, and existing skills follow this convention. This header is important for the auto-activation mechanism to detect the correct section.
Applied to files:
skills/config-health/SKILL.md
🔇 Additional comments (2)
skills/config-health/SKILL.md (2)
1-10: LGTM!
40-60: LGTM!
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/config-health/SKILL.md`:
- Line 26: Clarify the boundary statement so `config-health` only warns on
config drift, while `delivery-gate` is explicitly identified as the component
that blocks missing `growth-log` state.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2ff94822-affa-4327-ba92-cddb7123b940
📒 Files selected for processing (1)
skills/config-health/SKILL.md
📜 Review details
⏰ Context from checks skipped due to timeout. (28)
- GitHub Check: CodeRabbit / Review
- GitHub Check: Test (windows-latest, Node 20.x, npm)
- GitHub Check: Test (windows-latest, Node 22.x, yarn)
- GitHub Check: Test (macos-latest, Node 20.x, bun)
- GitHub Check: Test (ubuntu-latest, Node 20.x, bun)
- GitHub Check: Test (macos-latest, Node 22.x, npm)
- GitHub Check: Test (windows-latest, Node 22.x, npm)
- GitHub Check: Test (windows-latest, Node 22.x, pnpm)
- GitHub Check: Test (windows-latest, Node 18.x, yarn)
- GitHub Check: Test (macos-latest, Node 22.x, bun)
- GitHub Check: Test (windows-latest, Node 20.x, pnpm)
- GitHub Check: Test (windows-latest, Node 20.x, yarn)
- GitHub Check: Test (macos-latest, Node 18.x, yarn)
- GitHub Check: Test (windows-latest, Node 18.x, pnpm)
- GitHub Check: Test (macos-latest, Node 18.x, pnpm)
- GitHub Check: Test (windows-latest, Node 18.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 22.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 22.x, bun)
- GitHub Check: Test (ubuntu-latest, Node 22.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 20.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 18.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 20.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, bun)
- GitHub Check: Test (ubuntu-latest, Node 22.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 18.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 20.x, npm)
- GitHub Check: Coverage
🧰 Additional context used
📓 Path-based instructions (4)
skills/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Skills should be formatted as Markdown with clear sections for When to Use, How It Works, and Examples.
Files:
skills/config-health/SKILL.md
{agents,skills,commands}/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Use lowercase filenames with hyphens (e.g.,
python-reviewer.md,tdd-workflow.md) for agents, skills, and commands.
Files:
skills/config-health/SKILL.md
skills/**
📄 CodeRabbit inference engine (AGENTS.md)
New workflow contributions should land in
skills/first;skills/is the canonical workflow surface.
Files:
skills/config-health/SKILL.md
{skills,commands,agents,rules}/**
⚙️ CodeRabbit configuration file
{skills,commands,agents,rules}/**: Focus on prompt-injection resilience, tool-permission scope, destructive action guards, and secret exfiltration risks.
Files:
skills/config-health/SKILL.md
🧠 Learnings (2)
📚 Learning: 2026-03-15T19:02:43.245Z
Learnt from: imrobinsingh
Repo: affaan-m/everything-claude-code PR: 503
File: skills/data-scraper-agent/SKILL.md:1-748
Timestamp: 2026-03-15T19:02:43.245Z
Learning: In this repository, skill folders should use a lowercase-hyphen name (e.g., data-scraper-agent, claude-api) and the skill description file inside each folder should be named SKILL.md (uppercase). Do not flag SKILL.md as a naming violation; treat SKILL.md as the canonical file name inside each skill directory.
Applied to files:
skills/config-health/SKILL.md
📚 Learning: 2026-04-15T15:52:59.963Z
Learnt from: manja316
Repo: affaan-m/everything-claude-code PR: 1360
File: skills/security-bounty-hunter/SKILL.md:11-18
Timestamp: 2026-04-15T15:52:59.963Z
Learning: In this repository’s skills documentation (skills/**/SKILL.md), use the canonical auto-activation skill section header `## When to Activate`—do not use `## When to Use`. CONTRIBUTING.md and docs/SKILL-DEVELOPMENT-GUIDE.md confirm the required header, and existing skills follow this convention. This header is important for the auto-activation mechanism to detect the correct section.
Applied to files:
skills/config-health/SKILL.md
🪛 SkillSpector (2.3.7)
skills/config-health/SKILL.md
[warning] 18: [RA2] Session Persistence: Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Remediation: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
(Rogue Agent (RA2))
🔇 Additional comments (5)
skills/config-health/SKILL.md (5)
45-54: The install snippet still needs additive merging and script provisioning.This repeats the prior finding: pasting the standalone
hooksobject can overwrite existing hooks such asdelivery-gate, and~/.claude/scripts/config-health.pyis referenced without instructions to install or verify it.
3-18: LGTM!
20-25: LGTM!
28-43: LGTM!
56-67: LGTM!
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
skills/config-health/SKILL.md (1)
51-52: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winLower these hook timeouts
timeoutis in seconds here, so5000and3000make these hooks wait for hours instead of a few seconds. Use5and3if that’s the intended limit.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@skills/config-health/SKILL.md` around lines 51 - 52, Update the timeout values in the SessionStart and PreToolUse hook configurations to use seconds as intended: change 5000 to 5 and 3000 to 3, while preserving the existing commands and hook structure.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@skills/config-health/SKILL.md`:
- Around line 51-52: Update the timeout values in the SessionStart and
PreToolUse hook configurations to use seconds as intended: change 5000 to 5 and
3000 to 3, while preserving the existing commands and hook structure.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 3cbd8010-fa65-4dea-bdd5-d2c6fbeb8d14
📒 Files selected for processing (1)
skills/config-health/SKILL.md
📜 Review details
⏰ Context from checks skipped due to timeout. (28)
- GitHub Check: CodeRabbit
- GitHub Check: Test (ubuntu-latest, Node 22.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 20.x, npm)
- GitHub Check: Test (windows-latest, Node 18.x, npm)
- GitHub Check: Test (windows-latest, Node 20.x, npm)
- GitHub Check: Test (macos-latest, Node 20.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 20.x, pnpm)
- GitHub Check: Test (windows-latest, Node 20.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 18.x, npm)
- GitHub Check: Test (windows-latest, Node 18.x, yarn)
- GitHub Check: Test (windows-latest, Node 20.x, pnpm)
- GitHub Check: Test (macos-latest, Node 18.x, yarn)
- GitHub Check: Test (windows-latest, Node 22.x, pnpm)
- GitHub Check: Test (windows-latest, Node 22.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 22.x, yarn)
- GitHub Check: Test (windows-latest, Node 22.x, yarn)
- GitHub Check: Test (macos-latest, Node 18.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, bun)
- GitHub Check: Test (macos-latest, Node 18.x, npm)
- GitHub Check: Test (macos-latest, Node 20.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 20.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 22.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, yarn)
- GitHub Check: Test (windows-latest, Node 18.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 20.x, bun)
- GitHub Check: Test (ubuntu-latest, Node 22.x, bun)
- GitHub Check: Coverage
🧰 Additional context used
📓 Path-based instructions (4)
skills/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Skills should be formatted as Markdown with clear sections for When to Use, How It Works, and Examples.
Files:
skills/config-health/SKILL.md
{agents,skills,commands}/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Use lowercase filenames with hyphens (e.g.,
python-reviewer.md,tdd-workflow.md) for agents, skills, and commands.
Files:
skills/config-health/SKILL.md
skills/**
📄 CodeRabbit inference engine (AGENTS.md)
New workflow contributions should land in
skills/first;skills/is the canonical workflow surface.
Files:
skills/config-health/SKILL.md
{skills,commands,agents,rules}/**
⚙️ CodeRabbit configuration file
{skills,commands,agents,rules}/**: Focus on prompt-injection resilience, tool-permission scope, destructive action guards, and secret exfiltration risks.
Files:
skills/config-health/SKILL.md
🧠 Learnings (2)
📚 Learning: 2026-03-15T19:02:43.245Z
Learnt from: imrobinsingh
Repo: affaan-m/everything-claude-code PR: 503
File: skills/data-scraper-agent/SKILL.md:1-748
Timestamp: 2026-03-15T19:02:43.245Z
Learning: In this repository, skill folders should use a lowercase-hyphen name (e.g., data-scraper-agent, claude-api) and the skill description file inside each folder should be named SKILL.md (uppercase). Do not flag SKILL.md as a naming violation; treat SKILL.md as the canonical file name inside each skill directory.
Applied to files:
skills/config-health/SKILL.md
📚 Learning: 2026-04-15T15:52:59.963Z
Learnt from: manja316
Repo: affaan-m/everything-claude-code PR: 1360
File: skills/security-bounty-hunter/SKILL.md:11-18
Timestamp: 2026-04-15T15:52:59.963Z
Learning: In this repository’s skills documentation (skills/**/SKILL.md), use the canonical auto-activation skill section header `## When to Activate`—do not use `## When to Use`. CONTRIBUTING.md and docs/SKILL-DEVELOPMENT-GUIDE.md confirm the required header, and existing skills follow this convention. This header is important for the auto-activation mechanism to detect the correct section.
Applied to files:
skills/config-health/SKILL.md
🪛 SkillSpector (2.3.7)
skills/config-health/SKILL.md
[warning] 18: [RA2] Session Persistence: Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Remediation: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
(Rogue Agent (RA2))
[warning] 18: [RA2] Session Persistence: Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Remediation: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
(Rogue Agent (RA2))
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
1 similar comment
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Line 3: Update the project-structure entry in AGENTS.md to report 282 skills,
matching the synchronized count in the document and removing the contradictory
281 value.
In `@manifests/install-modules.json`:
- Line 342: Update the manifest entry for skills/config-health so it is
installed only for Claude-compatible targets, rather than the shared
workflow-quality target list; alternatively, make the skill content
harness-neutral before retaining it there. Preserve the existing target
configuration for other workflow-quality skills.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 8c230ba9-8b24-4873-b816-03679c948dff
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
AGENTS.mdREADME.mdmanifests/install-modules.json
📜 Review details
⏰ Context from checks skipped due to timeout. (27)
- GitHub Check: Test (ubuntu-latest, Node 20.x, yarn)
- GitHub Check: Test (windows-latest, Node 18.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, npm)
- GitHub Check: Test (macos-latest, Node 18.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, yarn)
- GitHub Check: Test (macos-latest, Node 18.x, bun)
- GitHub Check: Test (ubuntu-latest, Node 20.x, bun)
- GitHub Check: Test (windows-latest, Node 22.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 22.x, yarn)
- GitHub Check: Test (macos-latest, Node 20.x, bun)
- GitHub Check: Test (windows-latest, Node 20.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 22.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 20.x, npm)
- GitHub Check: Test (ubuntu-latest, Node 22.x, bun)
- GitHub Check: Test (macos-latest, Node 22.x, yarn)
- GitHub Check: Test (ubuntu-latest, Node 22.x, pnpm)
- GitHub Check: Test (windows-latest, Node 20.x, npm)
- GitHub Check: Test (windows-latest, Node 18.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 20.x, pnpm)
- GitHub Check: Test (windows-latest, Node 22.x, yarn)
- GitHub Check: Test (macos-latest, Node 20.x, yarn)
- GitHub Check: Test (windows-latest, Node 18.x, yarn)
- GitHub Check: Test (windows-latest, Node 22.x, pnpm)
- GitHub Check: Test (ubuntu-latest, Node 18.x, bun)
- GitHub Check: Test (windows-latest, Node 20.x, pnpm)
- GitHub Check: Coverage
🧰 Additional context used
📓 Path-based instructions (4)
**/*
📄 CodeRabbit inference engine (AGENTS.md)
**/*: Delegate complex features, architectural decisions, security-sensitive work, reviews, and other domain-specific tasks to the appropriate specialized agent; run independent agents in parallel where appropriate.
Plan complex features and refactors before implementation, including dependencies, risks, and phases.
Use test-driven development: write a failing test first, implement the minimum passing solution, then refactor and verify coverage.
Maintain at least 80% test coverage and provide unit, integration, and end-to-end tests for applicable functionality.
Never compromise security: validate external input, prevent injection and XSS, enable CSRF protection, verify authentication and authorization, apply endpoint rate limiting, and avoid leaking sensitive error details.
Never hardcode secrets; use environment variables or a secret manager, validate required secrets at startup, and rotate exposed secrets immediately.
If a security issue is found, stop, invoke security review, fix critical issues, rotate exposed secrets, and search for similar vulnerabilities.
Always preserve immutability: create new objects and return updated copies instead of mutating existing objects.
Organize code by feature or domain with high cohesion and low coupling; prefer many small focused files, typically 200–400 lines and no more than 800 lines.
Handle errors at every level, show user-friendly UI messages, log detailed server-side context, and never silently swallow errors.
Validate all user input at system boundaries with schema-based validation, fail fast with clear messages, and never trust external data.
Keep functions under 50 lines, files focused and under 800 lines, avoid nesting deeper than four levels, avoid hardcoded values, and use readable, well-named identifiers.
Encapsulate data access behind a repository interface such as findAll, findById, create, update, and delete; business logic must depend on the abstraction rather than the storage mechanism.
Capture personal deb...
Files:
AGENTS.mdmanifests/install-modules.jsonREADME.md
**/*.{js,ts,jsx,tsx,py,java,cs,rb,go,php,swift,kt,rs,c,cpp,h,hpp,properties,yml,yaml,json,env,config}
📄 CodeRabbit inference engine (.cursor/rules/common-security.md)
NEVER hardcode secrets in source code - ALWAYS use environment variables or a secret manager
Files:
manifests/install-modules.json
**/*.{js,ts,jsx,tsx,json,env*}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Do not hardcode secrets, API keys, passwords, or tokens
Files:
manifests/install-modules.json
README.md
📄 CodeRabbit inference engine (CLAUDE.md)
When working on README.md files, use the
/readmeskill.
Files:
README.md
🔇 Additional comments (1)
README.md (1)
119-124: LGTM!Also applies to: 609-609, 911-911, 1165-1165, 1176-1176, 1417-1417, 1452-1452, 1545-1545, 1578-1578, 1665-1665, 1707-1707
| # Everything Claude Code (ECC) — Agent Instructions | ||
|
|
||
| This is a **production-ready AI coding plugin** providing 67 specialized agents, 281 skills, 94 commands, and automated hook workflows for software development. | ||
| This is a **production-ready AI coding plugin** providing 67 specialized agents, 282 skills, 94 commands, and automated hook workflows for software development. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Synchronize the remaining skills count in this file.
Line 3 says 282 skills, but the project-structure entry at Line 155 still says 281. Update that entry to prevent contradictory agent instructions.
- skills/ — 281 workflow skills and domain knowledge
+ skills/ — 282 workflow skills and domain knowledge🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` at line 3, Update the project-structure entry in AGENTS.md to
report 282 skills, matching the synchronized count in the document and removing
the contradictory 281 value.
7d0eaea to
008412f
Compare
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
|
Thank you for developing the runtime configuration-health idea—the distinction between early, nonblocking warnings and the end-of-session delivery gate is useful. I’m sorry this waited so long for a maintainer review. We would love another focused pass with these changes:
If you do not have bandwidth for that implementation work, we can carry the deterministic config-health idea into our existing workspace-inventory/config-health task queue. We cannot merge this version while its documented executable is absent, but the underlying idea is worth preserving. |
…ontract tests Deterministic read-only non-blocking monitor (--startup/--pretool/--check): hook wiring audit, rule reference audit, guard staleness. Never echoes hook input or secrets; always exits 0. Wired as a Claude-only install module (SessionStart/PreToolUse), added to full profile, package files, and agent.yaml. Includes 9 hook-contract tests.
008412f to
b3e3238
Compare
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
|
All three focused-pass requirements are now addressed — the PR ships the executable, hook-contract tests, and full distribution wiring. ① Executable + path consistency
Paths in the SKILL.md Install section and Files table match the repo path ( ② Hook-contract tests ③ Wiring + rebase + counts
|
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
|
I carried the branch onto current main, resolved the catalog conflicts, and regenerated the combined 68-agent, 285-skill, 94-command counts in maintainer commit a10cb91. The refreshed tree passes all 9 focused config-health tests, Python compilation, install-manifest validation, strict validation of all 285 skills, catalog validation, and ESLint on the affected JavaScript. Hosted checks are now rerunning on the updated head. Thank you for working through the earlier review feedback and for the substantial test coverage. |
haelyra
left a comment
There was a problem hiding this comment.
Approved after the maintainer refresh at a10cb91. The hook stays non-blocking and keeps raw hook input off stdout, while the skill and manifests make the feature discoverable through the canonical install surface. Focused tests and combined-main catalog and manifest validation pass locally. Thank you for the thoughtful integrity checks and the revisions.
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
ECC Tools / Reference Set ReadinessCommit: Reference set readiness gaps detected (neutral) Reference evidence present for 0/7 areas (0%) across 15 changed file(s). This check is based on files changed in this PR. Repository-level readiness is still reported by
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Hosted Promotion ReadinessCommit: Hosted promotion readiness passed (success) No hosted promotion evidence gaps detected across 15 changed file(s); 0 corpus scenarios had matching evidence. This check compares PR file changes against the evaluator/RAG promotion corpus in No evaluator corpus scenarios matched this PR. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Config AuditCommit: No changed-config issues detected (success) Scanned 1 config file(s) present at this commit across 1 changed config path(s) and found no issues in the supported security rules. Changed config files:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Harness AuditCommit: No harness issues detected (success) Scanned 1 changed config file(s) and found no harness issues. Changed config files:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
|
@chenhz01 — thank you. You read Your diagnosis was correct on both counts.
On your second point I partly disagreed, and the disagreement is with my
The false-positive surface was larger than the two we found. On this repo's own If you still want in: the remaining cost is that Correction to my own wording, since I had it wrong above: I first wrote that |
| """ | ||
| words = _split_shell_words(command) |
There was a problem hiding this comment.
The new monitor is 1,014 lines and its test file is 1,041 lines; scan_command also exceeds 50 lines. This violates the repository’s limits of 800 lines per file and fewer than 50 lines per function. Split these into focused files and functions. This repository requirement must be satisfied before merging.
File Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/config-health.py
Line: 320-321
Comment:
**Split oversized monitor**
The new monitor is 1,014 lines and its test file is 1,041 lines; `scan_command` also exceeds 50 lines. This violates the repository’s limits of 800 lines per file and fewer than 50 lines per function. Split these into focused files and functions. This repository requirement must be satisfied before merging.
**File Used:** `AGENTS.md` ([source](https://github.com/affaan-m/ecc/blob/f36e5d55a7f7e370ccbd1e9b4ca684fce1f627b6/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Thank you for the measured cost breakdown and for exposing what the path audit leaves unjudged. Yes, please keep SessionStart as the documented default and remove PreToolUse from the recommended wiring. Running a configuration audit once per matched Edit or Write does not add tool-specific evidence, and your startup-only recommendation removes that recurring cost without creating a hidden disk cache. The multi-root resolution can remain advisory if --check continues to expose cross-root matches and unresolved commands as you have documented. Please avoid describing zero findings as complete verification of plugin wiring: inline JavaScript bodies and missing provider placeholders remain unjudged. Keep optional PreToolUse invocation clearly opt-in, refresh onto current main with the canonical Claude data-root handling, and exercise the installed module in a disposable home through install, startup, repair and uninstall. In that fixture, a real missing plugin script should warn, an unresolved provider root should be reported as unjudged, and the default install should add no per-tool hook. That closes the default-cost decision while preserving the useful non-blocking monitor. Thank you for asking before changing the behavior. |
|
Hi haelyra — thank you for the careful read on 10 October, and I'm sorry for the silence since then. On 2 October I replied with a partial pass ( The branch now has current main merged in and is pushed, and the PR body is updated. Your August maintenance commits are still in the history. The head is
This also answers chenhz01's 24 September points: Locally: the hook suite is 71/71 ( If the next check finds something, I will turn it around faster than this one. If you would rather move it into the maintainer queue at this point, I understand; the write-up and tests are on the branch either way. Thank you for keeping the contribution and attribution intact through two rounds. |
ECC Tools / Security EvidenceCommit: Security scanner evidence required (action_required) Detected 1 security-sensitive predictive risk signal(s) without scanner evidence. Mode: enforce Findings:
Touched security-sensitive paths:
Expected evidence:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Risk TaxonomyCommit: PR taxonomy review recommended (neutral) Detected 7 PR taxonomy bucket(s): Security Evidence, Harness Drift, Install Manifest Integrity, CI/CD Recommendation, Reference Set Validation, Skill Quality, Agent Config Review. Scanned 17 changed file(s). Roadmap taxonomy buckets: Security EvidenceSecurity-sensitive changes should carry explicit scanner, code-scanning, or focused regression evidence. Signals:
Paths:
Harness DriftHarness-facing changes can drift across Claude Code, Codex, OpenCode, and shared adapter surfaces. Signals:
Paths:
Install Manifest IntegrityInstall manifests, plugin metadata, and shipped skills should stay synchronized with user-facing setup guidance. Signals:
Paths:
CI/CD RecommendationCI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work. Signals:
Paths:
Reference Set ValidationAI, analyzer, skill, agent, command, and harness guidance changes should be compared against a maintained eval, golden trace, benchmark, or reference set. Signals:
Paths:
Skill QualitySkill, agent, command, and rule guidance should carry examples, triggers, validation, or reference evidence. Signals:
Paths:
Agent Config ReviewAgent, command, skill, MCP, and local instruction changes should be reviewed as executable agent configuration. Signals:
Paths:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Reference Set ReadinessCommit: Reference set readiness gaps detected (neutral) Reference evidence present for 0/7 areas (0%) across 17 changed file(s). This check is based on files changed in this PR. Repository-level readiness is still reported by
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Hosted Promotion ReadinessCommit: Hosted promotion readiness passed (success) No hosted promotion evidence gaps detected across 17 changed file(s); 0 corpus scenarios had matching evidence. This check compares PR file changes against the evaluator/RAG promotion corpus in No evaluator corpus scenarios matched this PR. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Config AuditCommit: No changed-config issues detected (success) Scanned 1 config file(s) present at this commit across 1 changed config path(s) and found no issues in the supported security rules. Changed config files:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Harness AuditCommit: No harness issues detected (success) Scanned 1 changed config file(s) and found no harness issues. Changed config files:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
- Add the config-health skill: a read-only monitor for hook wiring, rule references, and rule staleness; every mode exits 0. - Ship its own SessionStart hook asset so installing the module registers the monitor; keep PreToolUse opt-in. - Keep one install-state record per hook source, so hooks-runtime and config-health can share settings.json and uninstall removes both. - Split the monitor into a CLI entry plus constants, paths, and scan modules; split scan_command and the hook contract suite. All files are under 800 lines and no function body reaches 50 lines.
`python3 ~/.claude/scripts/guard.py;` was discarded whole as a separator-bearing word, so a missing hook reported healthy. The separator now ends the word and the path is audited. Covers `;`, `&&` and `|`. Also document the hook-consent flag the installer requires: the bare `npx ecc-universal install --modules config-health` command is refused without --enable-hooks or --no-hooks.
ECC Tools / Security EvidenceCommit: Security scanner evidence required (action_required) Detected 1 security-sensitive predictive risk signal(s) without scanner evidence. Mode: enforce Findings:
Touched security-sensitive paths:
Expected evidence:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Risk TaxonomyCommit: PR taxonomy review recommended (neutral) Detected 8 PR taxonomy bucket(s): Security Evidence, Harness Drift, Install Manifest Integrity, CI/CD Recommendation, Cost/Token Risk, Reference Set Validation, Skill Quality, Agent Config Review. Scanned 32 changed file(s). Roadmap taxonomy buckets: Security EvidenceSecurity-sensitive changes should carry explicit scanner, code-scanning, or focused regression evidence. Signals:
Paths:
Harness DriftHarness-facing changes can drift across Claude Code, Codex, OpenCode, and shared adapter surfaces. Signals:
Paths:
Install Manifest IntegrityInstall manifests, plugin metadata, and shipped skills should stay synchronized with user-facing setup guidance. Signals:
Paths:
CI/CD RecommendationCI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work. Signals:
Paths:
Cost/Token RiskAI routing, usage, and token-budget changes should include budget or usage-limit evidence. Signals:
Paths:
Reference Set ValidationAI, analyzer, skill, agent, command, and harness guidance changes should be compared against a maintained eval, golden trace, benchmark, or reference set. Signals:
Paths:
Skill QualitySkill, agent, command, and rule guidance should carry examples, triggers, validation, or reference evidence. Signals:
Paths:
Agent Config ReviewAgent, command, skill, MCP, and local instruction changes should be reviewed as executable agent configuration. Signals:
Paths:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Reference Set ReadinessCommit: Reference set readiness gaps detected (neutral) Reference evidence present for 0/7 areas (0%) across 32 changed file(s). This check is based on files changed in this PR. Repository-level readiness is still reported by
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Hosted Promotion ReadinessCommit: Hosted promotion readiness passed (success) No hosted promotion evidence gaps detected across 32 changed file(s); 0 corpus scenarios had matching evidence. This check compares PR file changes against the evaluator/RAG promotion corpus in No evaluator corpus scenarios matched this PR. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Config AuditCommit: No changed-config issues detected (success) Scanned 1 config file(s) present at this commit across 1 changed config path(s) and found no issues in the supported security rules. Changed config files:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Harness AuditCommit: No harness issues detected (success) Scanned 1 changed config file(s) and found no harness issues. Changed config files:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
|
Thanks for the 31 October review. All five findings from that round are fixed in Split oversized monitor
31 October findings
The same summary also lists two older 2 October findings, both covered here: a separator attached to a script path ( Verification on
One unchanged caveat: The branch head is now |
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/config-health.py\" --startup", |
There was a problem hiding this comment.
If a host exposes Python 3 only as python, this new SessionStart command cannot launch the monitor because it hardcodes python3. Installation can succeed, but ordinary sessions get a startup error instead of configuration checks. Executing the materialized command with only a working python on PATH failed before the monitor ran; invoking the same installed script through python successfully reported the seeded configuration problem. Resolve an available Python 3 interpreter or provide a version-checked fallback.
Artifacts
Full executed reproduction script — local collector file
- Saved during the original validation and contains the full executed harness; remote upload is not verified.
Hook output with python3 available — local collector file
- Captured during the original validation and records successful hook execution; remote upload is not verified.
Hook output with only python available — local collector file
- Captured during the original validation and records the interpreter-name failure and successful python control; remote upload is not verified.
Executable path-expansion reproduction
- The executed harness materializes the real HEAD hook and compares direct and shell invocation in one disposable installation, isolating path expansion.
Direct invocation control with literal dollar-client path
- The installed monitor was invoked directly with the literal script path and reported the deliberately missing guard, proving the monitor works.
Generated startup command with literal dollar-client path
- The materialized command was executed through /bin/sh and Python attempted the expanded nonexistent path, proving startup monitoring fails.
Complete reproduction run and assertions
- The harness captured both subprocess results and passed its behavioral assertions with exit code 0, confirming the path-expansion defect.
Ran code and verified through TREX
Prompt To Fix With AI
This is a comment left during a code review.
Path: manifests/install-assets/config-health-hooks.json
Line: 10
Comment:
**Startup cannot find Python**
If a host exposes Python 3 only as `python`, this new SessionStart command cannot launch the monitor because it hardcodes `python3`. Installation can succeed, but ordinary sessions get a startup error instead of configuration checks. Executing the materialized command with only a working `python` on PATH failed before the monitor ran; invoking the same installed script through `python` successfully reported the seeded configuration problem. Resolve an available Python 3 interpreter or provide a version-checked fallback.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/config-health.py\" --startup", |
There was a problem hiding this comment.
Install paths change at startup
If the install directory contains shell expansion characters, this command can point Python at the wrong script. materializeManagedHooks inserts the root unchanged inside double quotes, which still allow expansion. In an executed fixture with a literal install-$client directory and client unset, the generated command tried to open install-/scripts/config-health.py and exited 2 instead of running the existing monitor. Direct invocation of the same installed script succeeded. Encode the root or escape it for the shell before inserting it.
Artifacts
Full executed reproduction script — local collector file
- Saved during the original validation and contains the full executed harness; remote upload is not verified.
Hook output with python3 available — local collector file
- Captured during the original validation and records successful hook execution; remote upload is not verified.
Hook output with only python available — local collector file
- Captured during the original validation and records the interpreter-name failure and successful python control; remote upload is not verified.
Executable path-expansion reproduction
- The executed harness materializes the real HEAD hook and compares direct and shell invocation in one disposable installation, isolating path expansion.
Direct invocation control with literal dollar-client path
- The installed monitor was invoked directly with the literal script path and reported the deliberately missing guard, proving the monitor works.
Generated startup command with literal dollar-client path
- The materialized command was executed through /bin/sh and Python attempted the expanded nonexistent path, proving startup monitoring fails.
Complete reproduction run and assertions
- The harness captured both subprocess results and passed its behavioral assertions with exit code 0, confirming the path-expansion defect.
Ran code and verified through TREX
Prompt To Fix With AI
This is a comment left during a code review.
Path: manifests/install-assets/config-health-hooks.json
Line: 10
Comment:
**Install paths change at startup**
If the install directory contains shell expansion characters, this command can point Python at the wrong script. `materializeManagedHooks` inserts the root unchanged inside double quotes, which still allow expansion. In an executed fixture with a literal `install-$client` directory and `client` unset, the generated command tried to open `install-/scripts/config-health.py` and exited 2 instead of running the existing monitor. Direct invocation of the same installed script succeeded. Encode the root or escape it for the shell before inserting it.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Thank you for contributing feat: add config-health — runtime config integrity monitoring. Your complete reviewed head is preserved with attribution in maintainer integration #3945. I am sorry this waited for maintainer review. The delivered main commit now passes CI, CodeQL and a fresh Supply-Chain Watch after the focused coverage-report and dependency recovery in #3947. We appreciate your patience and your help improving ECC. |
What
Adds the
config-healthskill: a deterministic, read-only monitor for Claude Code configuration integrity. It ships the CLI entry atscripts/config-health.pyplus three helper modules (config_health_constants.py,config_health_paths.py,config_health_scan.py), the skill documentation, install-module wiring, its own hook config, and a hook contract test suite.Why
A session-end gate checks whether work is complete after the fact. By then, broken hook wiring and dead rule references have already been in effect for the whole session. This monitor checks the same configuration while the session runs, so a broken reference is reported when it is still cheap to fix.
It does not replace the delivery gate.
config-healthwarns and always exits 0; the delivery gate owns blocking. The boundary is whether the problem can be fixed retroactively: config drift can, a missing growth-log entry cannot.What it checks
settings.json, the projectsettings.json, the project.claude/settings.local.json, and the plugin's ownhooks/hooks.jsonwhen the plugin root is known. A hook declared only insettings.local.jsonor only in the plugin manifest is audited too, instead of being reported clean because nosettings.jsonmentions it. Plugin-root placeholders are resolved through an explicit environment map (CLAUDE_PLUGIN_ROOT, withCONFIG_HEALTH_PLUGIN_ROOTas an override), and substituted paths must stay inside the expected plugin/project roots. An unresolved provider placeholder is skipped and counted as unjudged, not reported as a missing script.CLAUDE.mdthat points at a missing rule file is a finding. Rule paths may be nested (rules/ecc/common/security.md), and the reference scan follows them. Rules that have not fired across the five most recent complex sessions are reported as possibly dead; any positive count inside that window — including in a short session that the complexity filter leaves out of the judgment — keeps the rule alive.Install
manifests/install-assets/config-health-hooks.json, a SessionStart registration merged into the targetsettings.jsonat install time with the install root substituted for${CLAUDE_PLUGIN_ROOT}—~/.claude/scripts/config-health.pyfor a home install,<project>/.claude/scripts/config-health.pyfor a project install. Copying the skill and script without that merge would install a monitor that no ordinary session invokes.--enable-hookswires the SessionStart hook;--no-hooksinstalls the files only and leavessettings.jsonuntouched.hooks-runtime(hooks/hooks.json) andconfig-health. Install state therefore keeps one record per destination and hook source, not one per destination. Keyed by destination alone, the second record replaced the first and uninstall left the first module's managed hooks behind. The apply path, the repair path, and the state schema all use the same key.Behavior
"matcher": "Edit|Write", so it runs only for the tool classes where a guard could matter.--checkis the manual overview. It reports how many hook paths were not audited, so a decision not to judge is distinguishable from a clean result.Distribution
Registered in
agent.yaml,package.json, andmanifests/install-modules.jsonas theconfig-healthmodule (Claude-only targets), included in thefullinstall profile, and shipping its own hook config. Catalog counts are regenerated. The state schema allows oneupdate-claude-settingsrecord per hook-shipping module:hooks-runtime→hooks/hooks.json,config-health→manifests/install-assets/config-health-hooks.json.Maintainability
config-health.py(CLI entry and audit modes),config_health_constants.py(constants, regexes, audit sets),config_health_paths.py(path resolution and defensive reads), andconfig_health_scan.py(shell-command tokenising). Every file is below the repository's 800-line limit.scan_command— the function named in the oversized-monitor finding — is now a 49-line orchestrator over_scan_program_bodyand_word_tokens; the split is behaviour-preserving and covered by the parser suite.tests/hooks/config-health.test.js(resolution and wording),tests/hooks/config-health-parser.test.js(parsing, accounting, install lifecycle), andtests/hooks/config-health-helpers.js(shared harness). All three are below 800 lines.sys.dont_write_bytecodekeeps the read-only monitor from leaving__pycache__in the plugin directory.fileslist, and standalone-install instructions now copy the entry and all three helpers together.Testing
tests/hooks/config-health.test.js, 31 intests/hooks/config-health-parser.test.js, sharingtests/hooks/config-health-helpers.js.guard.py;,guard.py&&…,guard.py|…) still being audited,settings.local.jsonas a hook source, pluginhooks/hooks.jsonas a hook source, a positive count inside the staleness window suppressing the dead-rule finding,--no-hooksinstalling the payload without registering the monitor, and the installed SessionStart entry surviving install → startup → repair → uninstall.install-apply.test.jsfull-profile dry run now asserts two settings operations — one per hook-shipping module — with their sources and managed hook ids.uninstall.test.js: install--modules hooks-runtime,config-health --enable-hooks, assert both settings records in state, uninstall, assert both hook ids are gone fromsettings.json. Before the state-key fix this reproduced 28 leftover hook entries.install-apply.js→ startup →repair.js→uninstall.js, including the default install not adding a per-tool hook, and a--pretoolrun from the installed script against both an absolute project hook and a plugin-root hook.claude-projectinstall into a disposable project directory, followed by a--pretoolrun with a project-relative.claude/scripts/config-health.pyhook.validate-install-manifests,catalog --text, andvalidate-skillspass locally.validate-context-profilesreports thatmanifests/context-packs/skill-triggers@1.jsonis stale — its registry digest no longer matches the generated registry — on this branch and one83576fe, the merged base it sits on. Pre-existing, untouched here.--pretoolprocess 50.6 ms → 54.7 ms, againstpython -c passat 42.1 ms. The skill documents this and keeps PreToolUse opt-in.Known limitations
CONFIG_HEALTH_PLUGIN_ROOTis counted as not audited, not resolved by guessing.