legwork-skill: Instructions file for Claude Code

AGENTS.md

legwork-skill AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from dbhq-uk/legwork-skill. It costs 2,234 tokens per session, scanned A, original, MIT.

Repository instructions for Legwork, a research skill for AI coding agents. Legwork produces findings with citations and explains how well each claim is supported by its sources.

In plain words
What is it for?
Use it when changing Legwork’s skills, scripts, tests, templates, hooks, documentation, or installation files.
Why use it?
It gives agents and contributors the project’s layout, coding conventions, validation rules, and quality requirements. This reduces the risk of publishing unsupported research claims.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: ${CLAUDE_SKILL_DIR} variable, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions .claude-plugin; mentions subagents.

This is dbhq-uk/legwork-skill's own configuration. It tells Claude Code, Codex and OpenCode how to work on legwork-skill 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 legwork-skill configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is cd ../.. && claude plugin validate . # manifest + structure.

Reuse

Borrowing it

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

Made for: Claude Code, 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 legwork-skill AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dbhq-uk/legwork-skill/agents-md"><img src="https://agentmods.dev/badge/instructions/dbhq-uk/legwork-skill/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,234 This file is loaded in full into every session.
When invoked 2,234 The same file — it is already loaded in full.
Security scan A 1 finding. 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.02234 $0.02234
Opus 5.5 $0.00894 $0.00894
Sonnet 5.5 $0.00447 $0.00447
Haiku 4.5 $0.00223 $0.00223

Measured 9d ago against content hash c9e0cebcbeaa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

legwork-skill AGENTS.md scanned grade A 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 9d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Tests are hermetic - no network, ever. The gate makes no network calls at all. `fetch.py`, `platforms.py` and `bd_search.py` do reach the network in production, so their tests patch `urlopen` and `subprocess.run` and a
AGENTS.md · 85 lines

How it starts

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

AGENTS.md

Guidance for AI agents (and people) working in this repository.

What this is

legwork - a decision-research skill for AI coding agents. It produces cited findings where every claim states how well it is supported, judges a source by whether it suits the claim it backs, and refuses to ship a finding it cannot support. It follows the Agent Skills layout (skills/<name>/SKILL.md) and ships as a Claude Code plugin.

Layout

.claude-plugin/plugin.json     # plugin manifest
skills/legwork/SKILL.md        # the skill (agent-facing instructions)
skills/legwork/scripts/        # python, standard library only
                              #   fetch.py     free direct page fetch, returns text
                              #   platforms.py ten free platform APIs, no key
                              #   search.py    many wordings across Google and Exa in one call
skills/legwork/reference/      # methodology (four phases), quality gates, subagent brief
skills/legwork/templates/      # brief + report
skills/legwork/tests/          # offline, no network
evals/                         # behaviour evals + the baseline protocol
install.sh / install-codex.sh  # local symlink installers (Claude / Codex)
docs/design-notes.md           # why the skill is shaped the way it is

