Skip to content

Skill Anthropic Grade Optimizer

Audits Claude-directing artifacts (CLAUDE.md, SKILL.md, subagent, hook, MCP, prompts, api_config) against 189 cited Anthropic rules across 11 dimensions. Cite or stay silent.…

Install: pip install pyyaml

Works with Claude Code · 19 GitHub stars

Install

$pip install pyyaml

Install command taken from the project's README or registry entry. Always review code before running it.

anthropic-grade-optimizer

Cite or stay silent. Artifact type comes first. Voice drift trumps score. An auditor for Claude-directing artifacts against 189 cited Anthropic rules across 11 dimensions, calibrated per model. Every finding ships with verbatim quote and source URL. Authorial voice is preserved by contract — not by accident.

Why this exists

Most prompt linters score what's easy to count and call it a day. This one starts from a different premise: a Claude-directing artifact is a cognitive contract, not a configuration file. Audit it like a contract — cite the clause, name the violation, propose the patch, and never rewrite the author into someone else. If the auditor cannot point to the doctrine, the auditor stays silent.

That is the line this skill refuses to cross, and the reason it audits itself on every release.

The Three Laws

Every finding, every diff, every score lives under these three rules. Violating any one collapses the others.

  1. Cite or stay silent. Every 🔴 / 🟡 finding carries a source_url and a verbatim quote. No source → no finding.
  2. Artifact type comes first. A SKILL.md rule fired against a CLAUDE.md is a false positive, not a finding. The rubric is type-aware before it is severity-aware.
  3. Voice drift trumps score. An optimization that lifts the score by diluting the operator's voice is a regression in disguise. Drift over 10% aborts; with --push-ceiling the gate tightens to 5%.

What it does

Reads any Claude-directing artifact — CLAUDE.md, SKILL.md, subagent, hook, MCP config, system prompt, user prompt, workflow, or api_config — and emits:

  • a 0–100 score with letter grade
  • per-dimension breakdown across the 11 dimensions (D-CLAR, D-STRUCT, D-EXAMPLE, D-REASON, D-CONTEXT, D-MODEL, D-AGENT, D-EVAL, D-TOOL, D-VISION, D-CC for the Claude Code ecosystem)
  • triaged findings (🔴 must-fix, 🟡 should-fix, 🟢 may-fix, ❓ open question, ⚪ preserve)
  • surgical diffs (mode ≠ audit), each citing the rule that triggered them
  • voice-fidelity gate (drift > 10% aborts optimization)
  • declared-exception ledger with side-by-side raw/active scores

Install

As a Claude Code skill (recommended):

git clone https://github.com/l0z4n0-a1/skill-anthropic-grade-optimizer.git \
  ~/.claude/skills/anthropic-grade-optimizer
cd ~/.claude/skills/anthropic-grade-optimizer
pip install pyyaml                 # required
pip install anthropic              # optional, only for --pass2

The skill auto-loads in any Claude Code session. Trigger it by asking Claude to "audit this CLAUDE.md", "make this skill Anthropic-grade", "is this prompt good for Opus 4.7?", etc.

As a standalone CLI (no Claude Code required):

git clone https://github.com/l0z4n0-a1/skill-anthropic-grade-optimizer.git
cd anthropic-grade-optimizer
pip install pyyaml
python scripts/run.py path/to/SKILL.md --target opus-4-7 --mode audit

Requirements: Python 3.10+. pyyaml is the only mandatory dependency. The anthropic SDK is only needed for the --pass2 qualitative-judge mode and degrades gracefully when absent.

Quick start

python scripts/run.py  --target opus-4-7 --mode audit

With Pass-2 qualitative audit (requires ANTHROPIC_API_KEY):

python scripts/run.py  --target opus-4-7 --pass2

Strict mode (no operator-declared exceptions):

python scripts/run.py  --target opus-4-7 --no-exceptions

Similar plugs

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…

Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.

Persistent Context Across Sessions for Every Agent, Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future…

Explore related