Borrowing it
Nothing to install: this file belongs to wxkingstar/SpecFusion. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/wxkingstar/SpecFusion/main/CLAUDE.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/claude-md)<a href="https://agentmods.dev/instructions/wxkingstar/specfusion/claude-md"><img src="https://agentmods.dev/badge/instructions/wxkingstar/specfusion/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/wxkingstar/specfusion/claude-md"><img src="https://agentmods.dev/badge/instructions/wxkingstar/specfusion/claude-md.svg" alt="Reviewed on agentmods" width="80" 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.01712 | $0.01712 |
| Opus 5.5 | $0.00685 | $0.00685 |
| Sonnet 5.5 | $0.00342 | $0.00342 |
| Haiku 4.5 | $0.00171 | $0.00171 |
Grade A, and why
SpecFusion CLAUDE.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 1mo 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 — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SpecFusion
多源 API 文档融合搜索 Skill — 云端检索,零安装,即问即答
项目结构
SpecFusion/
├── api/ # API 服务(Fastify + SQLite)
├── scrapers/ # 文档抓取/同步脚本(仅本地使用,不部署到服务器)
├── scripts/ # 部署脚本
├── specfusion/ # Skill 文件(SKILL.md)
├── 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 + ego lite(浏览器抓取)
- 构建: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 同步后可直接上传,无需合并。
浏览器抓取:ego lite
需要浏览器的源(dingtalk / xiaohongshu / dewu / jd / wecom / pinduoduo)不再自己
chromium.launch(),而是复用 ego lite 的浏览器 —— 带用户
登录态和真实浏览器指纹,反爬站点更不容易拦。
ego lite 不对外暴露 CDP 端口,Playwright 的 connectOverCDP 走不通,只能通过
ego-browser nodejs 运行时。因此架构是:
scrapers/src/sources/*.ts
↓ EgoPage / EgoHttpClient(Playwright、axios 风格接口)
scrapers/src/utils/ego-page.ts
↓ HTTP
scripts/ego-bridge.mjs(常驻在 ego lite 的 Node 运行时里)
↓ ego helper
ego lite 浏览器
# 启动桥接(抓取前必须先起)
scripts/ego-bridge.sh # 默认 39222
scripts/ego-bridge.sh 39223 "另一个任务空间" # 并发跑第二个源时
# 桥接地址通过 EGO_BRIDGE_URL 传给 scraper
EGO_BRIDGE_URL=http://127.0.0.1:39223 npx tsx scrapers/src/cli.ts sync jd
编码规范
- 一个桥接同时只能跑一个源:一个桥接 = 一个 task space = 一个标签页,两个源共用
会互相抢标签,报
Inspected target navigated or closed。并发抓取要各起各的端口 + task space - 爬取一律用
gotoAndWait在当前标签内导航,不要用openOrReuseTab:后者对每个 新 URL 都开新标签,翻上千页会堆出上千标签拖垮浏览器 - 响应体要等
Network.loadingFinished才能取,在responseReceived时取会拿到 空值,大接口尤其明显(京东曾因此目录从 6,294 篇掉到 3,534 篇) - 改动浏览器层后,务必拿旧实现跑一次目录对照再决定是否 prune,否则可能误删几千篇
fetchContent循环中等目标选择器,而不是 networkidle:SPA 页面的后台请求可能 永不停歇- 单页面串行导航时并发度必须为 1(
SOURCE_CONCURRENCY)
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.
- 1mo ago Changed · +16 lines · +364 tokens per session f24c556bc670
- 1mo ago First seen · 125 lines · 1,348 tokens per session scan A d938595ad8bc
SpecFusion CLAUDE.md is an instructions file published in the GitHub repository wxkingstar/SpecFusion (74 stars, last pushed 1mo ago), licensed MIT. It adds 1,712 tokens to every session, about $0.0068 per session on Opus 5.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
plan-forge caching.instructions.md
Caching patterns for .NET — IDistributedCache, Redis, in-memory, cache-aside, TTL strategies.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).