agentleFS
mikejhillmikejhill/agent-skills/skills/agent-context/SKILL.md

agent-context

Skill0 starsChanged 2 days agoMITView on GitHub

Standards for writing and reviewing agent context: skills (SKILL.md folders), instruction files, agent definitions, prompt files, AGENTS.md, and CLAUDE.md. Use whenever you create, revise, rename, or review any of these, or judge whether one is well built.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 14 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write agent context that loads only when needed, says only what an agent would get wrong, and runs in any harness.

    line 12
  2. Distinctive:

    Prefer a skill to an instruction file unless the rule applies to all work.

    line 27
  3. Distinctive:

    Prefer a skill to a prompt.

    line 28
  4. Distinctive:

    Use a hook, not text, when an action must happen every time.

    line 29
  5. Very specific:

    Use a noun phrase for a feature that covers a subject: go-development, release-process, api-design.

    line 42
  6. Very specific:

    Use verb-object only for a feature that performs one explicit action: deploy-preview, rotate-keys.

    line 43
  7. Very specific:

    Do not use gerunds: managing-secrets becomes secret-management.

    line 44
  8. Distinctive:

    Write one to three sentences, aiming for 300 characters or fewer.

    line 51
  9. Distinctive:

    Do not list every feature, market it, or repeat the name.

    line 54
  10. Distinctive:

    Test it: from the name and description alone, an agent must answer yes or no correctly for five realistic requests, including two …

    line 55
  11. Distinctive:

    Write for a capable agent.

    line 59
  12. Distinctive:

    Prefer lists, tables, and one sharp example over prose or several examples.

    line 62
  13. Distinctive:

    Do not restate what a formatter, linter, or script enforces.

    line 63
  14. Distinctive:

    Keep it harness-neutral. Say "run", "read", or "edit", not harness tool names, slash commands, invocation syntax, or harness paths.

    line 64
  15. Distinctive:

    Put the most important rule first.

    line 65
  16. Distinctive:

    Never name another skill, instruction file, or agent as a dependency or a source of rules.

    line 71
  17. Distinctive:

    Never contradict another always-on file.

    line 75

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Agent context

Write agent context that loads only when needed, says only what an agent would get wrong, and runs in any harness. This file holds the rules every feature type shares. Read the reference for the type you are working on.

Feature types

Pick the narrowest type that fits.

NeedTypePortable formRead
On-demand capability or rules for one language, file type, or task, optionally with scripts or referencesSkillskills/<name>/SKILL.mdskills.md
Rules for every task in one repositoryRepository instructionsAGENTS.md at the repository rootrepository-instructions.md
Rules for all work across repositoriesInstruction file<name>.instructions.mdinstructions.md
A role with its own context, scope, or tool limitsAgent<name>.agent.mdagent-definitions.md
A short, explicit, user-run taskPrompt<name>.prompt.mdprompts.md
A guaranteed action at a lifecycle eventHookHarness configuration, not an instruction set—
  • Prefer a skill to an instruction file unless the rule applies to all work. Always-on text costs context on every request; a skill costs only its description until it is used.
  • Prefer a skill to a prompt. A user-only skill does the same job and can carry files.
  • Use a hook, not text, when an action must happen every time. Instructions are advisory; hooks are enforced.

Workflow

  1. Choose the type from the table above and read its reference. Apply only the files and checks that type requires; for example, AGENTS.md and CLAUDE.md have fixed names and no intent file.
  2. Intent first, where the type has an intent file. For a new feature, write it from the user's ask before anything else, keeping their words for goals and requirements. If one already exists, build from it and leave it unedited. For an existing feature, read the intent file first, then append a log entry after changing the feature. If it has none, a review only reports that it is missing; a revision adds one, built from the user's stated asks and the feature's history, with anything inferred marked [agent]. See readme-and-intent.md.
  3. Name it (Naming), unless the type has a fixed name.
  4. Write the body, then the description last (for types that have one), once the body is settled.
  5. Validate with the Checklist and the type's own checks.

