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 instructions/wxkingstar/specfusion/agents-mdgit clone --depth 1 https://github.com/wxkingstar/SpecFusionWrote 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/instructions/wxkingstar/specfusion/agents-md)<a href="https://agentmods.dev/instructions/wxkingstar/specfusion/agents-md"><img src="https://agentmods.dev/badge/instructions/wxkingstar/specfusion/agents-md.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 | $0.00717 | $0.00717 |
| Opus 5 | $0.00358 | $0.00358 |
| Sonnet 5 | $0.00143 | $0.00143 |
| Haiku 4.5 | $0.00072 | $0.00072 |
Grade A, and why
SpecFusion AGENTS.md 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 4d 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
SpecFusion
多源 API 文档融合搜索 Skill — 云端检索,零安装,即问即答
项目结构
SpecFusion/
├── api/ # API 服务(Fastify + SQLite)
├── scrapers/ # 文档抓取/同步脚本(仅本地使用,不部署到服务器)
├── scripts/ # 部署脚本
├── specfusion/ # Skill 文件(SKILL.md)
├── dsh-plugin/ # DeepSeek Harness 插件(@wxkingstar/specfusion-dsh)
├── data/ # SQLite 数据库(specfusion.db)
├── Makefile # K8s 部署 + 全量同步命令(make help 查看)
开发命令
# 安装依赖
npm install
# 启动 API 服务(开发模式,热重载)
npm run dev
# 运行文档同步
npm run sync -- --source feishu
# 构建
npm run build
部署
支持 Docker 和 Kubernetes 部署,详见 README.md 中的自部署指南。
官网
官网代码目录:/Users/wangxin/work/node/specfusion-web,部署在 Vercel 上。
技术栈
- API:Node.js + Fastify + better-sqlite3 + FTS5
- 中文分词:nodejieba
- Scraper:Node.js + TypeScript + cheerio + playwright
- 构建:tsup + tsx
关键设计
- 所有公开 API 返回
text/markdown格式(非 JSON),health 端点除外返回 JSON - 中文搜索使用 jieba 预分词 + FTS5 unicode61
- 数据库仅使用 SQLite,不引入其他存储
- tsup 将 API 打包为单文件
dist/index.js,代码中用resolve(__dirname, '../../db/schema.sql')定位 schema,Docker 和旧 VPS 部署均通过 symlink 解决路径 - 详细设计见 SPECFUSION_PLAN.md
数据库路径
项目统一使用 data/specfusion.db(项目根目录)。dev 服务和 K8s 部署共用同一个文件,scraper 同步后可直接上传,无需合并。
Playwright Scraper 编码规范
编写使用 Playwright 的 scraper 时,注意以下性能陷阱:
- 禁止在循环中用高 timeout 的 click/waitFor 探测元素是否存在:
page.click('text=xxx', { timeout: 2000 })在元素不存在时会白等 2 秒。如果在每页导航后都尝试多次,累积开销巨大(N 页 × M 次 × timeout)。应只在首次加载时探测,或用page.locator().count()零等待判断 fetchContent循环中用domcontentloaded而非networkidle:SPA 页面可能有持续的后台请求导致 networkidle 永远等不到。正确做法是waitUntil: 'domcontentloaded'+waitForSelector等待目标内容出现- 单页面串行导航时,并发度必须设为 1:Playwright 同一 page 实例不能并行 goto
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.
- 4d ago First seen · 68 lines · 717 tokens per session scan A 5633c626f4b8
SpecFusion AGENTS.md is an instructions file published in the GitHub repository wxkingstar/SpecFusion (59 stars, last pushed 13d ago), licensed MIT. It adds 717 tokens to every session, about $0.0036 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 instructions, from other repositories
doc-hub-mcp CLAUDE.md
Claude Code instructions for wxkingstar/doc-hub-mcp, covering doc-hub-mcp 项目规则, 发布流程, 1. 版本发布(github release + npm publish), 1) 更新 package.json 版本号 and 2) 提交版本号变更.
botmux CLAUDE.md
Claude Code instructions for deepcoldy/botmux, covering botmux, 构建 & 运行, bun 开发链路, worktree 的 nodemodules:共享还是独立(改前必读) and 编译态(单文件二进制)注意.
nextclaw AGENTS.md
AGENTS.md instructions for Peiiii/nextclaw, covering nextclaw ai 常驻内核, 产品愿景, 沟通与推进, 深思与目标模式 and 协作与 git 安全.
metabot CLAUDE.md
Claude Code instructions for xvirobotics/metabot: The canonical project instructions are in AGENTS.md. Follow that file for this repository. This compatibility file exists for Claude Code; MetaBot install/update does not deploy or replace workspace instruction files.
nexu AGENTS.md
Instructions for nexu-io/nexu, covering agents.md, repo overview, project overview, commands and branch model.
larksnap CLAUDE.md
Instructions for AmbroseX/larksnap, covering 基本约定, plan 文件管理, 开发规范, 根据场景动态调整顺序 and 文档写入.