description: Run a single evaluation-improvement-documentation cycle on the matplotlib skill. Creates gallery entries and atomic commits. argument-hint: [--iterations N] [--quick] [focus area] disable-model-invocation: true allowed-tools: Bash(uv run ), Bash(scripts/), Bash(git *), Bash(mkdir *), Bash(cp *), Bash(ls *), Bash(docker *)
Iterate Skill
Run a single evaluation-improvement-documentation cycle on the matplotlib skill.
Guardrails
- Max 3 iterations without human feedback
- No destructive changes — add/modify only, never delete patterns
- Style invariants —
sns.set_theme()andsns.despine()calls are immutable - Rollback — each iteration is an atomic commit;
git revertany single one
Current State
Evaluation score:
!uv run scripts/evaluate_skill.py 2>&1 || true
Latest clean-room runs:
!ls -1t logs/clean-room/ 2>/dev/null | head -5 || echo "No runs yet"
Current gallery entries:
!ls -1d gallery-archive/[0-9]* 2>/dev/null | tail -5 || echo "None"
Git branch:
!git branch --show-current
Recent commits:
!git log --oneline -3
Arguments
Parse $ARGUMENTS for:
--iterations N(1-3): Run N cycles on a staging branch, merging at the end. Default: 1 (no branch).--quick: Use--quickflag for chart-test-container.sh (3 prompts instead of 5).- Remaining text: Focus area hint (e.g., "tick marks", "P9 spelling"). Prioritize this in Step 2.
${ARGUMENTS ? **User input:** ${ARGUMENTS} : ""}
Workflow
Step 1: Evaluate Current State
-
Read the skill files:
.claude/skills/matplotlib/SKILL.md.claude/skills/matplotlib/style-reference.md- The pattern files in
.claude/skills/matplotlib/patterns/
-
Review the injected evaluation score above — note any failures or style compliance gaps.
-
If previous clean-room results exist (
logs/clean-room/latest/), read each PNG and perform a Visual Evaluation (see protocol in Step 5 item 3). Record visual observations as the qualitative baseline.
Step 2: Identify Improvements
Select 1-2 areas for improvement. If a focus area was provided in arguments, prioritize it. Otherwise prioritize in this order:
- Style compliance gaps flagged by evaluate_skill.py
- Visual issues identified during Step 1 evaluation (layout, readability, color, spacing)
- Pattern inconsistencies (different annotations, missing legend styling)
- Code quality issues (deprecated API calls, unclear variable names)
- Visual polish and refinements
If a pattern shows inconsistent visual quality across recent runs,
consider running /variation-analysis PN for targeted quality checks
instead of ad-hoc fixes.
Do NOT:
- Delete existing patterns
- Change
sns.set_theme(font_scale=1.0, style="whitegrid", font="DejaVu Sans")— this is immutable - Change
sns.despine(left=True, bottom=True)— this is immutable - Make changes that affect more than 3 patterns at once
Step 3: Propose Changes
Write the proposed changes BEFORE making them. Create a structured evaluation:
## Proposed Changes
| Pattern | File | Change | Confidence |
|---------|------|--------|------------|
| P3 | patterns/P3-time-series.md | Added rolling window annotation | High |
Step 4: Apply Changes
Make targeted edits to skill files in .claude/skills/matplotlib/.
Step 5: Verify
-
Run static analysis for style compliance:
uv run scripts/evaluate_skill.py --check-renders -
Run the container-based skill test (Claude Code generates charts from minimal prompts in a Docker clean room):
scripts/chart-test-container.sh --quick -
Visual Evaluation — for each generated PNG, perform this sequence IN ORDER. Write your observations into the gallery README (Step 6).
Observe: Describe what you see in 2-3 sentences. Layout, colors, text, spacing, composition. No judgments yet — just describe what is there.
Compare: Open style-reference.md and note any gaps:
- Typography: readable labels, proper font sizing?
- Color: colorblind-accessible palette, consistent with spec?
- Layout: balanced whitespace, aligned elements?
- Annotations: present, well-positioned, dimgrey?
- Legends: framed, white background, light grey border?
- Despined whitegrid: does the overall aesthetic come through?
Judge: Beyond the spec, apply your own taste:
- Would you put this chart in a published paper without changes?
- What's the first thing that catches your eye — good or bad?
- Is anything cluttered, misaligned, or hard to read?
- What one change would most improve this chart?
Verdict: Rate each chart: PUBLISH | POLISH | REWORK
-
Read the generated Python scripts in each results subdirectory to confirm style conventions (
sns.set_theme,sns.despine). -
Record "After" automated check scores.
-
Regression detection: If the container script exits nonzero (any prompt produced zero charts), or generated code is missing
sns.set_theme/sns.despine, halt and explain why. -
When all automated checks pass, visual evaluation becomes the primary driver of improvement. The evaluate_skill.py score is the floor, not the ceiling. Use your Visual Evaluation verdicts to identify what to improve in the next iteration.
Step 6: Document
Determine the next gallery entry number by looking at gallery-archive/ and create:
- Create
gallery-archive/NN-description/folder - Copy relevant PNGs from the clean-room results directory (
logs/clean-room/latest/) into the gallery folder - Write
README.mdfollowingdocs/gallery/TEMPLATE.md. Include all Visual Evaluation observations from Step 5 in the appropriate sections.
Step 7: Commit
Stage all changes and create an atomic commit:
📊 feat(skill): [1-sentence description of change]
Autonomous Mode
When --iterations N is provided (max 3):
- Create a staging branch:
iterate/batch-YYYYMMDD-HHMMSS - Run Steps 1-7 for each iteration, committing after each
- Between iterations, check if automated scores decreased — if so, HALT
- After all iterations, merge the staging branch back to master:
git checkout master && git merge <branch>- Delete the staging branch:
git branch -d <branch>
- Produce a final summary listing all changes, the score progression,
and a reminder that each iteration is an atomic commit revertible
with
git revert <hash>
Error Handling
- Docker not running: If
scripts/chart-test-container.shfails with a Docker connection error, report the error and halt. Do not retry. - Eval score decreases: If the "After" automated score is lower than the "Before" score, revert the skill file changes (
git checkout -- .claude/skills/) and halt with an explanation. - Chart generation fails: If the container script exits nonzero, inspect the logs in
logs/clean-room/latest/for the root cause before deciding whether to fix or halt. - No changes needed: If the evaluation score is perfect and visual evaluation shows all PUBLISH verdicts, report "no improvements identified" and skip Steps 3-7.
Example Usage
# Single iteration, full test suite
/iterate-skill
# Quick iteration focused on a specific area
/iterate-skill --quick P9 title consistency
# Three autonomous iterations
/iterate-skill --iterations 3
# Quick autonomous run focused on tick marks
/iterate-skill --iterations 2 --quick tick marks
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.