instruction-files

A set of rules for using agent instruction files as short startup documents rather than as the main memory store. It distinguishes shared rules in AGENTS.md from host-specific files such as CLAUDE.md or .cursor/rules/.

In plain words
What is it for?
Use it to organize shared policies, provider-specific rules, scoped instructions, and links to canonical documentation.
Why use it?
It prevents instruction files from becoming long, duplicated, and inconsistent across coding-agent tools.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/yanamorelli/universal-memory/instruction-files
Clone the repo
git clone --depth 1 https://github.com/YanAmorelli/universal-memory
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 593 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00593
Opus 5 $0.00000 $0.00296
Sonnet 5 $0.00000 $0.00119
Haiku 4.5 $0.00000 $0.00059

Measured 2d ago against content hash e184ac5c1b5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

instruction-files scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/instruction-files.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Instruction Files

Universal Memory treats instruction files as bootstrap documents, not as the memory database itself.

Instruction files should stay compact and point agents to the right operating surface. They should not accumulate raw facts, long history, or duplicated provider-specific rules.

Shared Manifest

AGENTS.md is the shared cross-host manifesto. It should contain stable operational rules, memory bootstrap instructions, and pointers to specialized documentation.

For hosts that understand AGENTS.md, this is the preferred shared target.

Provider Deltas

Provider-specific files should hold only the rules that cannot fit in the shared manifest:

Host Typical Target
Claude Code CLAUDE.md, .claude/
OpenCode AGENTS.md, .opencode/
Codex AGENTS.md
Cursor .cursor/rules/
Gemini or Antigravity GEMINI.md, .gemini/

The product architecture classifies instruction updates as shared policy, provider delta, scoped rule, or canonical documentation. That classification prevents accidental drift between hosts.

Agent Rule

Agents should not edit instruction files directly as the normal memory workflow. They should use the Universal Memory CLI or MCP surface so mutations can pass through validation, secret scanning, snapshots, audit logging, and rollback.

Use instruction files as entrypoints: they should tell the agent how to bootstrap UMEM, where to retrieve current context, and which operating skill to follow. Durable facts belong in UMEM memory, and reusable procedures belong in canonical UMEM skills.

UMEM Paths

Instruction files should point to UMEM; they should not duplicate the contents of UMEM stores.

Path Responsibility
AGENTS.md Shared bootstrap policy and pointers for agents.
umem/project.toml Shared-layout metadata and approved shared operational skill slugs.
umem/memory/ Reviewable project facts and rules intended for collaborators.
umem/skills/ Reviewable shared project skills.
.umem/config.toml Local project runtime configuration.
.umem/memory/ Legacy project memory plus private project facts and rules.
.umem/skills/ Legacy, private, and operational project skills.
.umem/audit/, .umem/snapshots/, .umem/locks/ Private operational state that should not be published by default.

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 65 lines · 0 tokens per session scan A e184ac5c1b5c

Subscribe to this mod's changes

instruction-files is an agent published in the GitHub repository YanAmorelli/universal-memory (6 stars, last pushed 7d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 593 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.