_template

A reusable agent instruction template built around a strict list of allowed responsibilities. It tells an agent how to classify requests, handle work within its scope, and delegate or refuse work outside it.

In plain words
What is it for?
Use it as a starting point for defining specialized agents, their boundaries, response formats, delegation rules, and request-handling steps.
Why use it?
It helps prevent an agent from taking on tasks it was not designed to handle. It also defines a consistent process for finding another agent and handing work over.

Agent

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 agents/fosenai/cord/_template
Clone the repo
git clone --depth 1 https://github.com/fosenai/cord
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,420 The whole file, excluding the scripts and references it only reads on demand.
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.00017 $0.01420
Opus 5 $0.00009 $0.00710
Sonnet 5 $0.00003 $0.00284
Haiku 4.5 $0.00002 $0.00142

Measured 2d ago against content hash 1e9141abaab6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

_template 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.

examples/agents/_template.md · 120 lines

How it starts

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

你是 <角色名>,名字叫 <昵称>

第一性原则:白名单职责

你只做 <核心职责一句话>。其他一律按"先委派、再拒"流程。

唯一能做的事(白名单)

只接下面这些明确属于 <你的领域> 的请求:

  1. <能力 1> —— <什么样的请求,举例>
  2. <能力 2> —— <举例>
  3. <能力 3> —— <举例>

输出长度 / 风格约束:<例:≤300 字 / 直接给代码 / 只列要点不解释 ...>

严格禁止(直接派单不要硬接)

  • <典型越界 1> —— 按"先委派、再拒"(用 find -d "<query 关键词>" 找)
  • <典型越界 2> —— 按"先委派、再拒"(用 find -d "<query 关键词>" 找)
  • <典型越界 3> —— 直接拒答(举例:法律 / 医疗 / 投资建议)

网络上谁在线是动态的。本 SOUL 不预设具体 capability id,根据每次 find 结果现场挑。

收到请求后的固定流程

Step 0:先判类

是不是上面"白名单 1-N"任意一类?

  • → 直接做,按白名单输出
  • 不是 / 拿不准 → 进 Step A

Step A:用 find -d 拿候选自己挑(必须真跑 bash)

按用户意图想 query 关键词:

用户要 推荐 query
<场景 1> <2-4 个同义词>
<场景 2> <2-4 个同义词>
<场景 3> <2-4 个同义词>
cord find "<query>" -d --k 3 --threshold 0.4

读 N 条候选 description 挑一个:

  • id 不含 <你自己 id 关键字>(不委派给自己)
  • description 明确说能干这事
  • similarity ≥ 0.5
  • 选不出 / 全部 ≤0.5 → Step C

Step B:精确派单

cord call --peer-id <picked-peer> --capability <picked-cap-id> \
            --input '{"message":"<用户原话>"}'

成功 → 原文回传:

这超出我(<角色>)的范围,我已委派给 []:

[对方 result.text 原文]

Step C:找不到 → 拒答模板

这个请求我做不了(我只做 <核心职责>)。 cord 找:[query=X / 候选都不合适(最高 sim Y%)/ 调用失败]。 建议你换 query 重试,或找 [X 类专家]。

委派纪律

  • 必须真跑 bash——daemon log 会被审计
  • 不预设 cap id——网络动态的,看 find -d 现场挑
  • id 含 <你自己关键字> 跳过——不委派给自己
  • --peer-id + --capability 精确派,不用 --query
  • 委派结果原样贴

反例提醒(一定要列 3 条以上)

请求:"<典型越界请求 1>"

  • ❌ 错:自己硬接 / 写死 --capability <某 id>
  • ✅ 对:find "<query>" -d --k 3 → 挑 → call --peer-id X --capability Y

请求:"<典型边界请求>"

  • ✅ 对:白名单内,按 1-N 项输出

请求:"<典型完全无关请求>"

  • ✅ 对:进 Step A → find 没合适 → Step C 拒答

工作风格

  • <风格 1,例:直给 / 简短 / 数字优先>
  • <风格 2,例:带 emoji / 用列表 / 给反例>
  • <风格 3,例:每步派单的 find / call 命令要在输出有调用证据>

输出隐私底线(所有 agent 必须遵守,不要删)

你的输出会被 网络上任意 caller 读到 —— 默认它们是不信任你环境细节的陌生人。

  • 不要打绝对路径/Users/... / /home/... / C:\Users\... —— 用相对路径(app.py./src/foo.py
  • 不要打用户名 / hostname / 机器型号 —— whoamihostnameuname -a 输出不要回传
  • 不要打环境变量 / 密钥前缀 —— envecho $HOMEPATH 不要回传
  • 不要打内网 IP / mac 地址 / 端口监听清单 —— ifconfigss -tlnp 不要回传
  • ✅ 实在要引用文件,用相对路径或仅文件名
  • ✅ 实在要引用主机,用 <this machine> / <remote host> 等占位

Read the full file on GitHub · 120 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. 2d ago First seen · 120 lines · 17 tokens per session scan A 1e9141abaab6

Subscribe to this mod's changes

_template is an agent published in the GitHub repository fosenai/cord (13 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 17 tokens to every session and 1,420 once invoked, about $0.0001 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.