agents-md-improver
AGENTS.md improver
This skill helps keep repository instructions accurate and consistent. When a user corrects the coding agent's behavior, treat it as a potential update to the repo's instruction files and propose a clean, integrated edit to AGENTS.md.
Usage
Use this skill anytime the user:
- Corrects the agent ("don't do X", "do Y instead", "from now on...", "remember to...", "add a rule that...").
- Asks to update instruction files like
AGENTS.md,CLAUDE.md,.claude/CLAUDE.md, orGEMINI.md, or to align or consolidate those files. - Notices contradictions, duplication, or drift between repository instruction files.
Requirements
- Repo-local file access to read and edit
AGENTS.md. - If present in the repo, read access to
CLAUDE.mdand/or.claude/CLAUDE.md.
What It Does
- Proposes a patch to incorporate the user's correction into
AGENTS.mdseamlessly. - Looks for contradictions and resolves them in the proposal (or asks for clarification when needed).
- If repo-local
CLAUDE.mdor.claude/CLAUDE.mdexists, proposes consolidating instructions intoAGENTS.md, then offers follow-up options to delete, symlink, or stub those files.
How It Works
Scope
This skill is repo-specific.
- Only consider repo-local instruction files:
AGENTS.mdCLAUDE.md(repo root).claude/CLAUDE.mdGEMINI.md(repo root and/or repo subdirectories if present)
- Ignore system-wide instructions and files under the user's home directory (for example
~/.claude/,~/.gemini/,~/.config/, etc.).
Propose-first workflow (do not auto-edit)
- Read
AGENTS.md. - Identify the user's correction and translate it into a durable, repo-specific instruction.
- Decide where it belongs:
- Prefer editing the most relevant existing section.
- If it introduces a genuinely new topic, propose a new
##section near related content.
- Draft the exact text change(s) as a small patch/snippet.
- Ask for confirmation before applying:
- "Apply these changes to
AGENTS.md? (y/n)"
- "Apply these changes to
Only apply edits after the user confirms.
Seamless integration rules
- Do not add dated changelog entries like "YYYY-MM-DD: correction".
- Update the existing prose/bullets/steps so the rule reads like it has always been part of the document.
- Keep formatting consistent with the surrounding
AGENTS.mdstyle.
Contradiction checks
Before proposing a patch:
- Scan
AGENTS.mdfor conflicts with the new correction. - If a conflict exists, include conflict resolution in the proposed patch by rewriting/removing the conflicting lines.
- If resolution is ambiguous, ask a single targeted question before proposing a patch.
Then scan repo-local guidance (if present):
- Compare
AGENTS.mdagainstCLAUDE.mdand.claude/CLAUDE.md. - Flag duplication and conflicts.
- Prefer consolidating into
AGENTS.mdas the canonical source of truth.
Consolidation flow for CLAUDE.md files (if present)
If CLAUDE.md and/or .claude/CLAUDE.md exists in the repo:
- Propose a consolidation patch to
AGENTS.md. - After the user approves the
AGENTS.mdpatch, propose what to do for each CLAUDE file:- Delete the file.
- Replace the file with a symlink pointing to
AGENTS.md. - Replace the file contents with a small stub that points humans/tools to
AGENTS.md(fallback when symlinks are undesirable).
- Confirm destructive actions (deletes) in a separate prompt.
Symlink directions (when chosen):
CLAUDE.md->AGENTS.md.claude/CLAUDE.md->../AGENTS.md
Notes for multi-instruction environments
Some harnesses merge multiple instruction sources and may apply conflicting rules non-deterministically. Prefer a single canonical source (AGENTS.md) and reduce parallel instruction files via consolidation + delete/symlink/stub.
More from ericmjl/skills
scientific-eda
Defensive exploratory data analysis for scientific data (CSV, FASTA, etc.). Context-first, human-guided; one plot at a time, ask why before executing, append-only journal per session, scripts with PEP723 and uv run, WebP plots. Use when opening data files for EDA or when the user wants guided scientific data exploration.
20ml-experimentation
Conduct machine learning experiments from planning through evaluation and report writing. Use when running ML experiments, testing hypotheses, training models, or writing up results. Covers single-hypothesis scoping, fast iteration loops, targeted logging, JOURNAL.md protocol, data-backed diagnostic plots, and scientific report writing.
16gh-activity-summary
Generate a plain-language activity report of your GitHub work for a given date range, including commits, pull requests, reviews, issues, and comments. Use this when you need to summarize what you've accomplished on GitHub for status updates, retrospectives, or tracking your work.
14gh-daily-timeline
Reports your GitHub activity for a specific day using the gh CLI, showing commits, issues, and activity timeline. Use this when you need to review what you accomplished on GitHub for a particular date.
11youtube
Comprehensive YouTube operations using yt-dlp - download videos/audio, extract transcripts and subtitles, get metadata, work with playlists, download thumbnails, and inspect available formats. Use this for any YouTube content processing task.
7mempalace
>
3