Conventions

  • Standard library only. No requirements.txt, no virtualenv. This is load-bearing: it is what lets the same paths work across Claude, Codex and plugin installs. CI asserts it, so an added third-party import fails the build rather than quietly breaking the install story.
  • Python floor is 3.9. Every script carries from __future__ import annotations so PEP 604 syntax parses there.
  • SKILL.md references scripts via ${CLAUDE_SKILL_DIR} (the skill's own directory), which Claude Code substitutes for personal, project and plugin installs alike. install.sh therefore symlinks the whole skill directory into ~/.claude/skills/ with no rewrite. install-codex.sh rewrites the variable, since Codex does not substitute it.
  • TypeSafe's Jev is optional, like Bright Data: fetch.py --relevant does nothing without a key (TYPESAFE_API_KEY, or ~/.dbhq/legwork/typesafe-api-key - the DBHQ convention for skill credentials), a failed call never fails a fetch, and in search.py it only orders leads, all or nothing, and never drops one, and in fetch.py it is called only when --find missed - ranking every page would print more text than the whole-page reads it replaces.
  • Every search provider is optional. search.py uses Bright Data and Exa when each is available and says which it skipped and why; with neither it exits 4 and the run searches with the built-in WebSearch/WebFetch, so a run still completes with no CLI and no keys. Anything that assumes a provider is installed or funded is a bug. Exa's key is EXA_API_KEY, or ~/.dbhq/legwork/exa-api-key.
  • Tests are hermetic - no network, ever. The gate makes no network calls at all. fetch.py, platforms.py and bd_search.py do reach the network in production, so their tests patch urlopen and subprocess.run and assert the mapping - which flag becomes which CLI argument, which field becomes which column. A test that needs a socket is a test that will be skipped, and a skipped test is not a gate.
  • A retrieval script and the fetch log are one pipeline. Every source kind platforms.py emits must be one sources.py log --kind accepts; _assert_vocabulary_agrees pins it. A kind only one of them knows fails at the far end of a long run, which is the worst place to find it.
  • Corroboration must be counted on the layer the pipeline does not amplify. Gather deliberately fans out to find more sources per finding, so a source count measures our own effort. Independence groups reached from different search angles is the real signal. A change that makes corroboration rise with breadth has broken the check, whatever the tests say.
  • The index is keyed on the folder, never the topic. Topics get reworded between runs; the folder is stamped once and never moves. Upserting on the folder is what makes a refresh update its row in place instead of leaving two rows competing to describe one report. For the same reason the index header is identified by position, not by a cell reading "Topic" - a run whose topic is worded like a column heading is still a run.
  • A search snippet is not an opened page. A row logged via=websearch is a lead. Every other transport returns the page or the record itself, api included - a registry's own JSON is the record, not a snippet about it. The gate treats a citation resting only on snippet rows as unopened: ignored at quick, which is snippet-first by design, a warning at standard, an error at deep. Measured on a run filed on 2026-08-16, 18 of its 29 cited sources were search results nobody opened, and it passed.
  • A blank matrix cell is never acceptable. [unknown] records that the question was asked and came back empty; a blank records nothing and reads as a confident "no". Table cells are not sentences, so no other layer of the gate can see inside them.
  • The platform is not the party. party_of treats multi-tenant hosts as what they are: two orgs on one code host are two voices, three unrelated papers on one preprint server are three, and evidence read from disk is always one. A change that makes tenancy raise corroboration for sources found down a single angle has broken the check - test_party_tenancy.py pins both directions.
  • A run that fails its gate is never filed. finish.py gates before it writes to the index, because the index is what a later session trusts instead of searching again. Filing a failed run launders a conclusion the evidence does not support.
  • Prose is a cost, not a free win. The measured constraint on this skill is instruction density, not mechanism count: adherence collapses well before the number of rules legwork already carries, and the observed failure mode is an agent reporting compliance it did not achieve. Prefer moving a rule into the gate or a script over writing it down again. A change that adds standing procedure should say what it is buying and what it displaces.
  • Each rule is stated once. SKILL.md holds the rule, in the order a run meets it; reference/methodology.md holds only the detail behind it and does not restate it; the templates and the subagent brief point at SKILL.md rather than paraphrasing it. A rule written in several places drifts: by September 2026 the answer-in-chat rule said three different things in four files, and a fix to the blocked-page ladder had reached two of the four places it was written. A change to a rule changes that one place, and a grep for the rule's key phrase should find it once.
  • House style: British English, plain hyphens (no em or en dashes).

Read the full file on GitHub · 85 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. 9d ago Changed · -2 lines · -42 tokens per session c9e0cebcbeaa
  2. 11d ago Changed · +3 lines · +146 tokens per session 8fa51bc30acd
  3. 1mo ago Changed · +1 lines · +91 tokens per session 2cbd89750df2
  4. 1mo ago Changed · +1 lines · +137 tokens per session bd1a9a9b8ea3
  5. 1mo ago Changed 75920e25671b
  6. 1mo ago Changed · +5 lines · +320 tokens per session c43c7d3eb7ff
  7. 2mo ago First seen · 77 lines · 1,582 tokens per session scan A b99fb74b8dce

Subscribe to this mod's changes

legwork-skill AGENTS.md is an instructions file published in the GitHub repository dbhq-uk/legwork-skill (3 stars, last pushed 3d ago), licensed MIT. It adds 2,234 tokens to every session, about $0.0089 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

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,461 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,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens