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.
npx agentmods add instructions/psecor/agent-wiki/agents-mdgit clone --depth 1 https://github.com/psecor/agent-wikiWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.04087 | $0.04087 |
| Opus 5 | $0.02044 | $0.02044 |
| Sonnet 5 | $0.00817 | $0.00817 |
| Haiku 4.5 | $0.00409 | $0.00409 |
Grade B, and why
agent-wiki 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 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
**Production updates:** `git pull && (cd service && npm install && npm run build) && (cd ui && npm install && npm run build) && sudo systemctl restart agent-wiki`. How it starts
The opening of the file, as written. The whole thing — 254 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — agent-wiki
What This Is
A documentation standard and supporting service for per-project agent-readable wikis. Each project in your workspace gets a single AGENTS.md describing intent, architecture, deployment, gotchas, and cross-project links. This repo defines the spec, hosts cross-cutting topics, and runs a small read-only browser/API.
Status
Spec + indexer + server + UI + sweeper. All pieces working:
- Spec defined (spec/schema.md), template (spec/template.md), topics tier rules (spec/topics.md).
- Indexer parses frontmatter + sections + links, validates, writes
index/{projects,topics,backlinks,search,validation}.json. Also writes generated backlinks footers back into sourceAGENTS.mdfiles (write_backlinks.ts). - Read-only HTTP API in
service/src/server/with Google OAuth (allowlist) + file-based sessions, mounted atPATH_PREFIX(default/wiki). JSON endpoints for projects, topics, search, validation, raw doc bodies. - React + Vite UI in
ui/, served by the Express process fromui/dist/. Pages: Home, Project, Topic, Search, Validation, Login. Markdown rendered withreact-markdown+remark-gfm; cross-doc links rewritten to in-app routes. - Sweeper service in
service/src/sweeper/: gathers per-project git activity sincelast_updated, calls the Claude API (streaming, 32k max_tokens, string-aware brace-counter parser), applies section-level patches, updates frontmatter. CLI supports per-project runs,--allfan-out, and--dry-run. - Optional automation: a daily user-mode systemd timer (
agent-wiki-sweeper.timer) runssweeper --all && indexer build; a Claude Code Stop-hook (deploy/sweep-on-stop.sh) fires per-project sweeps async, debounced to 60 min/project.
Repository Layout
agent-wiki/
├── AGENTS.md this file (own dogfood)
├── README.md human-facing intro
├── LICENSE MIT
├── spec/
│ ├── schema.md the AGENTS.md spec — sections, frontmatter, links
│ ├── template.md starter file for new projects
│ ├── initial-AGENTS.md minimal bootstrap doc for programmatic project init
│ └── topics.md when to use a topic vs a project gotcha
├── topics/ cross-cutting knowledge files (scaffolded; populate as needed)
├── index/ generated by the indexer (gitignored)
│ ├── projects.json per-project metadata, sections, links
│ ├── topics.json per-topic metadata
│ ├── backlinks.json reverse link graph
│ ├── search.json flat per-section search entries
│ └── validation.json spec-compliance issues
├── service/ Node + TypeScript backend
│ ├── package.json
│ ├── tsconfig.json
│ ├── .env.example copy to .env and fill in for deploy
│ └── src/
│ ├── indexer/ build index/*.json from AGENTS.md files
│ │ ├── cli.ts CLI: build | validate
│ │ ├── build.ts orchestration
│ │ ├── parse.ts frontmatter, sections, links
│ │ ├── validate.ts spec-compliance checks
│ │ ├── write_backlinks.ts rewrite generated backlinks footers in source files
│ │ ├── types.ts shared types + canonical section list
│ │ └── sources/ Source interface + filesystem impl
│ │ ├── types.ts pluggable for future GitHub-backed source
│ │ └── fs.ts walks PROJECTS_ROOT
│ ├── server/ Express + Passport (Google OAuth) + JSON API
│ │ ├── index.ts app entry; mounts PATH_PREFIX, listens on PORT
│ │ ├── config.ts env-driven config; required()/optional()
│ │ ├── auth.ts Google OAuth + ALLOWED_EMAILS allowlist
│ │ ├── api.ts JSON endpoints under /api
│ │ └── data.ts reads index JSON + raw markdown (path-traversal safe)
│ └── sweeper/ per-project doc maintenance via Claude API
│ ├── cli.ts CLI: run | dry-run; per-project or all
│ ├── run.ts orchestrates one project's sweep
│ ├── gather.ts git log + diffstat + changed files since last_updated
│ ├── prompt.ts assembles the system + user prompt
│ ├── claude.ts Claude API client wrapper
│ ├── apply.ts applies section-level patches + frontmatter updates
│ ├── diff.ts shows the proposed change
│ └── types.ts shared sweeper types
├── ui/ React + Vite SPA, served by the backend
│ ├── package.json
│ ├── vite.config.ts base: PATH_PREFIX, dev proxy → backend
│ ├── index.html
│ └── src/
│ ├── main.tsx BrowserRouter basename=PATH_PREFIX
│ ├── App.tsx auth gate + routes
│ ├── api.ts typed fetch client for ${PATH_PREFIX}/api/*
│ ├── styles.css
│ ├── components/
│ │ ├── Layout.tsx topbar + search box + nav + user
│ │ └── Markdown.tsx react-markdown w/ in-app link rewriting
│ └── pages/ Home, Project, Topic, Search, Validation, Login
└── deploy/
├── agent-wiki.service systemd unit for the web service (hardened)
├── agent-wiki-sweeper.service user-mode unit invoked by the timer / Stop-hook
├── agent-wiki-sweeper.timer daily 03:00 fan-out sweep + reindex
├── run-daily.sh timer entrypoint: sweeper --all then indexer build
├── sweep-on-stop.sh Claude Code Stop-hook: debounced async per-project sweep
├── sweep-project.sh single-project sweep helper used by hook + systemd-run
├── apache.conf ProxyPass example
└── setup.md step-by-step install walkthrough
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.
- 2d ago First seen · 254 lines · 4,087 tokens per session scan B cb0b4b5215ca
agent-wiki AGENTS.md is an instructions file published in the GitHub repository psecor/agent-wiki (2 stars, last pushed 2mo ago), licensed MIT. It adds 4,087 tokens to every session, about $0.0204 per session on Opus 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-31.
Other instructions, from other repositories
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.
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).
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.
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.
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).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.