Write, audit and fix CLAUDE.md, AGENTS.md and .claude/rules from facts in your repository, with a linter that checks them against the code. Use when: Create a CLAUDE.md or AGENTS.md built on the real build, test and lint commands; Audit an existing instruction file for stale commands, moved paths and secrets; Split a long CLAUDE.md into path-scoped .claude/rules that load only when needed.
72%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/md-context-writer/SKILL.mdFree skill by Nex AI. This file is the public guide from Agensi. Scripts, extension source, and templates from the original package are not in this folder.
The instruction file is read at the start of every agent session. Most are generated once and never checked, or grow into generic advice the agent stops following. This skill writes one from verified facts and keeps it honest.
repo_facts.py reports what the repo actually contains: every defined command (package.json per workspace, Makefile, justfile, Taskfile, pyproject, tox, nox, composer), what CI really runs, toolchain and versions, lint/test/type tools, layout, existing agent files for Claude, Codex, Cursor, Copilot, Gemini and Windsurf, commit style, and env var names (never values).
lint_claude_md.py checks the instruction file against the repo:
pnpm run e2e, make deploy), with dependency binaries like pnpm vitest understood@importsCollect facts, verify the commands, ask only what files cannot answer (at most five questions), write under 200 lines, put area-specific rules in path-scoped .claude/rules/, lint until clean. Includes a writing guide with before/after examples, a template, and a complete example file.
Tested on real repositories (a Python library and a large pnpm monorepo) and with 19 automated tests.
Built by Nex AI, nex-ai.be
The linter verifies npm, pnpm, yarn and bun scripts, make and just targets; other command runners are not checked. Path checks cover paths written in backticks. It checks facts, it cannot judge whether a rule is wise.
Request
Our CLAUDE.md is a year old and Claude keeps running commands that don't exist. Fix it.
Result
I ran the linter against the repo first:
$ python lint_claude_md.py
WARN CLAUDE.md:1 [shouting] 6 uses of IMPORTANT/MUST/NEVER/ALWAYS in caps
ERROR CLAUDE.md:6 [commands] `pnpm run e2e`: no package.json script named 'e2e'
ERROR CLAUDE.md:7 [commands] `make deploy`: there is no Makefile
WARN CLAUDE.md:10 [paths] `src/checkout/` does not exist in the repo
WARN CLAUDE.md:13 [vague] "write clean code" cannot be verified
WARN CLAUDE.md:14 [conflicts] says both use and do not use 'moment'
ERROR CLAUDE.md:16 [secrets] looks like a connection string with password
3 error, 4 warning, 0 info| Problem | Fix |
|---|---|
pnpm run e2e and make deploy do not exist | Replaced with the commands CI runs: pnpm test, pnpm lint, pnpm typecheck |
src/checkout/ was removed in a refactor | Removed; the file now names src/orders/ and src/payments/ |
| "Never use moment" and "use moment for timezones" | Kept one rule: dates are ISO 8601 in UTC at the API |
| A staging database URL with password | Removed; it now names DATABASE_URL. Rotate that password, it has been in git |
| Six rules in capitals | Plain, specific instructions |
Added what was missing: how to run one test (pnpm vitest run src/orders/service.test.ts) and a "before saying a task is done" line.
$ python lint_claude_md.py
Checked CLAUDE.md (16 lines)
0 error, 0 warning, 0 infoAdd python lint_claude_md.py to CI so the file fails the build when it drifts from the code again.
/init drafts a file once. This skill grounds every command in the repo or CI, asks only what files cannot answer, places area-specific rules where they load on demand, and the linter keeps the file true as the code changes.
Yes. The linter checks AGENTS.md and rules files, and warns when Claude Code would silently ignore an AGENTS.md next to a CLAUDE.md.
No. It shows a diff with a reason for every removed section and never drops your content silently.
Built by Nex AI. More skills, including the paid catalog: https://www.agensi.io/creators/ch1n4-g3nd4x
NexaiGuy/nex-ai-skills
4034c84
Also appears in
since Nov 6, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.