agentleFS
ImYourBoyRoyImYourBoyRoy/agent-continuity-stack/skills/maintain-agent-instructions/SKILL.md

maintain-agent-instructions

Skill1 starsChanged 4 months agoMITView on GitHub

Create, audit, or edit required project agent instructions and durable Codex, Cursor, Claude Code, or Antigravity guidance. Use for missing AGENTS.md, global contracts, CLAUDE.md, and Rules while preserving precedence, privacy, and rollback.

1 other project uses 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

26 rules. About 0 are common, 23 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈23

    Distinctive · estimate

    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:

    Keep durable guidance scoped, verifiable, and distinct from on-demand procedures.

    line 8
  2. Distinctive:

    Read current first-party discovery and precedence documentation when behavior may have changed.

    line 16
  3. Distinctive:

    Ask each available client to summarize loaded instruction sources when a safe diagnostic exists.

    line 20
  4. Distinctive:

    Treat undocumented filenames as ordinary documentation unless configuration proves the client loads them.

    line 22
  5. Very specific:

    Use references/client-routing.md for the surface map, then verify current paths rather than assuming the reference is timeless.

    line 32
  6. Very specific:

    Every maintained project requires one canonical project agent instruction file.

    line 42
  7. Distinctive:

    If no canonical project file exists, create root AGENTS.md unless:

    line 46
  8. Distinctive:

    Keep current task state, session history, large backlogs, and deep architecture in their proper artifacts.

    line 71
  9. Distinctive:

    Do not maintain independently edited copies merely for symmetry.

    line 88
  10. Distinctive:

    Follow the host's actual precedence rather than inventing a universal order.

    line 95
  11. Distinctive:

    Keep stronger managed and repository policy intact.

    line 96
  12. Distinctive:

    Avoid instruction loops such as two files declaring each other authoritative.

    line 98
  13. Distinctive:

    Keep commands beside the repository that owns them.

    line 99
  14. Distinctive:

    Do not put project-specific hosts, devices, paths, package identifiers, or release commands in a public global core.

    line 100
  15. Distinctive:

    Never overwrite managed policy.

    line 102
  16. Very specific:

    Read references/instruction-review.md before consolidating large instruction sets.

    line 106
  17. Distinctive:

    Keep public package sources and shared core Skills portable.

    line 111
  18. Distinctive:

    Use placeholders only in user-facing templates that require configuration.

    line 125
  19. Distinctive:

    Prefer repository discovery over persistent placeholders when values already exist in project metadata.

    line 126
  20. Distinctive:

    Write through a same-directory temporary file and atomic replacement when the platform supports it.

    line 135
  21. Distinctive:

    Check file size, import behavior, aggregate limits, and truncation limits.

    line 139
  22. Distinctive:

    Start a new session and test the contract identity, one representative rule, and one intended repository override.

    line 141
  23. Distinctive:

    Verify procedures activate through skills rather than bloating every session.

    line 143
  24. Distinctive:

    Search for duplicated, stale, contradictory, personal, and machine-specific content.

    line 144
  25. Distinctive:

    If any selected client does not load the complete contract, classify that client as failed or installed-unverified rather than silently …

    line 148
  26. Distinctive:

    Do not discard unrelated repository or user changes.

    line 151

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Maintain Agent Instructions

Keep durable guidance scoped, verifiable, and distinct from on-demand procedures. When this package's Expert Agent Operating Contract is in scope, preserve the complete canonical contract; its size alone is not a reason to replace it with a summary.

Discover before mutation

  1. Identify the clients and versions in scope.
  2. Read current first-party discovery and precedence documentation when behavior may have changed.
  3. Inventory global, repository, nested, override, rule, and managed-policy sources actually visible to those clients.
  4. Ask each available client to summarize loaded instruction sources when a safe diagnostic exists.
  5. Treat undocumented filenames as ordinary documentation unless configuration proves the client loads them.
  6. Report the discovered sources, owners, precedence, conflicts, and proposed exact targets before editing.

For an installation or update of this package, read the package INSTALL_PROTOCOL.md and instruction-pack.json. Status inspection is the default. Do not mutate live user-global instructions without explicit authorization for the named clients and targets.

Use references/client-routing.md for the surface map, then verify current paths rather than assuming the reference is timeless.

Discovery and audit are read-only. Require explicit authorization for the exact files and scopes to create, merge, move, or replace. Authorization for a repository file does not imply authorization for global, managed, or sibling repository guidance.

Establish the project instruction foundation

