selectools AGENTS.md

Project-specific instructions for contributing to selectools, a Python project, including its required tests, formatting, type checks, security checks, and documentation build.

In plain words
What is it for?
Use them when modifying selectools to run pytest, Ruff, mypy, Bandit, and MkDocs, and to follow rules for public APIs and regression tests.
Why use it?
They make the expected checks and contribution boundaries clear before committing or releasing changes.

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

Made for: Codex, OpenCode.

Per session 1,252 This file is loaded in full into every session.
When invoked 1,252 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.01252 $0.01252
Opus 5 $0.00626 $0.00626
Sonnet 5 $0.00250 $0.00250
Haiku 4.5 $0.00125 $0.00125

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

Security

Grade A, and why

selectools 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 yesterday.

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

How it starts

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

Selectools -- Agent Instructions

Commands

# Test (MUST pass before any commit)
pytest tests/ -x -q
pytest tests/ -k "not e2e" -x -q          # no API keys needed

# Format + lint (MUST run before commit — replaces Black + isort + flake8)
ruff format src/ tests/
ruff check src/ tests/ --fix

# Type check
mypy src/

# Security (MUST pass before release tags)
bandit -r src/ -ll -q -c pyproject.toml

# Docs
cp CHANGELOG.md docs/CHANGELOG.md && mkdocs build

Stack

  • Python 3.9+ (CI: 3.9, 3.10, 3.11, 3.12, 3.13)
  • pip + setuptools, src-layout: src/selectools/
  • pytest (5000+ tests), Ruff (format + lint), mypy
  • MkDocs Material for docs, deployed to GitHub Pages

Boundaries

Always (do without asking)

  • Run ruff format and ruff check --fix on every modified file
  • Run pytest tests/ -k "not e2e" -x -q after implementation changes
  • Add type hints to all public APIs
  • Add a regression test for every bug fix
  • Apply @beta stability marker to new public symbols
  • Use response_msg.content or "" when reading provider content

Ask First

  • Adding new fields to AgentConfig, AgentResult, or AgentObserver
  • Adding new StepType values to AgentTrace
  • Modifying agent/core.py (the main agent loop)
  • Changing public API signatures on @stable symbols
  • Adding new dependencies to pyproject.toml

Never

  • Push directly to main -- MUST use PR workflow
  • Push to remote without explicit user request
  • Call real LLM APIs in unit tests -- use RecordingProvider or mocks
  • Use datetime.utcnow() -- MUST use datetime.now(timezone.utc)
  • Use x = x or default when 0, "", or [] are valid values
  • Create ThreadPoolExecutor() per-call in async code -- use module singleton
  • Use self.config.model in astream() -- MUST use self._effective_model
  • Stringify ToolCall objects -- check isinstance(chunk, str) first
  • Skip the tools parameter in provider stream()/astream() methods
  • Add co-author trailer lines to commits

Read the full file on GitHub · 96 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. yesterday First seen · 96 lines · 1,252 tokens per session scan A e8d873464a94

Subscribe to this mod's changes

selectools AGENTS.md is an instructions file published in the GitHub repository johnnichev/selectools (11 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 1,252 tokens to every session, about $0.0063 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.

Related

Other instructions, from other repositories

Doberman-Core AGENTS.md

Instructions for DobermanCore/Doberman-Core, covering claude.md — doberman operating manual, 0. on startup (every session), 1. what this repository is, 2. architecture & extension points and 3. prime directives (non-negotiable).

DobermanCore/Doberman-Core · 3,547 tokens

agent-guardrails-template copilot-instructions.md

Instructions for TheArchitectit/agent-guardrails-template, covering github copilot instructions, the four laws of agent safety, code generation rules, scope (mandatory) and production-first.

TheArchitectit/agent-guardrails-template · 852 tokens

agent-guardrails-template CLAUDE.md

Instructions for TheArchitectit/agent-guardrails-template, covering project guidelines, 0. navigation maps (read first), 0.1 agent-gdui-2026 initialization context, 1. context & setup and 2. token-saving rules (strict).

TheArchitectit/agent-guardrails-template · 712 tokens

FeatherlaneAI AGENTS.md

Instructions for ducnguyen67201/FeatherlaneAI, covering repository agent instructions, skills, architecture: rust backend is the source of truth, page integration expectations and implementation checklist.

ducnguyen67201/FeatherlaneAI · 4,372 tokens

agent47 AGENTS.md

Instructions for bmdhodl/agent47, covering agents.md, read this first: sdk memory, cofounder inbox, what this is and agent contract (mandatory).

bmdhodl/agent47 · 4,862 tokens

agent47 CLAUDE.md

Instructions for bmdhodl/agent47, covering claude.md, read first, repo boundary, claude repo contract and what claude should optimize for here.

bmdhodl/agent47 · 1,283 tokens