dbs-skill-maker
Converts recurring problems into installable, hierarchically verifiable standalone Skills through requirement analysis. Used when the user requests creating a Skill, crystallizing a problem into a Skill, or checking/testing a candidate Skill; prepares a GitHub repository and verifies `npx skills add` only when the user explicitly requests sharing or publishing.
1How It Works & Mechanism
The primary entry point is a state table: read the current dialogue and target directory first, then decide which single references file to load based on 'current evidence' instead of stuffing the entire workflow in at once.
| 只有一个想法,问题和完成态不清 | 形成问题契约与完成条件 | [references/problem-and-goal.md](references/problem-and-goal.md) |
Treat the skill package structure as a design constraint: keep common decisions in SKILL.md, delegate conditional knowledge down to references/, and delegate repetitive, deterministic operations down to scripts/.
**主入口保持轻。** `SKILL.md` 保存共同决策、关键流程和停止条件;条件性细节放进 `references/`,重复且确定的工作放进 `scripts/`。
Delivery discipline is 'start from the problem + generate real files directly'; passing off solution descriptions or empty skeletons as finished products is prohibited.
**从问题开始。** 先确定 Skill 反复解决什么问题、在什么情境使用、出现什么证据算完成。
Use executable scripts to handle deterministic tasks: skeleton initialization, structural validation, release staging, and npx installation verification, with four scripts each handling one phase.
Create a minimal single-Skill project without overwriting existing files."""
The validation script intercepts unfinished placeholders and suspected secrets, turning 'skeleton handoffs' and 'leaked secrets' into mechanically detectable failures.
UNFINISHED_MARKERS = ("[TODO", "TODO:", "FIXME", "{说明", "{写入", "{可观察", "<待填写>")
Verification is divided into four tiers and can only be stated according to the highest tier actually executed; packaging structural validation as 'verified' is prohibited.
未实际运行行为任务时,只能报告第 1 级。没有留出收益或出现关键回归时,不能宣称 Skill 已经变强。详细记录方式见 [references/evaluation.md](references/evaluation.md)。
Any remote side effects require separate authorization: preparing a repository ≠ obtaining authorization to push.
准备仓库不等于获得远端写入授权。执行 `gh repo create`、`git push`、创建 tag 或 Release 前,确认用户的明确要求能够覆盖该动作。
The integrity of the publishing pipeline is verified via script: execute npx installation in an isolated temporary HOME, then run file-by-file cmp between the source directory and installation result.
HOME="$temporary_home" "$skill_maker_npx" -y skills add "$source_locator" -g --all
Staging discipline before publishing is codified as a hard rule: git add . / git add -A is prohibited; stage only via explicit paths.
不使用 `git add .` 或 `git add -A`;发布时只暂存明确文件。
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | python3(运行自带 scripts/*.py;纯本地,无网络) |
| package | skills —— 生态官方安装器包(仅发布验证脚本经 npx -y 拉取执行) |
| cli | git / gh(仅发布流程,且需用户授权;凭据由宿主 CLI 自理) |
| network | GitHub(远端仓库创建/推送)与 npm registry(npx 取包) |
4Recommended Governance & Evidence
- scripts/: Execute local scripts or commands: python3 scripts/init_skill_project.py <skill-name> --output <parent_dir> (generates new Skill)
- 外部 API: Perform posts, resource creation, or write operations on external platforms
- 本地工作目录: File read/write and artifact output: Create new Skill directories and files in user-specified parent directory (init_skill_project.py, refuses to overwrite existing real directories)
5Second-Pass Verification
- [ok] SKILL.md 的状态路由表真实存在且引用文件齐全 — 7 行路由表引用的 5 个 references 文件全部存在于 skills/dbs-skill-maker/references/。
- [ok] 四个脚本各自用途与宣称一致 — init/validate/prepare 三个 python 脚本 + 1 个 bash 安装验证脚本,均实读确认;validate 内确有 subprocess 用于 py 语法检查。
- [ok] "准备仓库不等于获得远端写入授权"可定位 — SKILL.md「GitHub 发布边界」节原文含该句;github-publishing.md「授权边界」节给出同义规则。
- [ok] 安装验证不是文字检查而是真装 — verify_npx_install.sh 用 mktemp 临时 HOME 执行 npx skills add,并逐文件 cmp 源目录与安装结果,输出"安装验证通过"计数。
- [ok] 网络/远端依赖清单无遗漏 — 目录级扫描仅命中 npx(verify 脚本与 SKILL.md 安装命令)、git/gh、GitHub/npm 相关文本;三个 python 脚本无 urllib/requests/socket 调用。
- [ok] 是否读取用户凭证 — 三个 python 脚本均无读取 ~/.gitconfig、gh 配置或 env 中 token 的代码;SECRET_PATTERN 仅用于扫描候选文件中的疑似密钥以拦截外泄。
- [ok] "不覆盖现有真实目录"是否属实 — init_skill_project.py docstring 为 "Create a minimal single-Skill project without overwriting existing files.",并含同名冲突检查。
- [ok] 分级验证等级表与"只能报第 1 级" — SKILL.md「未实际运行行为任务时,只能报告第 1 级。」与四级表格并存,无夸大表述。
6Verdict & Scenarios
e296c070f776d446…