Naming

  • Lowercase letters, digits, and single hyphens. Two or three words. A skill's name must also equal its folder name.
  • Use a noun phrase for a feature that covers a subject: go-development, release-process, api-design.
  • Use verb-object only for a feature that performs one explicit action: deploy-preview, rotate-keys.
  • Do not use gerunds: managing-secrets becomes secret-management.
  • Drop filler such as helper, utils, tool, or my.

Descriptions

The description is often the only text an agent sees before it decides to load or delegate. It must make that decision immediate.

  • Write one to three sentences, aiming for 300 characters or fewer.
  • First, say what the feature does or covers, in the nouns users actually type.
  • Then add "Use when …" with concrete triggers. Add "Not for …" only when a neighbouring feature could be confused with this one.
  • Do not list every feature, market it, or repeat the name.
  • Test it: from the name and description alone, an agent must answer yes or no correctly for five realistic requests, including two near-misses.

Writing style

  • Write for a capable agent. Include only what it would get wrong without being told. Cut background, motivation, and generic advice.
  • Give a rule, and add the reason in a clause when the reason is not obvious. Use plain imperatives. Do not use all-caps MUST, banned-word lists, or personas.
  • There is no mandatory section template. Use the sections the task needs.
  • Prefer lists, tables, and one sharp example over prose or several examples.
  • Do not restate what a formatter, linter, or script enforces. Name the tool instead.
  • Keep it harness-neutral. Say "run", "read", or "edit", not harness tool names, slash commands, invocation syntax, or harness paths. If a feature truly needs one harness, say so where users will see it.
  • Put the most important rule first. Agents weigh early text more, and long files get skimmed.

Scope and composition

Each feature must stand alone. A user may install it without any of its neighbours.

  • Never name another skill, instruction file, or agent as a dependency or a source of rules. Refer to it by capability instead, for example "follow any standards the user has for Python development".
  • Exception: a prompt or instruction file whose only job is to invoke one specific feature, and which is distributed together with it, may name it. Say so in its description and intent file. Skills never take this exception; a skill must work when installed alone.
  • Cover only the feature's own subject. Do not set rules for adjacent domains, such as code style, testing, or commit conventions, that other features or user instructions may own. State only what this subject needs on top of them.
  • Copy a small piece of shared logic in, rather than linking to a file in another feature's folder.
  • Never contradict another always-on file. If two rules collide, fix the source, not the reader.

Checklist

  • The type is the narrowest that fits.
  • Every line is something a capable agent would otherwise get wrong. Nothing restates a tool, a linter, or another feature's subject.
  • No other feature is named as a dependency or source of rules, except by a prompt or instruction adapter distributed with its target.
  • Description test, for types with a description: five requests, including near-misses, are judged correctly from the description alone.
  • Harness-neutral, or the limit is stated where users see it.
  • npx markdownlint-cli2 passes, if the repository uses it.
  • The intent file, if the type has one, still matches. A new log entry records what changed and why.
  • The type reference's own checks pass.

References

  • skills.md: read when building or reviewing a skill. Covers layout, metadata, progressive disclosure, paths, scripts, and the checker.
  • metadata.md: read when setting a skill's invocation flags, compatibility, or harness sidecar files.
  • paths.md: read when a skill writes files outside the user's working files.
  • scripts.md: read when adding or changing a skill script.
  • cli.md: read when deciding whether a skill needs a CLI, or when a CLI needs config, credentials, subcommands, or more than about 300 lines.
  • instructions.md: read when writing an instruction file.
  • agent-definitions.md: read when writing an agent definition.
  • prompts.md: read when writing a prompt file.
  • repository-instructions.md: read when writing AGENTS.md, CLAUDE.md, or other repository-wide instructions.
  • readme-and-intent.md: read when writing or updating a README or intent file.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.