guild AGENTS.md

Contributor instructions for Guild, a Go program whose MCP server provides rules and tools for managing project knowledge, tasks, and work sessions. They specify how contributors should start a session and use Guild's tools.

In plain words
What is it for?
Use them when contributing to Guild, starting a development session, checking project lore or tasks, or running its formatting, linting, SQL, and test checks.
Why use it?
They ensure work begins with the project's current briefing and that Guild operations follow its tool and data-handling rules.

Instructions file for CodexOpenCode

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 instructions/mathomhaus/guild/agents-md
Clone the repo
git clone --depth 1 https://github.com/mathomhaus/guild

Made for: Codex, OpenCode.

Per session 698 This file is loaded in full into every session.
When invoked 698 The same file — it is already loaded in full.
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.00698 $0.00698
Opus 5 $0.00349 $0.00349
Sonnet 5 $0.00140 $0.00140
Haiku 4.5 $0.00070 $0.00070

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

Security

Grade A, and why

guild AGENTS.md 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.

AGENTS.md · 69 lines

How it starts

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

guild — agent bootstrap

This is the source repo for the guild binary. The MCP server's INSTRUCTIONS string (loaded when an MCP client connects to guild) carries the full operating contract — tool discipline, kind taxonomy, autonomy rules, narration. This file only adds repo-specific context for contributors.

First action — bootstrap guild MCP

mcp__guild__guild_session_start(project="guild")

Surfaces the last briefing + oath + top bounty for work on this repo. Every subsequent guild MCP tool inherits project="guild" automatically.

Repo facts

  • Module: github.com/mathomhaus/guild
  • Language: Go 1.25+
  • Main libs: spf13/cobra, log/slog, modernc.org/sqlite (pure-Go), github.com/modelcontextprotocol/go-sdk v1.5.0
  • Entry points: cmd/guild/main.go, cmd/sqlcheck/main.go
  • Test gate: make check (fmt + vet + lint + sqlcheck + test-race)
  • CI reproducer: make ci
  • Release: goreleaser via make release-snapshot locally or v*.. tag push

Tool discipline

  • Use guild MCP tools (mcp__guild__*) for all guild operations
  • Bash CLI (guild lore ..., guild quest ...) only as last resort if MCP is unrecoverable
  • Never bypass the tool to write raw SQL against ~/.guild/*.db

When onboarding

Contributors new to the repo should also skim:

  • README.md — install + setup from an end-user perspective
  • Makefile — the canonical developer commands (make help for the list)
  • internal/mcp/instructions.go — the constant string every MCP client reads on connect

guild workflow

guild coordinates tasks (quest) and persistent knowledge (lore) across sessions and agents.

BEFORE ANY OTHER ACTION — before reading files, editing code, or responding to the user — call the MCP tool guild_session_start(project="guild"). It returns the full agent contract, active principles (oath), and the current top bounty. Follow what it returns.

If guild_session_start is not visible in your tool list, run your host's tool-search for guild first — some hosts lazy-load MCP tools. Do NOT fall back to CLI; the MCP server is available.

Read the full file on GitHub · 69 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 · 69 lines · 698 tokens per session scan A 5278fb2a2b8f

Subscribe to this mod's changes

guild AGENTS.md is an instructions file published in the GitHub repository mathomhaus/guild (304 stars, last pushed 6d ago), licensed Apache-2.0. It adds 698 tokens to every session, about $0.0035 per session on Opus 5. 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-30.