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/seonglae/openportfolio/agents-mdgit clone --depth 1 https://github.com/seonglae/openportfolioWrote 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/instructions/seonglae/openportfolio/agents-md)<a href="https://agentmods.dev/instructions/seonglae/openportfolio/agents-md"><img src="https://agentmods.dev/badge/instructions/seonglae/openportfolio/agents-md.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 | $0.01997 | $0.01997 |
| Opus 5 | $0.00999 | $0.00999 |
| Sonnet 5 | $0.00399 | $0.00399 |
| Haiku 4.5 | $0.00200 | $0.00200 |
Grade A, and why
openportfolio 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 4d 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 — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Working in this repo
Notes for contributors, and for agent CLIs operating here. What the product is
arguing is in README.md; this file is about the code.
Two invariants
Everything else in this file is a convention. These two are not.
1. Tenant isolation
One deployment holds many books, and a caller never says which tenant it is.
- Every table except
tenantscarriestenantId, and every index on those tables leads with it. A query that forgets the scope cannot use an index. requireTenant(ctx, args)inconvex/auth.tsis the only way a function learns its tenant. It derives one from the caller's membership rows or from the service key's own row.tenantSlugis accepted as a disambiguator for a caller who belongs to several tenants. It is checked against membership before it is believed. There is notenantIdargument anywhere in the public API, and adding one is the bug this section exists to prevent.- Anything fetched by document id goes through
inTenant(scope, doc), which throwsnot foundfor a foreign row. Notforbidden: that would confirm the row exists, which is the cross-tenant read. - A service key maps to exactly one tenant, is stored as a SHA-256 hash, and carries its own role.
- One function crosses tenants:
forecasts.resolveDue, the resolver cron. It is aninternalMutationand uses the tenant-lessby_status_dueindex. Nothing else may use that index, and no new cross-tenant function should exist without the same treatment.
When adding a table: tenantId: v.id("tenants"), indexes named by_tenant_*
with tenantId first, requireTenant at the top of every handler,
appendAudit on every write.
2. No provider API key
There is no model API key in this repo, in .env.example, or in any code path,
and adding one changes what the project is. Model calls go through
actor.mts, which spawns an agent CLI the operator is already signed in to. If
a feature seems to need a key, it needs a CLI invocation instead.
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.
- 4d ago First seen · 143 lines · 1,997 tokens per session scan A af2a35295a55
openportfolio AGENTS.md is an instructions file published in the GitHub repository seonglae/openportfolio (0 stars, last pushed 5d ago), licensed Apache-2.0. It adds 1,997 tokens to every session, about $0.0100 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
Vibe-Research AGENTS.md
AGENTS.md instructions for simonlin1212/Vibe-Research, covering vibe-research-agent 金融研究宪法, 0. 三条不可越线, 1. 数据纪律(五问 gate:给出任何数字或结论前逐条自问), 2. 研究哲学(评估框架,不是预测工具) and 3. 估值口径(你只选输入、解释输出;计算交给 calc/).
worldmonitor AGENTS.md
AGENTS.md instructions for koala73/worldmonitor, covering agents.md, task mode and authority, start here, surface routing and architecture invariants.
qdash CLAUDE.md
Claude Code instructions for oqtopus-team/qdash, covering qdash project reference guide, quick reference, project overview, architecture and directory structure.
HA-Websocket-Stripper CLAUDE.md
Instructions for GabrielGoldsteinAnidea/HA-Websocket-Stripper, covering ha websocket stripper — project context, what this is / why it exists, why this approach (history — don't re-litigate), mechanism and allowlist computation.
clawock AGENTS.md
AGENTS.md instructions for KCNyu/clawock, covering agents.md - your workspace, every session, kcn 偏好, git hook (one-time setup per clone) and git auto-commit rules.
clawock CLAUDE.md
Claude Code instructions for KCNyu/clawock, covering claude.md, identity & user, required reads (every session, in order), what lives where and cron run loop (what openclaw fires).