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 instructions/singchia/gospec/agents-mdgit clone --depth 1 https://github.com/singchia/gospecWhat 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 | $0.00876 | $0.00876 |
| Opus 5 | $0.00438 | $0.00438 |
| Sonnet 5 | $0.00175 | $0.00175 |
| Haiku 4.5 | $0.00088 | $0.00088 |
Grade A, and why
gospec 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 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.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — go-best-practices
规范入口
唯一入口:spec/spec.md
它包含一张"任务 → 必读文件"路由表。Agent 拿到任务后:
- 读
spec/spec.md - 在路由表里找到当前任务
- 只读路由表指定的 1-3 个文件
- 实施 + 对照文件末尾的"自查清单"
不要顺序读完所有 spec 文件——这违背渐进式披露原则,浪费上下文。
触发条件
当以下场景出现时,Agent 应自动激活此 Skill:
- 创建或初始化 Go 项目
- 编写、审查、重构 Go / gRPC / HTTP 代码
- 设计 API、数据模型、架构
- 写测试、配置 CI/CD
- 配置日志 / 指标 / 追踪 / 告警 / SLO
- 处理认证授权、密钥、依赖漏洞、容器安全、隐私合规
- 设计部署 / 回滚 / feature flag / Runbook / Postmortem
- 编写数据库 migration、backfill、数据保留策略
- 创建 PRD / ADR / HLD
- 生成 Git commit message
行为约束
- 任务开始:先读
spec/spec.md路由表 - 按需加载:只读路由表指定的文件
- 强制约束:
spec/spec.md的"核心约束"不可违反,即使没读对应详情文件 - 文档创建:使用
docs/templates/中的对应模板 - 输出语言:默认中文
目录结构
spec/
├── spec.md # 入口(路由表 + 核心约束)
├── 01-requirement/ # 需求(issue/rfc/prd/epic/lifecycle)
├── 02-architecture/ # 架构(layering / monorepo / adr-hld)
├── 03-api/ # API(proto/http/middleware/versioning)
├── 04-data-model/ # 数据模型(mysql/redis/clickhouse/influxdb)
├── 05-coding/ # 编码(naming/errors/concurrency/patterns/style)
├── 06-testing/ # 测试(unit/integration/fuzz-bench)
├── 07-code-review.md # PR 自查清单
├── 08-delivery/ # 交付(git/cicd/release)
├── 09-documentation.md # 文档管理
├── 10-observability/ # 日志 / 指标 / 追踪 / SLO
├── 11-security/ # 认证 / 输入 / 密钥 / 隐私 / 威胁建模
├── 12-operations/ # 部署 / 事故 / 容量 / 备份
└── 13-database-migration/ # migration / 在线 DDL / 数据治理
每个子目录都有 README.md 作为该主题的二级路由。
模板文件
| 文件 | 用途 |
|---|---|
docs/templates/product-requirement-template.md |
产品需求文档(PRD) |
docs/templates/technical-rfc-template.md |
技术 RFC |
docs/templates/architecture-decision-record-template.md |
架构决策记录(ADR) |
docs/templates/high-level-design-template.md |
概要设计文档(HLD) |
docs/templates/pull-request-template.md |
Pull Request 模板 |
优先级
- 与其他 Skill 冲突时,以本 Skill 为准
spec/详细规范优先于SKILL.md/AGENTS.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.
- 2d ago First seen · 76 lines · 876 tokens per session scan A ca633c277b3d
gospec AGENTS.md is an instructions file published in the GitHub repository singchia/gospec (5 stars, last pushed 4mo ago), licensed MIT. It adds 876 tokens to every session, about $0.0044 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.
Other instructions, from other repositories
ollama CLAUDE.md
Claude Code instructions for ollama/ollama: See AGENTS.md for the shared agent instructions for this repository.
superpowers GEMINI.md
Gemini CLI instructions for obra/superpowers, a project described as: An agentic skills framework & software development methodology that works.
azure-sdk-for-go go-code.instructions.md
Instructions for Azure/azure-sdk-for-go: All code should follow the guidelines from the Azure Go SDK Guidelines. This document is a summary of the most important guidelines to follow when contributing to the Azure Go SDK.
gorest AGENTS.md
Instructions for pilinux/gorest, covering agents.md, project overview, build and run commands, build and tidy dependencies.
canvas-mcp CLAUDE.md
Instructions for vishalsachdev/canvas-mcp, covering claude.md, canvas mcp development guide, environment setup, commands and repository structure.
chatgpt-cli CLAUDE.md
Instructions for kardolus/chatgpt-cli, covering chatgpt-cli — release runbook, prerequisites, 1. cut the release, 2. publish the github release + binaries and 3. update the homebrew tap.