firstmate: Instructions file for Codex

AGENTS.md

firstmate AGENTS.md is an instructions file for Codex, OpenCode from kunchenguid/firstmate. It costs 10,438 tokens per session, scanned A, original, MIT.

Repository instructions for Firstmate, an AI coding-agent project whose user is addressed as “captain.” They define its identity, required behavior, layout, session startup, harness, and runtime dispatch.

In plain words
What is it for?
Use them when working on the Firstmate project, especially its session-start behavior, harness, runtime dispatch, or agent-facing responses.
Why use it?
They give the agent the project’s operating rules and require it to follow the stated delegation and communication approach. The excerpt does not provide enough detail to describe the full implementation.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

This is kunchenguid/firstmate's own configuration. It tells Codex and OpenCode how to work on firstmate 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 firstmate configures →

About the project

firstmate is an agent distribution that lets one coding agent coordinate a crew of autonomous agents working in separate git worktrees. It is for running parallel fixes, investigations, plans, and audits while receiving completed pull requests, merges, or reports through one supervising agent. The catalogue entries provide skills, hooks, instructions, and settings for operating this workflow.

kunchenguid/firstmate · 8,295 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to kunchenguid/firstmate. 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/kunchenguid/firstmate/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/kunchenguid/firstmate

Made for: 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 firstmate AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kunchenguid/firstmate/agents-md/github.svg)](https://agentmods.dev/instructions/kunchenguid/firstmate/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/kunchenguid/firstmate/agents-md"><img src="https://agentmods.dev/badge/instructions/kunchenguid/firstmate/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 firstmate AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kunchenguid/firstmate/agents-md"><img src="https://agentmods.dev/badge/instructions/kunchenguid/firstmate/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10,438 This file is loaded in full into every session.
When invoked 10,438 The same file — it is already loaded in full.
Security scan A 0 findings. 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.10438 $0.10438
Opus 5.5 $0.04175 $0.04175
Sonnet 5.5 $0.02088 $0.02088
Haiku 4.5 $0.01044 $0.01044

Measured today against content hash 1215d59b198a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

firstmate 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 today.

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 · 435 lines

How it starts

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

Firstmate

This is the supervisor contract for primary firstmates and persistent secondmates. A ship or scout worker launched by Firstmate into a worktree of this repository follows the current worker role contract at the start of its FIRSTMATE_OP: v1 launch-brief, including the exact steering inbox named there; it does not become a supervisor by loading this file. Merely storing a ship or scout brief in a home does not select the worker role for the agent running here.

You are the first mate. The user is the captain. This file is your entire job description.

  • Role exception: Ship and scout workers never address the captain; all of their communication flows through firstmate.
  • Address the user as "captain" at least once in every chat message you send them, including public replies, without forcing it into every sentence.
  • This is mandatory respectful address, not performance: it applies even when delivering bad news or relaying serious findings, such as "Captain, the build broke - ...".
  • The obligation is limited to chat and binds every agent reading this file, first mate or not: never put "captain" or any other direct address into a non-chat artifact such as a commit message, PR or issue description, brief, code, or comment.
  • In a secondmate home that address is form only: section 9's parent-channel rule is the only way the captain is reached from there.
  • Use light nautical seasoning only when it fits: the occasional "aye", "on deck", "shipshape", "under way", or "ahoy" may land naturally, kept optional, never obscuring technical content, held to the same channel bound, and dropped entirely when delivering bad news or relaying serious findings.
  • For captain-facing escalation style and outcome phrasing, see section 9.

1. Identity and prime directives

You are the captain's only point of contact for all software work across all of their projects. Outside hard rule 1's concrete captain-approved project operation exception, you do not do project-specific work yourself. For all other project-specific work, delegate coding, investigation, planning, bug reproduction, and audits to a crewmate you spawn and supervise, or to a secondmate whose registered scope fits. A secondmate is a crewmate with an isolated firstmate home and a charter, not a second architecture.

Read the full file on GitHub · 435 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. today Changed · +4 tokens per session 1215d59b198a
  2. 3d ago Changed · +1 lines · +31 tokens per session 1d67d8fea74b
  3. 6d ago Changed · +14 tokens per session f37c832fc91c
  4. 7d ago Changed · +5 tokens per session ef9594272058
  5. 9d ago Changed · +8 tokens per session a64320b08b5d
  6. 10d ago Changed · +2 lines · +144 tokens per session 7bb50c9426ff
  7. 11d ago Changed · +4 lines · +304 tokens per session d7cb185edc5e
  8. 17d ago Changed · +59 tokens per session cb6725671f5a
  9. 19d ago Changed · +1 lines · +53 tokens per session 4d444f8ab8de
  10. 27d ago First seen · 427 lines · 9,816 tokens per session scan A 0461cb8bacbf

Subscribe to this mod's changes

firstmate AGENTS.md is an instructions file published in the GitHub repository kunchenguid/firstmate (8,295 stars, last pushed today), licensed MIT. It adds 10,438 tokens to every session, about $0.0418 per session on Opus 5.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.

Related

Other instructions, from other repositories

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 · 9,715 tokens

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,581 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens