sheep AGENTS.md

sheep AGENTS.md is an instructions file for Codex, OpenCode from gokay-ai/sheep. It costs 5,189 tokens per session, scanned A, original, MIT.

Repository instructions for Sheep, a tool that creates restorable checkpoints for AI coding-agent work. It can rewind a worktree—the project folder and its version-controlled files—to an earlier state after an agent makes a damaging change.

In plain words
What is it for?
Use them when changing Sheep’s source, running its command-line tool, or checking the required Rust, shell, formatting, and test commands.
Why use it?
They tell contributors how to build and test the project while highlighting safety rules for code that can overwrite other people’s files.

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/gokay-ai/sheep/agents-md
Clone the repo
git clone --depth 1 https://github.com/gokay-ai/sheep

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gokay-ai/sheep/agents-md.svg)](https://agentmods.dev/instructions/gokay-ai/sheep/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/gokay-ai/sheep/agents-md"><img src="https://agentmods.dev/badge/instructions/gokay-ai/sheep/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,189 This file is loaded in full into every session.
When invoked 5,189 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.05189 $0.05189
Opus 5 $0.02594 $0.02594
Sonnet 5 $0.01038 $0.01038
Haiku 4.5 $0.00519 $0.00519

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

Security

Grade A, and why

sheep 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 5d 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 · 230 lines

How it starts

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

AGENTS.md

Sheep is undo for AI coding agents: a herdr plugin that turns every agent turn into a restorable checkpoint, rewinds one worktree to before an agent broke things, and then tells that agent what was taken back. README.md is the user-facing version.

This file is the canonical instructions for anything working in this repository, human or agent. CLAUDE.md is a pointer to it and holds nothing of its own, so the two cannot drift.

Read this before you touch src/. Sheep overwrites files on other people's machines. One credible "sheep ate my uncommitted work" report ends the project, so parts of this codebase are not free to change. Those parts are marked below.


Build, test, check

cargo build                                             # target/debug/sheep
cargo test                                              # the whole suite; this is the gate
cargo clippy --all-targets -- -D warnings               # CI runs this on Linux and macOS
cargo fmt --check                                       # rustfmt.toml pins the style
shellcheck herdr-plugin/install.sh herdr-plugin/scripts/*.sh

Everything but cargo build is a CI gate (.github/workflows/ci.yml). Run at least cargo test and cargo clippy --all-targets -- -D warnings before you claim a change works; -D warnings fires on different code per platform, which is why CI runs both legs.

Rust 1.85 or newer, edition 2021, no unsafe, no build script. There is nothing to install beyond a toolchain and git on PATH.

The plugin half has its own two scripts, run by CI and runnable by hand:

bash herdr-plugin/scripts/test-install.sh     # installer platform detection, PATH copy, keybindings, release matrix
bash herdr-plugin/scripts/test-watchd.sh      # "exactly one recorder" under concurrent starts

test-watchd.sh builds its own plugin root and its own stand-in recorder and scopes every match to that path, so a real sheep watch on the machine is neither counted nor killed. Neither script needs a herdr session.

Read the full file on GitHub · 230 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. 5d ago First seen · 230 lines · 5,189 tokens per session scan A ad8519282c76

Subscribe to this mod's changes

sheep AGENTS.md is an instructions file published in the GitHub repository gokay-ai/sheep (5 stars, last pushed 7d ago), licensed MIT. It adds 5,189 tokens to every session, about $0.0259 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-31.