Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ user opts in with `/plugin enable`; an existing install is never flipped by cata

- [`desktop-notification`](plugins/desktop-notification) — Alert you when Claude Code needs input — an audible terminal bell, an OSC 9 terminal notification, and an OS-native toast (macOS/Linux) on permission and idle prompts.
- [`playbooks`](plugins/playbooks) — Doctrine and knowledge playbooks as on-demand skills, plus a maintainer-facing update skill. boris — Boris Cherny's Claude Code workflow tips (howborisusesclaudecode.com); skill-authoring — Anthropic's internal skill-authoring playbook; fable-5 — Claude Fable 5's operating doctrine (self-authored, no upstream). The boris and skill-authoring packs vendor a verbatim upstream baseline; /playbooks:update drift-checks and syncs those baselines centrally (maintainers).
- [`claude-config`](plugins/claude-config) — Three audit skills for a repo's Claude Code configuration: audit (settings.json / .mcp.json / hooks / plugins / permissions drift), audit-automation-gaps (evidence-gated verdicts on automation gaps), and audit-permission-grants (allow-rule / allowed-tools grants for auto-mode durability and portability).
- [`claude-config`](plugins/claude-config) — Four audit skills for a repo's Claude Code configuration: audit (settings.json / .mcp.json / hooks / plugins / permissions drift), audit-automation-gaps (evidence-gated verdicts on automation gaps), audit-permission-grants (allow-rule / allowed-tools grants for auto-mode durability and portability), and audit-model-fit (instruction surfaces swept for model-hobbling constraints newer models no longer need).
- [`claude-memory`](plugins/claude-memory) — Keeps a repo's Claude Code memory layer healthy and under your control, against criteria derived from official Claude Code documentation. The audit skill checks the instruction/memory layer (CLAUDE.md, CLAUDE.local.md, .claude/rules/, auto-memory) with a deterministic script-backed spine plus judgment-tier checks. The stateless skill inspects, disables, and (confirm-gated) purges Claude-written auto memory across all settings scopes.
- [`claude-ops`](plugins/claude-ops) — Claude Code operations toolkit. Seven skills: observability (read locally captured telemetry — OTEL store, collector, hook-event JSONL, ccusage — with trend reports and store pruning), known-issues (search known Claude product GitHub bugs, check service health, maintain a persistent tracked-issue registry), changelog (ingest Claude Code changelog entries and integrate them into the current repo), plugins (bring a machine's plugin fleet current on demand — marketplace refresh, effective-scope updates including in-repo project/local installs, new-plugin install per policy, scope-divergence detection and explicit convergence), morning-brief (read-only gh-based operator morning view — queue-label counts, merge-ready PRs, parked decisions with their RECOMMENDED lines, and loop-lane telemetry freshness), lanes (start/restart/stop/status loop lanes as named background Claude Code sessions seeded from canonical prompt files, with per-lane model/effort and a repo-pull + marketplace-refresh launch step), and a re-runnable setup action that settles where the known-issues registry lives. Plus a family of seven advisory *-audit telemetry-emitter hooks (API errors, config changes, instruction loads, permission denials, pre-compaction, skill usage, tool failures) that emit the shared hook-telemetry envelope, and a reference sink that maps envelopes into the hook-events.jsonl the observability skill reads.
- [`skill-quality`](plugins/skill-quality) — Skill-authoring QA tooling: a static contract checker that runs eighteen deterministic checks over a Claude Code skill (frontmatter, listing-budget cap, trigger-keyword preservation, line caps, broken internal refs, markdownlint, gotchas surface, evals presence, precompute opportunity) and a bundled evals.json schema for validation. Runs against any repo's skills directory via the convention-resolution ladder — no baked layout.
Expand Down
6 changes: 3 additions & 3 deletions plugins/claude-config/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "claude-config",
"version": "0.7.1",
"description": "Three audit skills for a repo's Claude Code configuration: audit (settings.json / .mcp.json / hooks / plugins / permissions drift), audit-automation-gaps (evidence-gated verdicts on automation gaps), and audit-permission-grants (allow-rule / allowed-tools grants for auto-mode durability and portability).",
"version": "0.8.0",
"description": "Four audit skills for a repo's Claude Code configuration: audit (settings.json / .mcp.json / hooks / plugins / permissions drift), audit-automation-gaps (evidence-gated verdicts on automation gaps), audit-permission-grants (allow-rule / allowed-tools grants for auto-mode durability and portability), and audit-model-fit (instruction surfaces swept for model-hobbling constraints newer models no longer need).",
"author": {
"name": "Melodic Software",
"email": "info@melodicsoftware.com"
},
"license": "MIT",
"keywords": ["settings", "configuration", "hooks", "plugins", "permissions", "automation", "audit", "maintenance", "skill"]
"keywords": ["settings", "configuration", "hooks", "plugins", "permissions", "automation", "audit", "maintenance", "skill", "instructions", "model-fit"]
}
20 changes: 20 additions & 0 deletions plugins/claude-config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
All notable changes to the `claude-config` plugin are documented here. Format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning.

