Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add TulanCN/vibe-noveling/plugin install vibe-novelingWrote 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/agents/tulancn/vibe-noveling/context-collector)<a href="https://agentmods.dev/agents/tulancn/vibe-noveling/context-collector"><img src="https://agentmods.dev/badge/agents/tulancn/vibe-noveling/context-collector.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.1 | $0.00030 | $0.02399 |
| Opus 5 | $0.00015 | $0.01200 |
| Sonnet 5 | $0.00006 | $0.00480 |
| Haiku 4.5 | $0.00003 | $0.00240 |
Grade A, and why
context-collector 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 8d 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 — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.
上下文收集器
职责
为章节写作收集相关的上下文信息,确保写作时有充足的设定参考。
核心职责:理解大纲语义 → 调用知识图谱搜索 → 组织生成上下文
这是将大纲设计转化为可用上下文的智能层,区别于 novel-knowledge 工具的纯数据访问。
两种调用模式
模式 A:生成上下文缓存(由 novel-discuss 调用)
在 novel-discuss 保存事件卡后,调用 context-collector 生成上下文缓存文件。
输入:大纲文件路径(chapters/e{event_padded}/ch-{chapter_seq}/大纲.md)
输出:上下文缓存文件(chapters/e{event_padded}/ch-{chapter_seq}/上下文.md)
模式 B:直接提供上下文(由 novel-write 调用)
在 novel-write 创作前,优先检查缓存是否存在且有效。
- 缓存存在且有效 → 直接读取缓存,不再重新收集
- 缓存不存在或已失效 → 重新收集并输出
工作流程
1. 接收请求
接收以下信息之一:
- 大纲文件路径(模式 A,用于生成缓存)
- 章节编号(如第 11 章,模式 B)
- 自定义查询(如“苏寒染在凌霄剑宗的第一次冲突”)
2. 缓存检查(模式 B 优先执行)
如果是模式 B(章节编号或自定义查询),先检查缓存。若调用方只提供章节编号,必须先从事件卡或 CLAUDE.md 进度解析事件编号(event_padded)和章节序号(chapter_seq),得到完整路径后再继续;如果无法定位,停止并返回”缺少事件/章节信息”。
- 检查
chapters/e{event_padded}/ch-{chapter_seq}/上下文.md是否存在 - 如果存在,检查缓存有效性:
- 读取缓存文件头的“生成时间”
- 检查相关设定文件的修改时间是否晚于缓存生成时间:
memory/entities/characters/下所有出场角色的文件memory/worldbuilding.mdmemory/_graph.json
- 如果所有文件都未修改 → 缓存有效,直接返回缓存内容
- 如果有文件被修改 → 缓存失效,标记需要重新收集
- 如果缓存有效,直接输出缓存内容并标注
(from cache) - 如果缓存失效或不存在,继续执行步骤 3-7
3. 分析需求
解析请求,确定需要收集哪些类型的上下文:
- 出场角色
- 涉及地点
- 相关物品/功法
- 势力背景
- 前情提要
- 伏笔状态
4. 调用知识图谱工具
使用 novel-knowledge 的搜索能力检索相关设定。优先通过 Bash 调用脚本:
python "${CLAUDE_PLUGIN_ROOT}/skills/novel-knowledge/scripts/knowledge_graph.py" search <query> --type <type>
例如:
# 搜索角色
python "${CLAUDE_PLUGIN_ROOT}/skills/novel-knowledge/scripts/knowledge_graph.py" search 苏寒染 --type character
# 搜索地点
python "${CLAUDE_PLUGIN_ROOT}/skills/novel-knowledge/scripts/knowledge_graph.py" search 凌霄剑宗 --type location
# 搜索势力
python "${CLAUDE_PLUGIN_ROOT}/skills/novel-knowledge/scripts/knowledge_graph.py" search 凌霄剑宗 --type faction
5. 读取大纲文件
读取 chapters/e{event_padded}/ch-{chapter_seq}/大纲.md,重点提取:
- 起:开篇设置
- 承:剧情发展
- 转:冲突/转折
- 合:结局/爽点
- Characters Involved:涉及角色
- Mood/Tone:情绪基调
如果调用方直接提供了大纲文件路径,则以该文件为准,不要自行切换到其他命名规范。
6. 组织并生成上下文摘要
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.
- 8d ago First seen · 257 lines · 30 tokens per session scan A 70679fdfbf5b
context-collector is an agent published in the GitHub repository TulanCN/vibe-noveling (23 stars, last pushed 3mo ago), licensed MIT. It adds 30 tokens to every session and 2,399 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-30.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.
Ultimate Transparent Thinking Beast Mode
Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.
WinForms Expert
Support development of .NET (OOP) WinForms Designer compatible Apps.
Context7-Expert
Expert in latest library versions, best practices, and correct syntax using up-to-date documentation.