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 agents/ikalus1988/misakanet/knowledge-structuregit clone --depth 1 https://github.com/Ikalus1988/MisakaNetWhat 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.00000 | $0.00568 |
| Opus 5 | $0.00000 | $0.00284 |
| Sonnet 5 | $0.00000 | $0.00114 |
| Haiku 4.5 | $0.00000 | $0.00057 |
Grade A, and why
knowledge-structure 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.
What it actually says
知识库结构指南
目录结构
MisakaNet/
├── lessons/ # 跨节点共享知识(踩坑记录)
├── reference/ # 完整方案文档
├── misakanet/ # 通信模块
│ ├── scripts/
│ │ ├── queue_lesson.py # 写 lesson
│ │ ├── search_knowledge.py # 检索知识
│ │ └── ...
│ └── schema/
├── storage/
│ ├── knowledge_graph.py # 知识图谱
│ └── vector_store.py # 向量存储
└── docs/agents/ # 代理操作指南
├── retrieval-and-contribution.md
├── knowledge-structure.md
└── node-injection.md
lessons/ 目录
存放踩坑记录,格式:
- 文件名:
领域-问题描述.md - 内容:问题→根因→修复→验证
- 长度:几百字
reference/ 目录
存放完整方案,格式:
- 文件名:
项目-方案描述.md - 内容:需求→规划→代码→上下文
- 长度:几千字
检索系统
search_knowledge.py
# 检索所有
python3 search_knowledge.py "关键词"
# 只看 lessons
python3 search_knowledge.py "关键词" --lessons
# 只看 reference
python3 search_knowledge.py "关键词" --ref
# 只看标题
python3 search_knowledge.py "关键词" --titles
索引机制
- lessons/ 和 reference/ 通过 inotify 热加载
- 知识图谱存储在 storage/knowledge_graph.py
- 向量存储在 storage/vector_store.py
节点注入规则
| 节点类型 | 方式 | 说明 |
|---|---|---|
| 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 |
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.
- 2d ago First seen · 71 lines · 0 tokens per session scan A f2e31c0caa9a
knowledge-structure is an agent published in the GitHub repository Ikalus1988/MisakaNet (432 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 568 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.
Other agents, from other repositories
Custom Agent Foundry
Expert at designing and creating VS Code custom agents with optimal configurations.
Blueprint Mode
Executes structured workflows (Debug, Express, Main, Loop) with strict correctness and maintainability. Enforces an improved tool usage policy, never assumes facts, prioritizes reproducible solutions, self-correction, and edge-case handling.
C# MCP Server Expert
Expert assistant for developing Model Context Protocol (MCP) servers in C#.
ai-team-dev
AI development team (Nova, Sage, Milo). Use when implementing features, fixing bugs, writing tests, improving user experience, or preparing a pull request across the project's actual stack.
agent-tools
Agent tools let one chat agent dispatch another chat-capable sub-agent as part of its work — per-run, parent-supervised delegation is the flagship use case for facet-backed dynamic agents. The child is a real sub-agent with its own Durable Object storage, messages, tools, resumable stream, and drill-in URL. The parent…
human-in-the-loop
Human-in-the-loop (HITL) patterns allow agents to pause execution and wait for human approval, confirmation, or input before proceeding. This is essential for compliance, safety, and oversight in agentic systems.