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/kongfangxun/sofagent/gemini-mdgit clone --depth 1 https://github.com/KongFangXun/sofagentWhat 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.00464 | $0.00464 |
| Opus 5 | $0.00232 | $0.00232 |
| Sonnet 5 | $0.00093 | $0.00093 |
| Haiku 4.5 | $0.00046 | $0.00046 |
Grade A, and why
sofagent GEMINI.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.
What it actually says
GEMINI.md · sofagent Gemini CLI 适配(薄挂载)
本文件是 Gemini CLI 的分层上下文挂载点(GEMINI.md 约定),不含规范内容——四层加载链的规范资产唯一来源是 sofagent 的
SKILL/目录(单一真相源)。规则更新只发生在 SKILL/,本文件永不复制它们。
会话开始时按序加载(四层加载链)
一、读取已安装的 SKILL.md 作为系统提示词(L1 硬约束——Gemini CLI 将本文件与引用内容一并注入系统上下文):
~/.sofagent/skills/sofagent/SKILL.md
(若用 bash install.sh --platform gemini 安装,则为 ~/.gemini/skills/sofagent/SKILL.md。)
二、读取用户工作规则(L2):~/.sofagent/skills/sofagent/fde.md
三、读取反思区(L3):~/.sofagent/skills/sofagent/think.md
四、知识库(L4):~/.sofagent/skills/sofagent/knowledge/ 目录,按任务关键词检索加载。
审计强制(平台无关)
约束是建议性的,审计是强制性的——提交前审计走 git hook(sofagent-audit --install-hook),与宿主平台无关:24 条 git diff 规则 + HMAC 链审计在 Gemini CLI 下同样生效。
连接 MCP Server
Gemini CLI 的 MCP 配置(settings.json)指向 sofagent MCP Server(stdio):
{ "mcpServers": { "sofagent": { "command": "sofagent-mcp" } } }
61 个 tool(run_audit / worklog_query / snapshot_restore 等)经 MCP 协议面暴露——适配器只依赖 @public API 子集,@internal 破坏性变更不影响本挂载。
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 · 34 lines · 464 tokens per session scan A 334db1a8fa06
sofagent GEMINI.md is an instructions file published in the GitHub repository KongFangXun/sofagent (41 stars, last pushed 4d ago), licensed MIT. It adds 464 tokens to every session, about $0.0023 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-30.
Other instructions, from other repositories
eve AGENTS.md
Instructions for vercel/eve, covering agents.md, about eve, repository layout, git workflow and commands.
octomux CLAUDE.md
Instructions for ShreyPaharia/octomux, covering octomux, tech stack, commands, architecture and logging.
sail CLAUDE.md
Instructions for standardapplied/sail, covering claude.md, why sail exists, tech stack, infrastructure inside containers and conventions.
b3rys-team-os CLAUDE.md
Instructions for b3rys/b3rys-team-os, covering team-collab — project rules, 정체, 핵심 결정 (불변), 디렉토리 규칙 and 작업 규칙.
codexloom AGENTS.md
AGENTS.md instructions for yan5xu/codexloom, covering repository instructions, local owner trust principle, frontend package manager and production build and restart.
hames AGENTS.md
Instructions for baek-labs/hames, covering entry redirect, ⚠ mandatory enforcement, codex 전용 보충, hard constraints (요약 — 상세는 harnessengineering.md) and 핸드오프 처리.