## [0.8.0]

### Added

- **`audit-model-fit` skill** (`/claude-config:audit-model-fit`). A fourth audit that sweeps the local
Claude Code instruction surfaces — user + project `CLAUDE.md`, skill `SKILL.md` bodies + context
files, agent definitions, `.claude/rules/**`, prompt-type hooks and output styles — for deterministic
constraints that hobble newer, more capable models, and proposes removals/rewrites. Check catalog:
bare prohibitions with no rationale (rewrite to add the *why*, never blanket-delete), over-prescriptive
step lists (cull to intent + hard constraints), over-constraining example blocks (trim toward the
recommended 3–5, not a blanket ban), and stale model-era workarounds — each measured against "would
removing this cause Claude to make mistakes?". A bundled `instruction-surface-scan.sh` enumerates the
surfaces and flags the two grep-able smells as candidates; the judgment stays in the skill body.
**Report-only and human-gated**: it presents findings plus proposed diffs and never edits any
instruction file itself (no `--fix`). Findings inside `melodic-software/standards`-managed
materializations route upstream per the sync-manifest rather than being edited in place. Composes with
(distinct intents, pointers only) `claude-memory:audit` (instruction-layer *health*, same surfaces),
`skill-quality:check` (structure), `docs-hygiene:compress` (token brevity), and the sibling `audit`
(config-file correctness). The plugin `description` now reads "Four audit skills".

## [0.7.1]

### Changed
Expand Down
33 changes: 28 additions & 5 deletions plugins/claude-config/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# claude-config

A Claude Code plugin bundling three audit skills for one cohesive capability: keeping a repo's Claude
A Claude Code plugin bundling four audit skills for one cohesive capability: keeping a repo's Claude
Code configuration healthy. Each skill answers a different question about the same surface:

| Skill | Question it answers |
|---|---|
| `/claude-config:audit` | Are the configuration FILES (`settings.json`, `settings.local.json`, `.mcp.json`, hooks, plugins, permissions) correct against upstream truth? |
| `/claude-config:audit-automation-gaps` | Is the configured automation SET the right set — are there genuine gaps, judged against the enforcement hierarchy? |
| `/claude-config:audit-permission-grants` | Are the permission GRANTS (`allowed-tools`, `permissions.allow`) portable and durable — do they survive auto mode, work across machines, and live where they can take effect? |
| `/claude-config:audit-model-fit` | Do the instruction SURFACES (CLAUDE.md, skill bodies, agents, rules, prompt-type hooks) still fit the current model — or do they carry constraints a newer, more capable model no longer needs? |

