grok-subagent: Instructions file for Codex

AGENTS.md

grok-subagent AGENTS.md is an instructions file for Codex, OpenCode from Walvez/grok-subagent. It costs 591 tokens per session, scanned A, original, MIT.

Developer instructions for a Codex plugin that uses the official Grok command-line tool as an external helper agent, including its separate X and web search workflow. Grok is an AI service, and the command line lets the plugin run it from development tools.

In plain words
What is it for?
Running Grok-assisted searches, delegating controlled tasks, and developing or testing the grok-subagent plugin.
Why use it?
They explain setup, search isolation, write restrictions, caching, and secret handling so the plugin can be used without exposing credentials or modifying the wrong worktree.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; reads ~/.codex paths; mentions AGENTS.md.

This is Walvez/grok-subagent's own configuration. It tells Codex and OpenCode how to work on grok-subagent 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 grok-subagent configures →

Reuse

Borrowing it

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

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 grok-subagent AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/walvez/grok-subagent/agents-md"><img src="https://agentmods.dev/badge/instructions/walvez/grok-subagent/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 591 This file is loaded in full into every session.
When invoked 591 The same file — it is already loaded in full.
Security scan A 0 findings. 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.00591 $0.00591
Opus 5.5 $0.00236 $0.00236
Sonnet 5.5 $0.00118 $0.00118
Haiku 4.5 $0.00059 $0.00059

Measured 2mo ago against content hash 67e356c79db6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

grok-subagent 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 2mo 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 · 46 lines

What it actually says

AGENTS.md

项目定位

Codex 插件:通过官方 Grok Build CLI,把 Grok 作为受控外部子 Agent,并支持仓库外的 Grok 原生 X/Web 搜索。Codex 负责编排与最终核验。

怎么跑起来

# 依赖:Node.js 22+、已登录的官方 Grok CLI(~/.grok/bin/grok 或 grok)
npm test
codex plugin marketplace add "$PWD"
codex plugin add grok-subagent@walvez-grok
# 安装后必须新建 Codex 任务,旧会话不会热加载 Skill/MCP

搜索 smoke(会消耗 Grok 额度):

python3 plugins/grok-subagent/scripts/run_search.py run --platform x --depth quick --since 3d "..."

技术栈

  • 无 npm 运行时依赖
  • MCP stdio bridge:plugins/grok-subagent/mcp-server/server.mjs
  • 官方 grok agent stdio(ACP)用于只读/写入/交互
  • 隔离搜索桥:plugins/grok-subagent/scripts/run_search.py(改编自 sudoHG/codex-grok-search)

目录与约定

  • 插件根:plugins/grok-subagent/
  • Skill:plugins/grok-subagent/skills/grok-subagent/SKILL.md
  • 中文 README 是默认入口;英文见 README.en.md;README.zh-CN.md 仅为迁移跳转
  • 用户可见行为变更时同步更新 README.md、README.en.md、CHANGELOG.md、ARCHITECTURE.md、SECURITY.md
  • 写入模式只允许 linked Git worktree(.git 为文件),禁止主检出
  • 搜索模式禁止进入当前仓库 cwd;结果缓存在 ~/.cache/grok-subagent/search-runs
  • 不要提交 ~/.grok/auth.json、token、私有 prompt 或含真实密钥的测试仓

当前状态与下一步

  • 现役版本:0.4.0,main 已含隔离搜索工具
  • 本地插件缓存:~/.codex/plugins/cache/walvez-grok/grok-subagent/0.4.0
  • 公开 GitHub Release 仍停在 v0.3.1;若要对外安装路径解析到 0.4.0,需要补 tag/Release
  • 新任务中优先:项目审查用 grok_spawn_readonly;X/Reddit/实时公开研究用 grok_search
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. 2mo ago First seen · 46 lines · 591 tokens per session scan A 67e356c79db6

Subscribe to this mod's changes

grok-subagent AGENTS.md is an instructions file published in the GitHub repository Walvez/grok-subagent (5 stars, last pushed 3mo ago), licensed MIT. It adds 591 tokens to every session, about $0.0024 per session on Opus 5.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

grok-subagent AGENTS.md compared with instructions from other repositories

grok-subagent AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
grok-subagent AGENTS.mdWalvez/grok-subagentInstructions file53mo agoMITA591Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k2d agoMITA4,313Codex, OpenCode