wife: Instructions file for Claude Code

AGENTS.md

wife AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from ma-nucho-pro/wife. It costs 744 tokens per session, scanned B, original, MIT.

Project instructions for Wife, a local memory layer for coding agents. The file tells Codex how to install the project, where important code lives, and which checks must pass after changes.

In plain words
What is it for?
Use it when installing Wife, attaching it to Codex, modifying its source, locating core modules, or verifying unit, end-to-end, synchronization, and multi-agent tests.
Why use it?
It keeps work on the project consistent with its required setup and testing rules. It also helps locate the code responsible for extracting, storing, and scoring memories.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: PreToolUse hook event, but also the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is ma-nucho-pro/wife's own configuration. It tells Claude Code, Codex and OpenCode how to work on wife itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything wife configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ma-nucho-pro/wife. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ma-nucho-pro/wife/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ma-nucho-pro/wife

Made for: Claude Code, Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wife AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ma-nucho-pro/wife/agents-md/github.svg)](https://agentmods.dev/instructions/ma-nucho-pro/wife/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/ma-nucho-pro/wife/agents-md"><img src="https://agentmods.dev/badge/instructions/ma-nucho-pro/wife/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wife AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ma-nucho-pro/wife/agents-md"><img src="https://agentmods.dev/badge/instructions/ma-nucho-pro/wife/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 744 This file is loaded in full into every session.
When invoked 744 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00744 $0.00744
Opus 5.5 $0.00298 $0.00298
Sonnet 5.5 $0.00149 $0.00149
Haiku 4.5 $0.00074 $0.00074

Measured 1mo ago against content hash 78659749580d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

wife AGENTS.md scanned grade B with 1 finding 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 1mo 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

for sudo — the usual cause is that npm's global bin directory is not on PATH.
AGENTS.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.

Wife — shared instructions for coding agents

This is Wife's canonical repository instruction file. The repository is intentionally AGENTS.md-first: Claude Code 2.1.77+ and Codex can read this file directly. There is no root CLAUDE.md, so Claude Code can take this file through its AGENTS discovery path instead of preferring a legacy file.

Wife is a local memory layer for coding agents. It has zero runtime dependencies and no build step: the source in src/ is what runs.

If the user wants to install it

Run these, in this order, from this folder:

npm link            # puts the `wife` command on their PATH
wife init           # creates ~/.wife
wife attach claude  # or: wife attach codex
wife status         # confirm, then show them the output

Then tell them to restart their agent so the hooks load.

wife attach merges into the existing settings file and removes nothing. If npm link fails with a permission error, report it rather than reaching for sudo — the usual cause is that npm's global bin directory is not on PATH.

If the user wants to change something

Run npm run check before and after. It covers the unit, end-to-end, multi-machine sync and multi-agent suites, and it must stay green. New behaviour needs a new test.

Where things live:

  • src/core/extract.js — the pattern rules that turn prompts into candidate facts, plus the rejection filters. Most feature requests land here.
  • src/core/store.js — markdown file plus metadata sidecar, scoring, pruning. Hand edits to the markdown always win over the sidecar.
  • src/core/harvest.js — the curator: extract, gate, reconcile, retire, prune.
  • src/core/import.js — seeding from existing CLAUDE.md / AGENTS.md. Screens for credentials BEFORE any text cleanup; reversing that order once let a token through, because stripping markdown emphasis also ate the underscore.
  • src/core/crossproject.js — the only state that spans repos.
  • src/core/guards.js — rules that a PreToolUse hook can enforce. Guards must FAIL OPEN and must never be created without the user approving each one. A description ("Uses pnpm") is not a prohibition and must never become a guard.
  • src/core/merge.js + src/commands/gitsync.js — multi-machine sync. Two traps live here: merge=ours is NOT a git built-in and must be defined as a driver or every sync dies on a markdown conflict; and markdown must be DELETED before regenerating from a merged index, or Store.load re-adopts facts the other machine deliberately deleted.
  • src/agents/ — one file per agent integration.
  • src/commands/hooks.js — code that runs inside a hook. It must never exit non-zero and must never print anything unexpected to stdout.

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. 1mo ago Changed · +6 lines · +68 tokens per session 78659749580d
  2. 1mo ago First seen · 59 lines · 676 tokens per session scan B d377d91e2cb1

Subscribe to this mod's changes

wife AGENTS.md is an instructions file published in the GitHub repository ma-nucho-pro/wife (69 stars, last pushed 1mo ago), licensed MIT. It adds 744 tokens to every session, about $0.0030 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories