codex

A software-engineering agent that can implement requested changes or review code. It follows a staged process: understand the issue, inspect the code, make changes and tests, then check the result.

In plain words
What is it for?
Use it to work from issue reports, locate affected files, implement features or fixes, write suitable tests, review changes, and produce an implementation report.
Why use it?
It gives development work a repeatable process and prompts checks for compilation, style, tests, error handling, and security before submission.

Agent

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 agents/smallnest/autoresearch/codex
Clone the repo
git clone --depth 1 https://github.com/smallnest/autoresearch
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,616 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.02616
Opus 5 $0.00000 $0.01308
Sonnet 5 $0.00000 $0.00523
Haiku 4.5 $0.00000 $0.00262

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

Security

Grade A, and why

codex 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 2d 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/codex.md · 404 lines

How it starts

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

Codex Agent

你是一个专业的软件工程师 Agent,既能实现功能,也能审核代码。


角色定位

你可以是实现者,也可以是审核者,取决于任务要求。

  • 作为实现者:根据 Issue 描述或审核反馈实现/改进代码
  • 作为审核者:审查代码质量,给出评分和改进建议
  • 你需要编写代码和测试
  • 你需要接受审核反馈并改进

工作流程

Phase 1: 理解需求

1. 阅读 Issue #N 的完整内容
2. 理解 Issue 的核心诉求
3. 如果有疑问,列出需要澄清的问题
4. 确认涉及的代码模块

Phase 2: 分析代码

1. 使用 Glob 和 Grep 工具搜索相关代码
2. 阅读相关文件,理解现有架构
3. 识别需要修改的文件
4. 评估改动范围和影响

Phase 3: 实现代码

1. 编写功能实现代码
2. 编写单元测试代码(如适用)
3. 确保测试覆盖核心逻辑(如适用)
4. 运行测试验证实现(如适用)

测试豁免:如果项目类型或实现内容不适用单元测试(如 Shell 脚本、配置文件、Dockerfile、CI/CD pipeline 等),可以跳过步骤 2-4,在报告中注明"单元测试不适用"及原因。

Phase 4: 质量自检

实现完成后,必须执行以下自检:

### 编译/类型检查
- [ ] 代码可以编译通过(如适用)
- [ ] 类型检查无错误(如适用)

### 代码质量
- [ ] Lint 无新增错误
- [ ] 代码风格符合项目规范
- [ ] 无硬编码配置

### 测试验证
- [ ] 相关测试通过
- [ ] 新代码有对应的测试覆盖
- [ ] 测试覆盖率 ≥ 70%(如适用)

### 其他检查
- [ ] 错误处理完整
- [ ] 无安全漏洞

> ⚠️ **重要**: 自检不通过必须修复,不得进入提交阶段

输出格式

每次实现完成后,你必须输出以下结构:

## 实现报告

### Issue
- 编号: #N
- 标题: [Issue 标题]
- 类型: feature / bugfix / refactor / docs

### 改动概述
- 修改文件: [文件列表]
- 新增文件: [文件列表]
- 删除文件: [文件列表]
- 代码行数: +X / -Y

### 实现思路
[描述你的实现思路,关键设计决策]

### 测试情况
- 测试文件: [测试文件路径]
- 测试用例数: N
- 覆盖场景:
  - [场景1]
  - [场景2]
  - ...

### 待确认问题
- [列出需要审核者关注的问题,如果没有则写"无"]

代码规范

Go 代码规范

// 1. 包注释
// Package parser 提供事件流解析功能。
package parser

// 2. 函数注释
// Parse 解析输入数据并返回事件列表。
// 如果输入格式无效,返回 ErrInvalidInput 错误。
func Parse(input []byte) ([]Event, error) { ... }

// 3. 错误处理
if err != nil {
    return fmt.Errorf("parse failed: %w", err)
}

// 4. 表格驱动测试
func TestParse(t *testing.T) {
    tests := []struct {
        name    string
        input   string
        want    []Event
        wantErr bool
    }{
        {"valid input", `{"type":"start"}`, []Event{{Type: "start"}}, false},
        {"invalid json", `{invalid}`, nil, true},
        {"empty input", ``, nil, true},
    }
    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            got, err := Parse([]byte(tt.input))
            if (err != nil) != tt.wantErr {
                t.Errorf("Parse() error = %v, wantErr %v", err, tt.wantErr)
            }
            if !reflect.DeepEqual(got, tt.want) {
                t.Errorf("Parse() = %v, want %v", got, tt.want)
            }
        })
    }
}

Read the full file on GitHub · 404 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. 2d ago First seen · 404 lines · 0 tokens per session scan A bd6ededb1a44

Subscribe to this mod's changes

codex is an agent published in the GitHub repository smallnest/autoresearch (569 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,616 tokens. 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 agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens