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.
npx agentmods add skills/shengyy/agent-skills/codex-constructionnpx skills add shengyy/agent-skills --skill codex-constructiongit clone --depth 1 https://github.com/shengyy/agent-skillsWrote 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.
[](https://agentmods.dev/skills/shengyy/agent-skills/codex-construction)<a href="https://agentmods.dev/skills/shengyy/agent-skills/codex-construction"><img src="https://agentmods.dev/badge/skills/shengyy/agent-skills/codex-construction.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00071 | $0.02648 |
| Opus 5 | $0.00036 | $0.01324 |
| Sonnet 5 | $0.00014 | $0.00530 |
| Haiku 4.5 | $0.00007 | $0.00265 |
Grade B, and why
codex-construction scanned grade B 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 today.
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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- 模型名以本机 `~/.codex/config.toml` 为准;换名先用 `codex exec -m <名字> "打印 ok"` 探针验证,400 即无效。 How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
codex-construction — 轻量派工编排
编排的价值在分工、边界、验收,不在过程管控。不替 codex 写码,不给实现细节;给合同、给全权、给对得上的档位,验收结果。
分工
- 主代理:出方案与施工合同、拆批、定档、派工、监控、验收、终审。
- Codex:一批之内全自主——读合同、实现、跑门禁、分阶段 commit、写验收包。
- 互不越界:主代理不中途接管施工,codex 跑砸了重派而不是主代理替写;codex 不做产品级裁决。
codex 独干的系统性偏差是过度工程(含过度测试),所以主代理只在三处介入:合同定稿时杀复杂度、验收时拒收合同外机制、BLOCKED 快裁快回。
档位
effort 只用三档:medium / high / xhigh。档位跟合同留给 codex 的裁量空间和出错代价走,不跟任务「重要性」走。
| 档位 | 用于 | 判据 |
|---|---|---|
medium(施工默认) |
常规功能施工、按合同写测试、机械收尾、根因已知的定点修复、审查已定位问题的修复轮、收口核验 | 合同已写明「做什么」,codex 只定局部「怎么做」;做错门禁或 diff 能抓住,返工不出本批 |
high |
骨架批、跨模块重改动、根因未知的排查、全批次审查、medium 拒收/BLOCKED 后的重派 | 合同留了设计空间,或任务是「找问题」而非「做事」 |
xhigh |
架构重构定型批、资金/并发/安全核心、最终态全面对抗审、high 重派再失败的最后一轮 | 错了要回滚多批,或要找上一轮 high 没找到的问题 |
- 用户点名优先:用户指定了档位或模型就按用户的;没指定才按本表。
- 升档,不同档重试:某档拒收、BLOCKED 或无交付,重派升一档;xhigh 仍不过 → 熔断回方案层。
- 审 ≥ 施工:审查档不低于被审批次的施工档。
- 不降档区:xhigh 项不因额度降档,额度不够等窗口。
- 省额度靠合同和批次,不靠降审查档:批拆细、合同写到「做什么」才派
medium;合同还留着设计题的批,先在方案层把题做掉,或派high。 - 启动和 resume 都必须显式传 effort,漏传静默掉回 config 默认档。
启动
nohup bash -c 'exec codex exec -m gpt-6-astra -c model_reasoning_effort="medium" \
--dangerously-bypass-approvals-and-sandbox -o LAST.md - < PROMPT_FILE' > RUN.log 2>&1 & echo "pid=$!"
- 模型名以本机
~/.codex/config.toml为准;换名先用codex exec -m <名字> "打印 ok"探针验证,400 即无效。 --dangerously-bypass-approvals-and-sandbox:关沙箱和审批,不依赖 config,exec / resume 都收。没有兜底,边界全靠 prompt 写明。-o LAST.md:最终消息落盘,终态只看它。每批独立命名,启动前不得已存在。- 合同必须走 stdin(
- < FILE),不许 argv"$(cat FILE)":argv 会把合同泄进ps,codex 会把含本合同的进程认成别人的施工会话转去监控它,轮询自己零开工(2026-08-15:5 小时 0 commit)。 - 合同开头角色钉死:你就是施工者本人,收到即开工;ps 里含本合同文本的进程就是你自己。
- 启动调用必须秒回:同一次 Bash 里不得再带耗时前台命令——外层超时按进程组 SIGKILL,
nohup挡不住。 - 运行中的日志不要 truncate。
- 启动后立刻记下日志头部的
session id:(修复轮靠它续接),顺手核对reasoning effort:是所选档。
监控:先等进程,再读 LAST.md
echo $! 拿到的 pid 就是 codex 本身——靠的是 bash -c 里那个 exec;漏掉它 $! 就是 bash 包装进程,codex 是其子进程,kill -0 仍能判活,但杀它不会杀到 codex。进程还在就是在跑,不解析日志;进程消失后看 LAST.md:
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.
- today Changed · +25 lines · +5 tokens per session 06dd19da9e47
- 5d ago First seen · 85 lines · 66 tokens per session scan B e6a011458293
codex-construction is a skill published in the GitHub repository shengyy/agent-skills (2 stars, last pushed today), licensed MIT. It adds 71 tokens to every session and 2,648 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
claude-md-improver
Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project…
agent-platform-rag-engine-management
Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…
gke-reliability
Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for disaster recovery setup or full cluster backups (use gke-backup-dr instead).
gke-workload-security
Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running cluster security audits (auditcluster.sh), configuring Workload Identity Federation (impersonation, KSA/GSA binding, and pod setup), enforcing Network Policies (default-deny…
agent-platform-model-registry
Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.
google-cloud-solution-agentic-analytics-spark-knowledge-catalog
Discovers requirements and generates guidance to design and deploy a governed, secure agentic-analytics solution for data that's distributed across Google Cloud, other cloud providers, or on-premises. Data that's outside Google Cloud (such as data from Databricks, Snowflake, Salesforce, SAP, or Oracle systems) is…