node-injection

A set of rules for adding a shared knowledge base to several coding agents, including Hermes CLI, Claude Code, cloud agents, and OpenClaw. The knowledge base contains fixes and longer technical references.

In plain words
What is it for?
It is for configuring where agents search, synchronising the knowledge base, and deciding how new engineering lessons are contributed.
Why use it?
It helps agents find relevant past solutions when they encounter a problem and keeps useful lessons available across tools and sessions.

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/ikalus1988/misakanet/node-injection
Clone the repo
git clone --depth 1 https://github.com/Ikalus1988/MisakaNet
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 539 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.00000 $0.00539
Opus 5 $0.00000 $0.00269
Sonnet 5 $0.00000 $0.00108
Haiku 4.5 $0.00000 $0.00054

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

Security

Grade A, and why

node-injection 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.

docs/agents/node-injection.md · 65 lines

What it actually says

节点规则注入指南

各节点的规则注入方式

节点类型 方式 说明
Hermes CLI CLAUDE.md 本仓库 CLAUDE.md 已包含规则
cc-haha PostToolUseFailure 钩子 Bash 失败时自动 grep lessons/
原生 Claude Code 项目 CLAUDE.md 在每个项目根目录放 CLAUDE.md
云 Agent 启动 prompt / SOUL.md 每次会话开始 fetch lessons 并调用 search_knowledge.py
OpenClaw CLAUDE.md + cron 同 Hermes

Hermes CLI 配置

Hermes CLI 会自动读取本仓库的 CLAUDE.md 文件,包含以下规则:

  1. 检索优先级: 遇到问题时先搜 lessons/,再搜 reference/
  2. 贡献流程: 有价值对话结束后自问是否值得共享
  3. 同步机制: 每次会话开始时 git pull --ff-only

cc-haha 配置

cc-haha 使用 PostToolUseFailure 钩子,在 Bash 失败时自动提示 lessons:

# 钩子会自动执行
python3 search_knowledge.py "错误关键词" --lessons

原生 Claude Code 配置

在每个项目根目录放置 CLAUDE.md 文件,包含:

  1. 检索规则: 遇到问题时的检索顺序
  2. 贡献规则: 有价值对话结束后共享经验
  3. 同步规则: 每次会话开始时同步知识库

云 Agent 配置

每次会话开始时执行:

cd ~/MisakaNet && git pull --ff-only
python3 search_knowledge.py "当前话题" --lessons

OpenClaw 配置

同 Hermes CLI,使用 CLAUDE.md + cron 定时同步:

# cron 配置
*/10 * * * * cd ~/MisakaNet && git pull --ff-only

保持同步

# 每次会话开始时
cd ~/MisakaNet && git pull --ff-only

# 或设 cron(Hermes/cc-haha 等常驻节点)
*/10 * * * * cd ~/MisakaNet && git pull --ff-only
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 · 65 lines · 0 tokens per session scan A 1d0d474fbe6b

Subscribe to this mod's changes

node-injection is an agent published in the GitHub repository Ikalus1988/MisakaNet (432 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 539 tokens. 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.