wife: Instructions file for Claude Code

CLAUDE.md

wife CLAUDE.md is an instructions file for Claude Code from ma-nucho-pro/wife. It costs 670 tokens per session, scanned B, a copy of wife AGENTS.md, MIT.

Project instructions for Wife, a local memory layer for coding agents. It stores useful facts from conversations and provides rules for installing or changing the project.

In plain words
What is it for?
Use it when installing Wife, attaching it to Codex or Claude, checking its status, changing memory extraction or storage behavior, or running its test suites.
Why use it?
It gives the agent project-specific guidance so installation and code changes follow the expected process. It also requires checks to stay passing when behavior changes.

Instructions file for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

This is ma-nucho-pro/wife's own configuration. It tells Claude Code 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/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ma-nucho-pro/wife

Made for: Claude Code.

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 CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ma-nucho-pro/wife/claude-md/github.svg)](https://agentmods.dev/instructions/ma-nucho-pro/wife/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ma-nucho-pro/wife/claude-md"><img src="https://agentmods.dev/badge/instructions/ma-nucho-pro/wife/claude-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 CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ma-nucho-pro/wife/claude-md"><img src="https://agentmods.dev/badge/instructions/ma-nucho-pro/wife/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 670 This file is loaded in full into every session.
When invoked 670 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 97% copy Near-identical to another mod 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.00670 $0.00670
Opus 5 $0.00335 $0.00335
Sonnet 5 $0.00134 $0.00134
Haiku 4.5 $0.00067 $0.00067

Measured 11d ago against content hash e9f890f8089d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

wife CLAUDE.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 11d 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.
Origin

This is a copy

97% identical to wife AGENTS.md — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 59 lines

How it starts

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

Wife — notes for the agent reading this

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 · 59 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. 11d ago First seen · 59 lines · 670 tokens per session scan B e9f890f8089d

Subscribe to this mod's changes

wife CLAUDE.md is an instructions file published in the GitHub repository ma-nucho-pro/wife (55 stars, last pushed 21d ago), licensed MIT. It adds 670 tokens to every session, about $0.0034 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). It is 97% identical to wife AGENTS.md, differing in 2 lines, and is treated as a copy.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens