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 skills/lululu811/init-knowledge-base/refreshnpx skills add lululu811/init-knowledge-base --skill refreshgit clone --depth 1 https://github.com/lululu811/init-knowledge-baseWhat 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.00107 | $0.02219 |
| Opus 5 | $0.00053 | $0.01110 |
| Sonnet 5 | $0.00021 | $0.00444 |
| Haiku 4.5 | $0.00011 | $0.00222 |
Grade A, and why
refresh 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 3d 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 — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
refresh 技能:联网时效性更新
核心目标
知识库会随时间推移而过时。本技能通过联网搜索,主动验证和更新 wiki/ 中的陈旧内容,确保知识的时效性和准确性。
触发场景
- 用户输入
/refresh— 全局扫描陈旧页面并联网更新 - 用户输入
/refresh <页面名>— 更新指定页面 - 用户输入
/refresh --tag=<标签>— 按标签批量更新 - 用户说"知识库该更新了"、"检查一下过时内容"、"联网刷新知识库"
状态追踪机制
通过 frontmatter 中的 last_refreshed 字段和 .claude/refresh-state.json 追踪刷新状态:
{
"version": 1,
"last_full_scan": "2026-08-15T10:00:00",
"pages": {
"wiki/concepts/Transformer.md": {
"last_refreshed": "2026-08-15T10:30:00",
"status": "current",
"changes": ["更新了参数规模数据", "补充了 GPT-5 相关引用"],
"sources_added": ["https://example.com/new-info"]
}
}
}
状态规则
| 状态 | 含义 |
|---|---|
current |
联网验证过,内容仍然准确 |
updated |
联网后发现新信息,已更新页面 |
conflict |
联网后发现矛盾信息,已标记冲突 |
stale |
超过刷新周期,待处理 |
failed |
上次刷新失败(网络错误等),需重试 |
刷新流水线
步骤 1:识别刷新候选
全局扫描模式(/refresh):
- 读取
wiki/下所有带 frontmatter 的.md文件(排除 index.md、log.md) - 检查
last_refreshed字段(若无此字段,使用last_updated) - 按优先级排序候选页面:
- 高优先:超过 90 天未刷新 + 主题属于快变领域(AI/技术/商业/政策)
- 中优先:超过 90 天未刷新 + 主题属于慢变领域(科学/历史/哲学)
- 低优先:超过 180 天未刷新 + 主题属于稳定领域
- 跳过:30 天内已刷新且状态为
current
- 状态为
draft的页面也纳入候选(可能有信息缺口可补充)
指定页面模式(/refresh <页面名>):
直接定位目标页面,跳过扫描步骤。
按标签模式(/refresh --tag=<标签>):
扫描带有指定标签的所有页面。
步骤 2:提取搜索关键词
对每个候选页面:
- 读取完整内容
- 提取页面标题作为核心搜索词
- 从 frontmatter 的
tags提取辅助关键词 - 从"一句话定义"或"核心摘要"提取关键概念
- 构造搜索查询:
- 基础查询:
{标题} {关键概念} 最新 2025 2026 - 补充查询:
{标题} 更新 变化 新进展 - 实体查询:
{实体名} 最新动态 新闻
- 基础查询:
步骤 3:联网搜索
- 使用搜索工具执行步骤 2 构造的查询
- 读取排名前 3-5 的搜索结果
- 提取关键事实:
- 新数据/新数字(市值、参数量、版本号等)
- 新事件(融资、发布、人事变动等)
- 新观点/新论文
- 对已有信息的验证或推翻
步骤 4:对比分析
将搜索结果与现有 wiki 内容逐项对比:
| 情况 | 处理方式 |
|---|---|
| 新信息补充现有内容 | 标记为"待追加" |
| 新信息与现有内容矛盾 | 标记为"待冲突处理" |
| 现有内容被验证仍准确 | 标记为"已验证" |
| 搜索结果与主题无关或无新信息 | 标记为"无更新" |
| 发现新实体/概念需创建页面 | 标记为"待创建" |
步骤 5:更新页面
更新类型 A — 追加新信息:
在页面的相应区块追加新内容,并在末尾添加时效性更新标记:
## 时效性更新
> [!info] 联网刷新 — YYYY-MM-DD
> 已通过联网搜索验证并更新本页面内容。
- **追加**:[新信息摘要] — 来源:[URL]
- **更新**:[旧数据] → [新数据] — 来源:[URL]
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.
- 3d ago First seen · 228 lines · 107 tokens per session scan A 1d8e93510b3f
refresh is a skill published in the GitHub repository lululu811/init-knowledge-base (23 stars, last pushed 18d ago), licensed MIT. It adds 107 tokens to every session and 2,219 once invoked, about $0.0005 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 skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…