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/syz-coder/codebase-knowledge-wiki/backend-service-spec-skillnpx skills add SYZ-Coder/codebase-knowledge-wiki --skill backend-service-spec-skillgit clone --depth 1 https://github.com/SYZ-Coder/codebase-knowledge-wikiWhat 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.00097 | $0.03248 |
| Opus 5 | $0.00048 | $0.01624 |
| Sonnet 5 | $0.00019 | $0.00650 |
| Haiku 4.5 | $0.00010 | $0.00325 |
Grade A, and why
backend-service-spec-skill 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 — 351 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend Service Spec Skill
用于把单服务、跨服务、业务域、通信链路、事实需求五类梳理动作统一成一套可复用知识技能。
0. 何时使用
当用户出现以下目标时,使用本技能:
- 想梳理旧系统、微服务、平台型仓库的代码总图
- 想做跨服务调用链、接口链路、消息链路排查
- 想把零散服务文档上卷成“域 -> 服务 -> 规范”三层知识
- 想对单个高价值服务做纵切梳理
- 想在历史 PRD 缺失时,按功能模块从代码事实抽取当前系统事实需求
- 想把代码知识沉淀成团队可复用的中央知识库,而不是停留在一次对话里
如果只是实现功能、修 Bug、写测试,而不是做知识梳理,不优先使用本技能。
1. 核心原则
始终遵守以下约束:
- 严格按代码事实输出,不把猜测写成事实
- 先索引,后正文:先建立地图,再沉淀稳定知识页
- Codemap 是索引层,不是最终知识库正文
- 业务域页的价值是“上卷整理”,不是重复抄写服务页
- 跨服务链路必须区分同步调用、异步消息、定时/补偿、实时通道
- 事实需求抽取必须区分当前代码事实、单边线索、数据线索和待人工确认项
- 无法闭环验证的内容必须显式标注证据等级,不能伪装成已确认
- 如果只看到单边依赖、单边契约、单边 producer/listener,不得直接写成双边已确认闭环
- 在进入正式梳理前,先做 workspace 范围识别
2. 执行前置:workspace 范围识别
在运行核心功能前,先用最小成本判断当前 scope 属于哪一种:
single-system: 单一系统 / 单一运行时家族service-family: 同一家族、多服务协作multi-system-workspace: 多套系统共存的工作区
最少要回答三个问题:
- 当前 scope 是单系统、服务家族,还是多系统并存工作区
- 本轮目标是全景索引、关键链路、还是稳定知识页
- 当前产物应该落在
mydocs/的哪一层
如果识别为 multi-system-workspace:
- 第一轮优先
create_codemap: mode=service_landscape - 先切 family,再做闭环链路
- 不要直接上
build_domain_map
详见:references/workspace-classification.md
3. 核心功能
3.1 跨服务 create_codemap
用途:
- 在多服务、微服务、平台仓库中生成跨服务 CodeMap
- 继承 sdd-riper 的
create_codemap思想,但升级为“服务间视角” - 不只看单项目结构,还看服务注册、调用方向、依赖关系、上下游角色、关键链路
适用输入:
create_codemap: mode=service_landscape, scope=<系统名或服务群>, goal=<梳理目标>
也兼容:
create_codemap: mode=project, scope=<项目名>, goal=<输出项目总图与核心流程>
create_codemap: mode=feature, scope=<关键功能或链路>, goal=<梳理核心入口与主链路>
create_codemap: mode=service_chain, scope=<跨服务业务链>, goal=<梳理服务级链路>
输出重点:
- 服务清单
- 服务职责边界
- 服务间调用关系
- 入口与出口
- 同步/异步链路索引
- 外部系统依赖
- 风险热点
- 代码证据来源
- workspace 范围判断
默认产物:
mydocs/codemap/YYYY-MM-DD_hh-mm_<name>服务总图.mdmydocs/codemap/YYYY-MM-DD_hh-mm_<name>链路地图.md
详情模板见 references/codemap-modes.md
3.2 跨服务业务域梳理
用途:
- 把零散服务知识提升为团队可复用的上下文层
- 形成“域 -> 服务 -> 规范”三层知识结构
- 支持中央仓库、Wiki、OpenSpec、旧系统知识库共建
适用输入:
build_domain_map: scope=<系统或服务群>, goal=<按业务域梳理>
输出规则:
- 域层只做上卷整理,不重写服务页全文
- 域层必须区分:强事实承载服务、线索级关联服务、仍待补证关系
- 规范层必须区分:
code-fact-summary与team-proposed-standard - 最好先完成关键服务的
service_deep_dive,再做业务域梳理
What ships with it
29 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/openai.yaml 768 B
- README.md 14 KB
- README.zh-CN.md 15 KB
- references/central-repo-conventions.md 3.8 KB
- references/codemap-modes.md 2.0 KB
- references/command-output-map.md 3.0 KB
- references/command-output-map.zh-CN.md 4.4 KB
- references/command-output-scenario-quickref.md 3.4 KB
- references/command-output-scenario-quickref.zh-CN.md 4.1 KB
- references/diagram-output-guidelines.md 3.3 KB
- references/diagram-output-guidelines.zh-CN.md 3.3 KB
- references/domain-layering.md 1.1 KB
- references/incremental-update-policy.md 2.7 KB
- references/knowledge-lifecycle.md 2.7 KB
- references/mermaid-safety-checklist.zh-CN.md 4.7 KB
- references/output-templates.md 6.2 KB
- references/personal-workflow.md 4.0 KB
- references/personal-workflow.zh-CN.md 3.5 KB
- references/quality-checklist.md 4.3 KB
- references/quick-start.md 3.5 KB
- references/quick-start.zh-CN.md 3.8 KB
- references/README.md 3.6 KB
- references/README.zh-CN.md 3.5 KB
- references/requirement-fact-extraction.md 5.4 KB
- references/router-map.md 2.1 KB
- references/service-deep-dive.md 2.5 KB
- references/usage-guide.md 6.4 KB
- references/workflow-state-model.md 2.9 KB
- references/workspace-classification.md 2.0 KB
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 · 351 lines · 97 tokens per session scan A 5c43e4f2fb33
backend-service-spec-skill is a skill published in the GitHub repository SYZ-Coder/codebase-knowledge-wiki (9 stars, last pushed 2mo ago), licensed MIT. It adds 97 tokens to every session and 3,248 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-31.
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…