/agent-instructions
Scoped AGENTS.md, CLAUDE.md or Cursor rules built from what your repo actually runs.
Then type /agent-instructions in Claude Code, or describe the task and let it pick the skill.
What you get back recorded run · 9 Oct 2026
- I've added two files:
AGENTS.mdholds all the instructions, andCLAUDE.mdpulls them in with an import, so Codex and Claude Code read the same text. Nothing is committed yet. - The default reading speed (230 words per minute) is set in two places,
src/count.jsandbin/mdtally.js, so they have to change together. - The lint script names each file it checks, so any new source file has to be added to it by hand.
Input → output from the run
{
"name": "mdtally",
"version": "0.3.1",
"description": "Count words and estimate reading time for Markdown files",
"type": "module",
"bin": { "mdtally": "bin/mdtally.js" },
"engines": { "node": ">=20" },
"scripts": {
"test": "node --test",
"lint": "node --check bin/mdtally.js && node --check src/count.js"
},
"license": "MIT"
}Before finishing a change, run `npm test` and `npm run lint`; both must pass. ## Conventions - Keep zero dependencies. Use Node built-ins (`node:fs`, `node:test`, `node:assert/strict`) rather than adding packages. - Use double quotes, semicolons, and named exports, matching existing files. - Add a test in `test/count.test.js` for any change to counting or reading-time behavior. - The default reading speed is 230 wpm, and it is set in two places: `readingMinutes` in `src/count.js` and the CLI fallback in `bin/mdtally.js`. Change both together. - Reading time rounds up to whole minutes, with a minimum of 1. Tests assert this.
When to use it
Use when coding-agent guidance is missing, stale, duplicated or conflicting.
Skip it if you want generic agent advice or a file for every vendor; it writes only what the repo proves, for the runtime you name.
The thinking behind itAgents work best when they know how your repo actually runs. Give them the real commands and rules, and they stop guessing and breaking the build.
Output contract from the skill's Output contract section
When editing, deliver:
- the requested instruction file or files;
- a short scope summary naming which directories and runtimes they govern;
- a command table with verification labels;
- conflicts resolved, preserved, or still requiring a decision;
- any facts deliberately omitted because they were unverified or too volatile.
Keep files concise enough to scan, but let repository complexity determine length. Prefer concrete imperatives and paths over explanatory essays.
How it checks its own work from the instructions
- Every path, script, port, and env variable exists in the repo
- Nested files never contradict inherited rules
- Unverified syntax is labeled unverified, not presented as established
- Documented-only commands are never described as tested
Requirements what it needs
- Works in
- Codex, Claude Code, Cursor
- Needs
- project files, terminal commands
The instructions SKILL.md · 120 lines
Instructions & references
Back to overview ↑On this page 12 sections
Agent instructions
Create the smallest set of instruction files that helps the requested coding agent work safely and accurately in this repository. Recover facts from the repository before asking questions, and distinguish commands you executed from commands you only found in documentation.
Choose the task and target
Determine whether the request is to:
- create instructions where none exist;
- improve one existing file;
- reconcile duplicated or conflicting instruction files;
- add scoped instructions for a package or subtree; or
- translate shared repository facts for more than one agent runtime.
Infer the target from the request and existing conventions. Ask only when the choice changes installation scope or runtime behavior. Do not create parallel vendor files unless the user asks for them.
Use the target's native form:
AGENTS.mdfor agents that follow directory-scoped AGENTS instructions;CLAUDE.mdfor Claude Code project memory;.cursor/rules/*.mdcor the repository's existing Cursor convention;- nested files only when a subtree needs meaningfully different commands, ownership, or boundaries.
Inventory instruction scope
Before writing, locate all existing agent instructions and relevant repository guidance:
pwd
rg --files -g 'AGENTS.md' -g 'CLAUDE.md' -g '.cursor/**' -g 'README*' -g 'CONTRIBUTING*' -g 'Makefile' -g 'justfile' -g 'package.json' -g 'pyproject.toml' -g 'Cargo.toml' -g 'go.mod'
For each instruction file, record its directory, intended runtime, inherited scope, and any statements that conflict with a nearer file or repository evidence. Respect the nearest scoped instruction. Do not duplicate root guidance in every nested file.
Preserve valid project-specific constraints. Remove stale facts and redundant prose only when the replacement retains their intent.
Build an evidence map
Read the minimum repository evidence needed to establish:
- project purpose, language, framework, and runtime versions;
- package or workspace boundaries;
- install, development, build, lint, typecheck, test, and release commands;
- entry points and locations of domain logic;
- generated files, migrations, credentials, deployment configuration, and other high-risk areas;
- naming, testing, formatting, and architectural conventions visible in representative code;
- required services, environment variables, ports, and setup order.
Prefer manifests, scripts, CI workflows, and executable configuration over prose. When sources disagree, report the conflict and use the source that controls actual execution.
Do not paste an exhaustive directory map. Include a path only when it changes how an agent should navigate, edit, or verify work.
Verify commands proportionately
Classify each command as one of:
- executed — ran successfully in the current environment;
- partially verified — syntax or a narrow target ran, but dependencies or services prevented full verification;
- documented only — found in a trusted project source but not run;
- stale or conflicting — contradicted by configuration or failed for a repository reason.
Run safe, relevant checks when feasible. Do not start long-lived services, mutate external systems, install dependencies, or run destructive commands merely to upgrade a verification label. State prerequisites beside commands that need them.
Write for the target runtime
Keep shared repository facts consistent, but adapt runtime-specific mechanics rather than copying one vendor file verbatim.
AGENTS.md
Express directory-scoped instructions, commands, boundaries, and verification expectations. Put specialized guidance in the nearest directory that owns it.
CLAUDE.md
Write durable project memory: commands, architecture landmarks, conventions, and hazards. Avoid unsupported runtime features or generic advice already supplied by Claude Code.
Cursor rules
Follow the repository's current rule-file format and globs. If the repository has no Cursor rules, confirm the current supported format in Cursor's official documentation before creating one; do not infer a schema from memory or another runtime. Split rules only when activation scope differs. Verify frontmatter and glob coverage against the files the rule should govern.
Resolve conflicts explicitly
For each conflict, choose one action:
- retain the nearer scoped rule;
- replace stale guidance with verified repository behavior;
- separate runtime-specific instructions from shared facts;
- ask the user when two live policies express different intent that the repository cannot resolve.
Do not silently choose between policy statements about deployment, generated files, security, data handling, or ownership.
Output contract
When editing, deliver:
- the requested instruction file or files;
- a short scope summary naming which directories and runtimes they govern;
- a command table with verification labels;
- conflicts resolved, preserved, or still requiring a decision;
- any facts deliberately omitted because they were unverified or too volatile.
Keep files concise enough to scan, but let repository complexity determine length. Prefer concrete imperatives and paths over explanatory essays.
Verify
After writing:
- Re-read every instruction file that applies to each edited location and confirm precedence is coherent.
- Confirm every path, script name, package name, port, and environment-variable name exists in repository evidence.
- Re-run the safe commands used as acceptance checks, or label them accurately when full execution was unavailable.
- Confirm nested files contain only scope-specific differences and do not contradict inherited rules.
- Check runtime-specific syntax against an existing valid file, an installed validator, or current official runtime documentation. If none is available, label syntax as unverified rather than presenting it as established.
- Compare the final file with the evidence map and remove unsupported claims, generic agent advice, and duplicated repository documentation.
- Report verification results and limitations; do not describe a documented-only command as tested.
Put this skill to work
Learn a workflow. Take the skill with you.
Claude app, ChatGPT and ZIP download
local coding agent required
This skill requires project files and terminal commands. Uploading it to a chat app does not provide equivalent execution.
ChatGPT Skills
This workflow needs a local coding environment or capabilities that a chat-only Skills upload does not provide.
Package details
- Package
- agent-instructions/SKILL.md
- Author
- @tushaarmehtaa
- Added
- 16 Jun 2026
- Tags