swe-bench-essential AGENTS.md

swe-bench-essential AGENTS.md is an instructions file for Codex, OpenCode from Prism-Shadow/swe-bench-essential. It costs 1,964 tokens per session, scanned A, original, MIT.

Project instructions for running SWE-bench Essential, a benchmark that tests whether coding agents can solve real software bugs. They cover environment setup, choosing cases, running agents, and storing results.

In plain words
What is it for?
Preparing the benchmark environment, building agent runtimes, selecting cases, running evaluations, and preserving traces, logs, patches, and other results.
Why use it?
Benchmark runs can become difficult to reproduce when environments, credentials, caches, and outputs are handled inconsistently. These instructions define the expected setup and file locations.

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/prism-shadow/swe-bench-essential/agents-md
Clone the repo
git clone --depth 1 https://github.com/Prism-Shadow/swe-bench-essential

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 swe-bench-essential AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/prism-shadow/swe-bench-essential/agents-md.svg)](https://agentmods.dev/instructions/prism-shadow/swe-bench-essential/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/prism-shadow/swe-bench-essential/agents-md"><img src="https://agentmods.dev/badge/instructions/prism-shadow/swe-bench-essential/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,964 This file is loaded in full into every session.
When invoked 1,964 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.01964 $0.01964
Opus 5 $0.00982 $0.00982
Sonnet 5 $0.00393 $0.00393
Haiku 4.5 $0.00196 $0.00196

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

Security

Grade A, and why

swe-bench-essential 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 3d 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 · 180 lines

How it starts

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

SWE-bench Essential

基本规则

默认从项目根目录运行。所有 Python 调用都用 uv run python ...

不要打印 API key 的值,只能打印 key 名。使用 .env 保存 DEEPSEEK_API_KEY,可选 ANTHROPIC_API_KEYANTHROPIC_AUTH_TOKENCLAUDE_CODE_OAUTH_TOKEN

生成产物放在 result/<run-name>/。推荐命名为 <agent>-pro-<scope>-<YYYY-MM-DD_HH-mm-ss>。共享 runtime 放在 .cache/agent-runtime/,Pro Public 资源放在 .cache/swebench-pro/;两者都是可重建缓存。

默认保留 trace、logs、patches、Penguin homes 和 eval workspaces。除非用户明确要求,不要删除可用于复盘的中间产物。

环境准备

uv sync --locked
uv run python scripts/check_env.py
uv run python scripts/build_agent_runtime.py -o .cache/agent-runtime
uv run python scripts/swebench_pro/prepare_resources.py

build_agent_runtime.py 默认构建全部组件,也可以用 --components 增量构建: basecodexmoonbridgeclaudepenguin。传入 --components missing 可自动检测并 只构建缺少的组件。claudepenguin 会自动包含 base;增量构建会原子合并到已有 runtime,失败时保留旧版本。

Penguin 组件当前默认使用 Prism-Shadow/penguin-harnessv0.1.5 标签。 历史版本实验应通过 --penguin-version <version> 构建到独立 runtime 目录,避免覆盖默认 runtime。

uv run python scripts/build_agent_runtime.py \
  --components penguin \
  --penguin-version 0.0.1 \
  -o .cache/agent-runtime-v0.0.1

agent-runtime 只读挂载到 case container 的 /opt/agent-runtime,至少包含:

bin/claude
bin/codex
bin/moonbridge
bin/pnpm
penguin-harness/

Node/Claude 通过 runtime 自带的 glibc loader wrapper 启动,以兼容缺少 /lib64/ld-linux-x86-64.so.2 的 Pro 镜像。出现 runtime 可执行文件缺失时,先重建 .cache/agent-runtime/,不要误判为模型或 API 失败。

Pro Case 选择

Prediction、campaign 和 eval 默认使用 assets/swebench_pro_picked_40.txt。选择顺序为:默认或自定义清单、--filter--slice

  • --all-instances:使用完整 Pro Public 数据。
  • --instance-ids-file <path>:使用自定义 case 清单。
  • --filter '<regex>':按完整 instance ID 过滤。
  • --slice 0:N:对过滤结果切片。

Prediction Runners

三个 runner 都为每个 instance 启动官方 case container,在 /app 内运行 agent,并用 git diff --binary 导出 patch。

通用选项:

  • -o result/<run-name>:输出目录。
  • --agent-runtime-dir .cache/agent-runtime:指定共享 runtime。
  • --case-network bridge:允许 agent 调用模型 API。
  • --timeout 1800:单个 case 的 agent 超时。
  • --max_workers N:并行 case 数量,默认 1
  • --redo-existing:重跑已有 prediction;续跑时默认不要使用。

Read the full file on GitHub · 180 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. 3d ago First seen · 180 lines · 1,964 tokens per session scan A fdaacf4b8ea3

Subscribe to this mod's changes

swe-bench-essential AGENTS.md is an instructions file published in the GitHub repository Prism-Shadow/swe-bench-essential (2 stars, last pushed 24d ago), licensed MIT. It adds 1,964 tokens to every session, about $0.0098 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.

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 · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 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,345 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js 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,296 tokens