/devx-qa:fixing-harnessfrom devx-qa
Audits and refactors Claude Code's agentic harness (CLAUDE.md, AGENTS.md, .claude/rules, settings.json) into layered, path-scoped configuration. Use when CLAUDE.md is too long or rules lack segmentation.
Ships in devx-qa. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Target: $ARGUMENTS (optional path; defaults to project root)
Refactor the project's harness so the model sees only the rules it needs for the files it touches. CLAUDE.md (and AGENTS.md when present) become a thin always-on critical-rules layer. Domain rules move to .claude/rules/*.md with paths: frontmatter. Permissions and MCP scope live in .claude/settings.json with explicit deny guardrails.
The goal is inference weight, not exhaustive documentation: 10 sharp directives the model references in reasoning beat 200 lines it half-skims.
Progress checklist:
Harness Audit & Fix:
- [ ] Step 1: Inventory current harness
- [ ] Step 2: Audit against best practices
- [ ] Step 3: Produce gap analysis
- [ ] Step 4: Propose refactor plan (confirm with user)
- [ ] Step 5: Apply changes (CLAUDE.md, AGENTS.md, rules, settings)
- [ ] Step 6: Verify with /memory
Read in parallel where present:
CLAUDE.md, ./.claude/CLAUDE.md, CLAUDE.local.mdAGENTS.md (Codex / Cursor / other agents).claude/settings.json, .claude/settings.local.json.claude/rules/**/*.md — note paths: frontmatter on each.claude/agents/*.md, .claude/skills/*/SKILL.md.mcp.json, .gitignoreCapture the actual directory layout (top-level apps, packages, services). Use tokei if available, otherwise find or ls. The layout drives the path scopes proposed in Step 4 — generic globs that don't match real directories are dead weight.
Load references/audit-checklist.md and score each dimension:
deny for destructive ops and secrets, scoped allow patterns, MCP tools narrowed.claude/settings.local.json and CLAUDE.local.md in .gitignoreOutput a markdown table:
| Dimension | Status | Severity | Evidence | Suggested fix |
|---|
Status values: Respected, Violated, Partially respected, N/A
Severity values:
deny rules, secrets readable, CLAUDE.md > 100 lines, no rules layer in a multi-domain projectBash(*) allow, AGENTS.md driftEnd with a Top fixes list ordered by impact.
Present the proposed file layout before writing anything:
CLAUDE.md (X lines today -> Y lines after)
AGENTS.md (if other agents are in use)
.claude/rules/
├── <domain-1>.md paths: <glob>
├── <domain-2>.md paths: <glob>
└── ...
.claude/settings.json (deny rules + scoped allow)
.gitignore (add .claude/*.local.*, CLAUDE.local.md)
Confirm with the user before applying. Path scopes must match real directories surfaced in Step 1.
For each file:
Rewrite CLAUDE.md using references/claude-md-template.md. Keep only project-wide directives. Move domain-specific content to rules files. Target under 30 lines.
Sync AGENTS.md using references/agents-md-template.md when other agents are in use. Mirror the critical rules; reference domain rules by path rather than duplicating them.
Create path-scoped rules in .claude/rules/<domain>.md using patterns from references/path-scoping-patterns.md. Each rule file has paths: frontmatter listing globs and contains only directives that apply inside those paths.
Harden .claude/settings.json using references/settings-recipes.md. Add deny for destructive ops and secret files. Tighten allow patterns. Scope MCP tools.
Update .gitignore to include .claude/*.local.* and CLAUDE.local.md if missing.
Preserve concrete content the user relies on — package manager command, lint command, framework gates. Surface anything you plan to delete before deleting it.
Validate the rewrite, then fix anything that fails and re-verify:
wc -l CLAUDE.md should be under 30. If not, return to Step 5 and move more content into rules.paths: glob (git ls-files | grep -E <pattern>). If zero matches, the glob is wrong.grep -c '"deny"' .claude/settings.json should return ≥ 1. The deny list must include destructive ops and secret reads..gitignore covers locals — grep -E '\.claude/\*\.local|CLAUDE\.local\.md' .gitignore should return matches./memory and confirm CLAUDE.md plus only the path-scoped rules relevant to the current cwd are listed as loaded.If any check fails, fix it and re-run from check 1. Do not declare the refactor complete with a failing check.
.claude/ directory yet, create it; do not assume team policies the user has not statedWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub agentic-dev3o/devx-plugins --plugin devx-qa9 skills in this plugin
/appsec-reviewThis skill should be used when the user asks to "security review this PR", "review this diff for vulnerabilities", "appsec review these changes", "audit this branch for auth, injection, or data exposure bugs", "check this code for exploitable security issues", or requests a focused application security review of pending changes./babysit-prMonitors a GitHub pull request's checks with the gh CLI, reads the logs of failing GitHub Actions jobs, classifies each failure as branch-caused or infrastructure, and drives the PR to green — fixing the branch's own breakage and delegating every commit, merge, and push to the devx-git skills. Use when the user asks to babysit, watch, or monitor a PR, says CI or checks are failing or red, asks to analyse PR job errors and remediate them, or wants a PR driven to a ready-to-merge state after opening it./Other plugins' skills for the same job