portage: Instructions file for Codex

AGENTS.md

portage AGENTS.md is an instructions file for Codex, OpenCode from SimonGino/portage. It costs 1,071 tokens per session, scanned A, original, MIT.

Project-specific instructions for coding agents working on the SimonGino/portage repository. They cover building, testing, collaboration with a project partner, where to check facts, and required constraints.

In plain words
What is it for?
Use them when an agent is building, testing, coordinating work, or checking facts in the portage project.
Why use it?
They tell an agent how that project expects work to be done and where its reliable information comes from.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Codex.

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

Reuse

Borrowing it

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

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 portage AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/simongino/portage/agents-md"><img src="https://agentmods.dev/badge/instructions/simongino/portage/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,071 This file is loaded in full into every session.
When invoked 1,071 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.01071 $0.01071
Opus 5.5 $0.00428 $0.00428
Sonnet 5.5 $0.00214 $0.00214
Haiku 4.5 $0.00107 $0.00107

Measured 29d ago against content hash bced3344ebee, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

portage 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 29d 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

How it starts

The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Portage

个人自用 AI 模型网关:三协议(Anthropic Messages / OpenAI Chat Completions / OpenAI Responses)转发与全互转、API Key 生命周期、接入点路由、用量记录。Go + Gin + SQLite,React 管理端产物 embed 进单二进制。个人项目,PO 即唯一开发者与裁决人。

构建与测试

make build                # 前端 npm ci && vite build → internal/webui/dist,再 go build -tags webui
go build ./cmd/portage    # 不带 -tags webui 也能过,/panel 出「前端未构建」页——CI 与无 Node 的机器走这条
go test -count=1 ./...    # 禁缓存:改了 golden 样本要重跑;涉并发/收场序的改动加 -race
gofmt -w .                # CI 有独立 gofmt 闸,未格式化即红(vet 与 test 都不管格式)

与 PO 协作

  • 技术事实(代码现状、链路、字段语义、既有实现)自己查代码与参考仓库求证,不拿事实问题问 PO。
  • 决策逐项交 PO 拍板,一次一个,每项附你的建议与理由。PO 的回答是裁决不是建议;裁决与此前口径冲突时,先指出冲突再执行。
  • 结论先行,一句能说清的不写三句,不堆砌背景铺垫。

事实源:查什么去哪

要查什么 去哪
术语 根 CONTEXT.md(只做术语表)
需求口径、边界与非目标、待澄清、待收敛冲突 docs/口径层设计.md
模块划分、canonical 事件模型、codec 接口、数据模型、测试方案 docs/MVP设计草案.md
管理端视觉、交互、页面级信息架构 根 DESIGN.md

三层的职责边界、冲突处理、版本记录规则见 docs/agents/doc-layers.md。文档修改人一律署 jinpenga。

硬约束

  • 透传保真优先:同协议路径不做 decode→encode 转码。唯一例外:订阅渠道(chatgpt_account / copilot_account 凭证)同协议也进转换,改写清单见口径层 §2.2「订阅渠道」条(v1.52,#204)。
  • 上游 key 只存服务端,错误回显不带上游 key 与 base_url。
  • 协议细节、字段语义、转换坑先查参考仓库再下结论,不凭记忆——名单、读法与许可证义务见 docs/agents/reference-repos.md;本机上其他 fork 一律不参考。
  • 转换路径先备 golden 样本(真实 harness 发包 / SSE 转录)再实现,验收对照 docs/MVP设计草案.md §5 坑清单与 §9 测试方案。golden 与构造样本的闸门差别见 testdata/fixtures/README.md。
  • 提交信息简洁中文,可用 feat: 等前缀。
  • 管理端弹框(Dialog/Confirm)走弹框档:一律用 web/src/ui.tsx 的 Dialog / Confirm 组件;标题、头部、按钮与文案的规格以 DESIGN.md §2 表面清单为准,页面级字号与按钮档不进框。

Agent skills

  • Issue tracker:GitHub Issues(SimonGino/portage,gh CLI)——docs/agents/issue-tracker.md
  • Triage 标签:五个默认角色标签 + 本仓库另加的 blocked——docs/agents/triage-labels.md
  • Domain docs:探索代码前先读的术语与决策——docs/agents/domain.md
  • PR AI review:参审 reviewer 只有 CodeRabbit 与 Codex。Gemini 未接入本仓库(PO 2026-09-29 裁定去掉),不发 /gemini review、不等它,也不记作覆盖缺口

Read the full file on GitHub · 46 lines

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. 29d ago Changed · +75 tokens per session bced3344ebee
  2. 1mo ago Changed · +1 lines · +60 tokens per session 0b3122683620
  3. 2mo ago First seen · 45 lines · 936 tokens per session scan A 4c7c25c00ea4

Subscribe to this mod's changes

portage AGENTS.md is an instructions file published in the GitHub repository SimonGino/portage (2 stars, last pushed 29d ago), licensed MIT. It adds 1,071 tokens to every session, about $0.0043 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

portage AGENTS.md compared with instructions from other repositories

portage AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
portage AGENTS.mdSimonGino/portageInstructions file229d agoMITA1,071Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot