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 skills add remix2111/hermes-agent-advanced-skills --skill agents-dir-rulesgit clone --depth 1 https://github.com/remix2111/hermes-agent-advanced-skillsWrote 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/skills/remix2111/hermes-agent-advanced-skills/agents-dir-rules)<a href="https://agentmods.dev/skills/remix2111/hermes-agent-advanced-skills/agents-dir-rules"><img src="https://agentmods.dev/badge/skills/remix2111/hermes-agent-advanced-skills/agents-dir-rules/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.
<a href="https://agentmods.dev/skills/remix2111/hermes-agent-advanced-skills/agents-dir-rules"><img src="https://agentmods.dev/badge/skills/remix2111/hermes-agent-advanced-skills/agents-dir-rules.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00049 | $0.00835 |
| Opus 5 | $0.00024 | $0.00417 |
| Sonnet 5 | $0.00010 | $0.00167 |
| Haiku 4.5 | $0.00005 | $0.00084 |
Grade A, and why
agents-dir-rules 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 11d 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
AGENTS.md 目录级规则注入
场景
当需要子 Agent 进入特定项目目录执行任务时,该目录下的 AGENTS.md 或 .hermes-rules 文件定义了该目录的约定、规范、约束。在 delegate_task 前先读取这些规则并注入到 context 中,子 Agent 就能自动按该目录的规矩行事。
用法
1. 在项目目录创建规则文件
# AGENTS.md — 供 Hermes 子 Agent 读取
touch path/to/project/AGENTS.md
# .hermes-rules — 另一种命名风格,同样支持
touch path/to/project/.hermes-rules
AGENTS.md 内容示例:
# 目录规则
## 编码规范
- 使用 TypeScript,严格模式
- 缩进 2 空格,行尾无分号
- 所有公共函数必须有 JSDoc 注释
## 测试
- 每个函数至少一个测试用例
- 测试文件放在 __tests__/ 目录
- 使用 vitest 运行
## 约束
- 不允许使用 any 类型
- 不允许引入 lodash,使用原生 JS 替代
- API 请求必须走 src/api/ 封装的客户端
2. 父 Agent 检查规则文件
标准流程(每次 delegate_task 调用前执行):
# 先检查目录下 AGENTS.md 或 .hermes-rules
ls <target_dir>/AGENTS.md 2>/dev/null && cat <target_dir>/AGENTS.md
# 或
ls <target_dir>/.hermes-rules 2>/dev/null && cat <target_dir>/.hermes-rules
如果文件存在,将内容拼接到 delegate_task 的 context 参数中。
3. 完整调用示例
# 伪代码逻辑
target_dir = "~/projects/my-app/src"
# 检查规则文件
rules = ""
if os.path.exists(f"{target_dir}/AGENTS.md"):
with open(f"{target_dir}/AGENTS.md") as f:
rules = f.read()
elif os.path.exists(f"{target_dir}/.hermes-rules"):
with open(f"{target_dir}/.hermes-rules") as f:
rules = f.read()
# 注入到 delegate_task
delegate_task(
goal="在 src/ 下添加用户注册 API 路由",
context=f"工作目录: {target_dir}\n\n目录规则:\n{rules}",
toolsets=["terminal", "file"]
)
多级目录规则合并
当子 Agent 需要进入深层子目录时,按以下优先级合并规则(从近到远):
- 目标目录下的 AGENTS.md(最高优先级)
- 目标目录的父目录下的 AGENTS.md
- 项目根目录下的 AGENTS.md(最低优先级)
重复字段以最高优先级为准,不重复的字段全部保留。
配套 .hermes-agent.yaml
可以在项目根目录放 .hermes-agent.yaml 文件定义全局约定:
# .hermes-agent.yaml — 整个项目的 Hermes 配置
agents:
default_workdir: "~/projects/my-app"
always_inject_rules: true
rules_files:
- AGENTS.md
- .hermes-rules
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.
- 11d ago First seen · 107 lines · 49 tokens per session scan A 1c2fa606eadc
agents-dir-rules is a skill published in the GitHub repository remix2111/hermes-agent-advanced-skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 49 tokens to every session and 835 once invoked, about $0.0002 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 skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…