The instruction/memory layer (`CLAUDE.md`, `CLAUDE.local.md`, `.claude/rules/`, auto-memory) is audited
by the `health` skill in the separate `claude-memory` plugin (see "Migrating from
`claude-config-audit`" below if you relied on the old `memory-health` skill here).
The instruction/memory layer's *health* (`CLAUDE.md`, `CLAUDE.local.md`, `.claude/rules/`, auto-memory)
is audited by the `health` skill in the separate `claude-memory` plugin (see "Migrating from
`claude-config-audit`" below if you relied on the old `memory-health` skill here). `audit-model-fit`
reads the same instruction surfaces but asks a different question — model *fit*, not health: are their
constraints still earning their place on a newer model?

All default to report-only; mutations (`--fix`, `--implement`) require explicit opt-in and per-item
user approval. `audit-permission-grants` is report-only (its correct remediation is operator-manual).
user approval. `audit-permission-grants` and `audit-model-fit` are report-only (the former's remediation
is operator-manual; the latter is human-gated by design — it proposes diffs, never applies them).

## What each skill does

Expand Down Expand Up @@ -63,6 +67,25 @@ Report-only.
/claude-config:audit-permission-grants settings # permissions.allow only
```

### audit-model-fit

Sweeps the local instruction surfaces (user + project `CLAUDE.md`, skill `SKILL.md` bodies + context
files, agent definitions, `.claude/rules/**`, prompt-type hooks and output styles) for deterministic
constraints that hobble newer, more capable models: bare prohibitions with no rationale,
over-prescriptive step lists, over-constraining example blocks (kept to 3–5, not banned), and stale
model-era workarounds. Each candidate is measured against "would removing this cause Claude to make
mistakes?" A deterministic scan flags the grep-able smells; the judgment stays in the skill body.
Report-only and human-gated — it proposes diffs, never applies them. Findings inside
`melodic-software/standards`-managed materializations route upstream rather than being edited in place.
Distinct from `skill-quality:check` (structure), `docs-hygiene:compress` (token brevity), and `audit`
(config-file correctness).

```shell
/claude-config:audit-model-fit # sweep all instruction surfaces
/claude-config:audit-model-fit claude-md # CLAUDE.md only
/claude-config:audit-model-fit skills # skill bodies + context files only
```

## Consumer conventions

The skills read the consuming repo's own `CLAUDE.md` / `.claude/rules/` for project-specific policy:
Expand Down
110 changes: 110 additions & 0 deletions plugins/claude-config/skills/audit-model-fit/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
name: audit-model-fit
description: "Audit local Claude Code instruction surfaces (user + project CLAUDE.md, skill SKILL.md bodies + context files, agent definitions, .claude/rules, prompt-type hooks and output styles) for deterministic constraints that hobble newer, more capable models — bare prohibitions with no rationale, over-prescriptive step lists, over-constraining example blocks, and stale model-era workarounds — and propose removals/rewrites against the bar 'would removing this cause Claude to make mistakes?'. Use when: 'audit model fit', 'unhobble my instructions', 'after a model upgrade', 'are my CLAUDE.md constraints still needed', 'prune stale prompt instructions', 'my skills are too prescriptive'. Report-only: proposes diffs, never auto-applies."
argument-hint: "[scope] — scope: claude-md|skills|agents|rules|hooks|all (default: all)"
user-invocable: true
disable-model-invocation: false
---

## Pre-computed context

Instruction-surface inventory: !`bash "${CLAUDE_PLUGIN_ROOT}/skills/audit-model-fit/scripts/instruction-surface-scan.sh" 2>/dev/null || echo "scan unavailable"`

## Purpose

Upgrade-triggered (or on-demand) audit that sweeps the local Claude Code instruction surfaces and
proposes removals/rewrites of deterministic constraints that hobble newer models. Instructions written
to make a prior, weaker model behave — bare prohibitions, mechanical step lists, defensive
over-specification — become carrying cost and can *degrade* a capable model's output. This audit finds
them and proposes changes; a human applies them.

The governing bar: **"Would removing this instruction cause Claude to make mistakes?"** If no, it is a
removal or loosening candidate. The full check catalog, treatments, sources, and output format live in
[reference/criteria.md](reference/criteria.md) — read it when running this audit.

## Scope boundary (compose with — route out, do not restate their logic)

This audit owns instruction **content fit** to the current model. Four adjacent skills own neighboring
questions; route findings that belong to them rather than handling them here:

- `claude-memory:audit` — instruction-layer **health** against a codified checklist (is `CLAUDE.md`
well-formed, within length, are rules valid). It reads the same surfaces and shares the pruning bar,
but asks "is the instruction layer healthy?"; this audit asks "do its constraints still fit a newer
model?". Route structure/health/length findings there; keep model-fit loosening here.
- `skill-quality:check` — **structural** SKILL.md lint (frontmatter, line caps, broken refs).
- `docs-hygiene:compress` — **token brevity** (shorten prose without dropping meaning). This audit
removes now-unnecessary *constraints*, not just words.
- `claude-config:audit` — **config-file** hygiene (settings.json / .mcp.json / hooks / permissions).

## Cross-repo routing (standards-managed materializations)

A finding inside a file **synced from `melodic-software/standards`** (owned upstream per that repo's
`distribution/sync-manifest.yml`) is **never edited in place** — the next sync overwrites it. Route the
change upstream to the owning repo and say so in the report; propose no in-place diff for that file. If
the manifest is not reachable from the consuming repo, still apply the rule: flag any vendored/synced
file for upstream routing. Locally-owned surfaces get the normal human-gated proposed diff.

## Arguments

Parse `$ARGUMENTS` for an optional scope filter:

- `claude-md` — user + project `CLAUDE.md` only
- `skills` — skill `SKILL.md` bodies + `context/`/`reference/` files only
- `agents` — agent definitions only
- `rules` — `.claude/rules/**/*.md` only
- `hooks` — prompt-type hook scripts + output styles only
- `all` — everything (default)

This skill is **report-only**. There is no `--fix`: every change is human-gated. It proposes diffs; a
human (or a skill the human explicitly invokes) applies them.

## Phase 1: Enumerate surfaces

Run the deterministic scan (also injected above at load):

```shell
bash "${CLAUDE_PLUGIN_ROOT}/skills/audit-model-fit/scripts/instruction-surface-scan.sh"
```

It reports the surface inventory and flags the two grep-able smells as **candidates** — bare
prohibitions (C1) and example-dense files (C3). `--candidates` lists each `file:line`; `--count` prints
the bare-prohibition count. Candidates are starting points, not verdicts.

If a scope filter was given, read only the matching surfaces in Phase 2.

## Phase 2: Classify against the check catalog

Read [reference/criteria.md](reference/criteria.md) and read the in-scope surfaces. For each candidate,
and each instruction in the surfaces you read, apply the checks:

- **C1 bare prohibition** → propose a **prohibition + rationale** rewrite, not deletion (the constraint
may still be needed; only the missing *why* is the defect).
- **C2 over-prescriptive step list** → cull to intent + hard constraints; keep steps that encode a real
ordering/safety/contract.
- **C3 example-dense** → trim toward 3–5 format-steering examples; **not** a blanket ban — a file at or
below the range is not a finding.
- **C4 stale model-era workaround** → verbose over-specification compensating for a prior model's
weakness; propose removal/loosening.

Measure every candidate against the pruning bar. **No** (removal changes nothing) → removal/loosening
candidate. **Yes** → keep it (for a C1, still propose the rationale rewrite). A clean sweep is a valid
outcome — do not manufacture findings.

## Phase 3: Report + proposed diffs (human-gated)

Present findings as the table and proposed-diffs format in
[reference/criteria.md](reference/criteria.md) "Output format": one row per finding with its check,
surface, pruning-bar verdict, proposed change, and routing. For each locally-owned finding, give the
exact before/after rewrite. For a standards-managed finding, the routing reads
"upstream: melodic-software/standards" and **no** in-place diff is proposed.

Then stop. Do **not** edit any `CLAUDE.md`, `SKILL.md`, agent definition, rule, hook, or output style.
Applying the diffs is a human action (or a separate skill the human explicitly invokes):

> "Here are the proposed changes. Which would you like applied? I will not change any file without your go-ahead."

## Consumer conventions

A consuming repo may declare, in its own `CLAUDE.md` / `.claude/rules/`, prohibitions it deliberately
keeps bare, example sets it intends to hold above the 3–5 range, or surfaces exempt from this sweep.
Read those when present; this skill does not assume them.
Loading
Loading