std-agent AGENTS.md

Instructions for a Go command-line program that converts shared AI-agent configuration into native files for 25 different AI coding tools. It uses a `.stdai` folder as the authoritative source and generates files such as `CLAUDE.md` and `AGENTS.md`.

In plain words
What is it for?
Use it when changing the configuration format, adding or updating a tool adapter, synchronizing generated files, or preparing a properly formatted commit.
Why use it?
It prevents agents from editing generated configuration directly or breaking compatibility between supported tools. It also defines the checks required before work is considered complete.

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/stringke/std-agent/agents-md
Clone the repo
git clone --depth 1 https://github.com/StringKe/std-agent

Made for: Codex, OpenCode.

Per session 806 This file is loaded in full into every session.
When invoked 806 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.00806 $0.00806
Opus 5 $0.00403 $0.00403
Sonnet 5 $0.00161 $0.00161
Haiku 4.5 $0.00081 $0.00081

Measured yesterday against content hash 06f7300e1a2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

std-agent 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 yesterday.

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 · 63 lines

What it actually says

std-agent

stdagent 是纯 Go CLI,以 .stdai/ 为单一真相源,将 rules、skills、commands、references 和 subagents 转换为 25 个 AI CLI target 的原生配置。本仓库是其源码并用自身规则自举。

结构

  • cmd/stdagent/:程序入口。
  • internal/cli/config/parser/source/:命令、配置与源文档读取。
  • internal/transformer/:协议层和 target adapter。
  • internal/runner/writer/state/budget/:同步、原子写入、状态和上下文预算。
  • docs/:格式、架构及各 target 的官方证据。

技术栈:Go 1.26、Cobra、BurntSushi/toml、goccy/go-yaml、doublestar、GoReleaser;工具链由 mise 管理。

关键约束

  • .stdai/standards/ 是 AI 配置源。生成的 CLAUDE.mdAGENTS.md 和 target 目录只通过 go run ./cmd/stdagent sync 更新。
  • frontmatter、协议或 target 映射属于跨 25 个 target 的兼容性变更,必须对照 docs/format-spec.mddocs/conversion-rules.md 和对应 docs/targets/ 证据。
  • 多 target 共享同一路径时,内容必须字节一致;AGENTS.md 是 target-neutral 的共享 rules 层,target 专属能力写入各自 sidecar。

Done means

相关回归测试已覆盖,且以下命令通过:

mise run check
go run ./cmd/stdagent sync --no-pull --strict
go run ./cmd/stdagent status

commit-style

Conventional Commits 和安全暂存要求

用户要求 commit 时:

  • 格式为 Conventional Commits 1.0.0:<type>(scope): <description>;scope 与现有模块和提交历史一致。
  • breaking change 使用 !BREAKING CHANGE:
  • 只显式暂存当前任务文件;密钥或 .env 类文件先报告,不擅自提交。
  • 不添加 Co-Authored-By 或 AI 署名。

no-history-rewrite

保护已推送分支和 release tag

  • 已推送分支只追加 commit 并 fast-forward push;main 和受保护分支永不 force-push。
  • amend 或 rebase 仅限本人独占、尚未共享的 WIP 分支。
  • 已推送并触发发布的 tag 不删除;修复使用更高 patch 版本。

test-requirements

核心转换与写入变更必须有针对性回归测试

修改 transformerrunnerwriterparser 时,测试必须先复现风险,再证明修复:

  • target 或 transformer 变更覆盖 5 种 type 的关键 fanout 和共享路径。
  • runner 控制流覆盖相关 flag、首次与重复 sync、prune 和边界保护。
  • writer 变更覆盖 unchanged、overwrite 和 atomic 路径。

Done means go test ./...go test -race ./internal/runner/...mise run check 通过;无法执行的验证标记 UNKNOWN

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. yesterday First seen · 63 lines · 806 tokens per session scan A 06f7300e1a2e

Subscribe to this mod's changes

std-agent AGENTS.md is an instructions file published in the GitHub repository StringKe/std-agent (8 stars, last pushed 11d ago), licensed MIT. It adds 806 tokens to every session, about $0.0040 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.