Every maintained project requires one canonical project agent instruction file. Resolve the repository root and inspect AGENTS.md, AGENT.md, supported client adapters, and nested instruction files.

If no canonical project file exists, create root AGENTS.md unless:

  • the current request is strictly read-only;
  • repository policy forbids the change; or
  • the repository explicitly establishes another canonical filename.

In those cases, report the missing or alternate foundation. Prefer AGENTS.md for portable project guidance. Do not maintain independent, contradictory AGENT.md and AGENTS.md bodies; when compatibility requires both, keep one as a concise router to the declared canonical file. For Claude Code, a root CLAUDE.md may use the documented @AGENTS.md import so both current and older Claude Code sessions receive the canonical instructions. Do not duplicate the full file. Check whether the client already loads AGENTS.md directly and verify the import in a fresh session.

Include only applicable durable repository guidance:

  • purpose, boundary, and important entry points;
  • supported build, test, packaging, release, and deployment workflows;
  • remote-only, platform-specific, or resource restrictions;
  • generated, protected, private, or externally managed paths;
  • architectural invariants and recurring hazards;
  • project-local skills, tools, subagents, and runbooks;
  • mutation, approval, documentation, and memory responsibilities.

Keep current task state, session history, large backlogs, and deep architecture in their proper artifacts. Update project instructions when durable workflow, safety, validation, architecture, or tooling rules change.

Classify every instruction

Place:

  • the complete approved operator contract in supported user-global guidance
  • other personal interaction preferences in supported user-global guidance
  • repository-wide commands and constraints at the repository root
  • subtree-specific rules near the governed code
  • reusable multi-step procedures in Agent Skills
  • deterministic enforcement in linters, hooks, CI, or scripts
  • live external data and actions behind authorized integrations
  • temporary constraints in the current prompt or thread

Do not maintain independently edited copies merely for symmetry. Use one canonical content source plus the smallest required client adapters. An adapter may contain a rendered copy when the host cannot import the canonical source; verify it against the source hash.

Preserve precedence and ownership

  • Follow the host's actual precedence rather than inventing a universal order.
  • Keep stronger managed and repository policy intact.
  • Resolve contradictions explicitly.
  • Avoid instruction loops such as two files declaring each other authoritative.
  • Keep commands beside the repository that owns them.
  • Do not put project-specific hosts, devices, paths, package identifiers, or release commands in a public global core.
  • Never overwrite managed policy. Treat system-, administrator-, organization-, and client-managed guidance as read-only unless its own management surface is explicitly in scope.

Read references/instruction-review.md before consolidating large instruction sets.

Protect portability and privacy

Keep public package sources and shared core Skills portable. Do not embed the maintainer's personal profile in them. For user-specific rendered global instructions, include only explicit user-provided or user-designated values after the required disclosure and review.

Exclude from public package sources and shared core Skills:

  • personal names, usernames, emails, profiles, and home paths
  • credentials, tokens, private keys, and environment dumps
  • private hosts, IP addresses, device IDs, and internal project schemas
  • assumed client-only tools without a capability fallback
  • claims that an instruction file outranks system, administrator, or user policy

Use placeholders only in user-facing templates that require configuration. Prefer repository discovery over persistent placeholders when values already exist in project metadata. For the optional operator profile, run scripts/render_contract.py with explicit values and validate its output with scripts/inspect_contract.py rendered; never copy the raw template into a client or leave unanswered placeholder bullets in installed instructions.

Validate

  • Capture original content, permissions, and hashes for every authorized target.
  • Write through a same-directory temporary file and atomic replacement when the platform supports it.
  • Preserve a restorable backup or version-control rollback before replacement.
  • Inspect the before-and-after diff and reject unrelated instruction churn.
  • Check file size, import behavior, aggregate limits, and truncation limits.
  • Confirm the intended client discovers the file.
  • Start a new session and test the contract identity, one representative rule, and one intended repository override.
  • Verify procedures activate through skills rather than bloating every session.
  • Search for duplicated, stale, contradictory, personal, and machine-specific content.
  • Report clients that could not be runtime-tested.

If any selected client does not load the complete contract, classify that client as failed or installed-unverified rather than silently accepting a summary. Restore only files changed by this operation when rollback is needed. Do not discard unrelated repository or user changes. Report the recovery location and any global or managed sources left untouched.

Output

Report instruction sources, scope and precedence, rules retained or moved, conflicts resolved, client adapters, privacy scan, runtime evidence, and remaining compatibility uncertainty.

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.