Writing Memorb Skills (Meta)
The counterpart to superpowers' writing-skills. Any procedure run by hand more than twice should be frozen into a skill.
When to add a skill
- A workflow has been executed manually more than twice
- A section of CLAUDE.md keeps growing (CLAUDE.md is capped at 100 lines; workflow detail belongs in a skill)
- The user asks for one outright
Skill structure
- Location:
skills/{kebab-case-name}/SKILL.md (flat, never nested)
- Frontmatter: exactly two fields,
name and description
description must carry: a one-line statement of purpose + 觸發詞:... + any prerequisite dependency
- Trigger phrases are the words the user will actually say, Traditional Chinese leading (see Language below)
- Body (take what the skill needs):
- Order of operations (numbered steps, with the hard rules called out)
- Path and format specification tables
- A Red Flags table (excuse vs. reality) — treat this as mandatory for workflow skills
*(待固化:...)* to mark the parts that are not settled yet
- Single responsibility: one skill, one job; if it straddles domains, split it and have the halves reference each other
Registration checklist (no step is optional)
- Create or modify the
SKILL.md
- Update the router table in
memorb/SKILL.md (add a row: skill name + when it triggers)
- Update
plugin.json (the skills array has to list it, or the linter blocks you)
- If this touches CLAUDE.md's Skills Registry or its workflow summary, update those in step (keep it ≤100 lines)
- Do not append skill-only maintenance to
memorbs/log.md; the Memory Commit Journal records meaningful memory events, not documentation or tooling changes.
git operations are outside this framework's remit; the user decides when to commit.
Language
Three audiences, three languages, and they do not overlap:
- SKILL.md instruction bodies are English. Contributors who install this plugin read them, not just the author who wrote them.
description trigger phrases stay bilingual. Routing matches against what the user actually says, and the user speaks Traditional Chinese — so list both, English phrases and the Chinese ones side by side.
- Content written into the vault stays Traditional Chinese. That covers sample notes, filenames, and output templates, which is exactly why they sit inside fenced code blocks.
scripts/lint-skills.js enforces this by measuring the CJK ratio of the body — frontmatter and fenced code blocks excluded from the count — against a 10% ceiling. A ratio, not zero, so an inline term or a quoted trigger word does not trip the check.
Testing
- Once a new skill is written, simulate a triggering scenario and walk the steps end to end, confirming the paths and commands actually run
- Run
npm run lint (equivalent to node scripts/lint-skills.js): it checks frontmatter validity, that the router table and the skills/ directory agree (no orphan skill left unregistered in plugin.json), that the fixtures structure still matches the SSOT, and that no stale old-path spellings survive
- Run
npm run test:links plus npm run lint:fixtures: the sandbox contract suite proves valid wikilinks pass while broken links and bare internal paths fail; the fixture vault then verifies that examples contain only resolvable Obsidian graph edges
- On
git commit the same skill and fixture-link linters run again through scripts/git-hooks/pre-commit (installed by scripts/install-hooks.sh, hooked up automatically by the prepare script during npm install). Any error blocks the commit outright, so you find out immediately instead of a round later from a human
When the architecture is renamed (folder renames, namespaces retired)
Add the old spelling to the DEPRECATED_PATTERNS list in scripts/lint-skills.js (pattern, suggested replacement, reason). From then on every npm run lint and every commit sweeps all the Markdown under skills/, fixtures/, and README.md for references that were never migrated — no more grepping the whole repo by hand each time.
Red Flags
| Excuse |
Reality |
| "The skill is written, I'll add it to the router table later" |
Not in the router table = never triggered. No step of the registration checklist is optional. |
| "The description can be sloppy, the body is what matters" |
Routing fires on the description's trigger phrases. Get them wrong and the skill never runs. |
| "It's faster to just put the rule straight into CLAUDE.md" |
CLAUDE.md is the schema layer (capped at 100 lines); workflows belong in skills. |
| "For this rename I'll only touch the files the user pointed at" |
If the old spelling never makes it into DEPRECATED_PATTERNS, the next time you fall in the same hole you are back to grepping the whole repo by hand. |
1---2name: writing-memorb-skills3description: Meta skill for adding or changing any sub-skill in this vault. Governs naming, frontmatter, structure, the registration checklist, and testing. Triggers: add a skill, write a skill, modify a skill, turn this into a skill, we keep doing this by hand, 新增 skill, 寫一個 skill, 修改 skill, 固化流程, 這個流程以後常做.4---56# Writing Memorb Skills (Meta)78> The counterpart to superpowers' writing-skills. Any procedure run by hand more than twice should be frozen into a skill.910## When to add a skill1112- A workflow has been executed manually more than twice13- A section of CLAUDE.md keeps growing (CLAUDE.md is capped at 100 lines; workflow detail belongs in a skill)14- The user asks for one outright1516## Skill structure17181. **Location**: `skills/{kebab-case-name}/SKILL.md` (flat, never nested)192. **Frontmatter**: exactly two fields, `name` and `description`20 - `description` must carry: a one-line statement of purpose + `觸發詞:...` + any prerequisite dependency21 - Trigger phrases are the words the user will actually say, Traditional Chinese leading (see **Language** below)223. **Body** (take what the skill needs):23 - Order of operations (numbered steps, with the hard rules called out)24 - Path and format specification tables25 - A Red Flags table (excuse vs. reality) — treat this as mandatory for workflow skills26 - `*(待固化:...)*` to mark the parts that are not settled yet274. **Single responsibility**: one skill, one job; if it straddles domains, split it and have the halves reference each other2829## Registration checklist (no step is optional)30311. Create or modify the `SKILL.md`322. Update the router table in `memorb/SKILL.md` (add a row: skill name + when it triggers)333. Update `plugin.json` (the `skills` array has to list it, or the linter blocks you)344. If this touches CLAUDE.md's Skills Registry or its workflow summary, update those in step (keep it ≤100 lines)355. Do **not** append skill-only maintenance to `memorbs/log.md`; the Memory Commit Journal records meaningful memory events, not documentation or tooling changes.3637> git operations are outside this framework's remit; the user decides when to commit.3839## Language4041Three audiences, three languages, and they do not overlap:4243- **SKILL.md instruction bodies are English.** Contributors who install this plugin read them, not just the author who wrote them.44- **`description` trigger phrases stay bilingual.** Routing matches against what the user actually says, and the user speaks Traditional Chinese — so list both, English phrases and the Chinese ones side by side.45- **Content written into the vault stays Traditional Chinese.** That covers sample notes, filenames, and output templates, which is exactly why they sit inside fenced code blocks.4647`scripts/lint-skills.js` enforces this by measuring the CJK ratio of the body — frontmatter and fenced code blocks excluded from the count — against a 10% ceiling. A ratio, not zero, so an inline term or a quoted trigger word does not trip the check.4849## Testing5051- Once a new skill is written, simulate a triggering scenario and walk the steps end to end, confirming the paths and commands actually run52- Run `npm run lint` (equivalent to `node scripts/lint-skills.js`): it checks frontmatter validity, that the router table and the `skills/` directory agree (no orphan skill left unregistered in `plugin.json`), that the fixtures structure still matches the SSOT, and that no stale old-path spellings survive53- Run `npm run test:links` plus `npm run lint:fixtures`: the sandbox contract suite proves valid wikilinks pass while broken links and bare internal paths fail; the fixture vault then verifies that examples contain only resolvable Obsidian graph edges54- On `git commit` the same skill and fixture-link linters run again through `scripts/git-hooks/pre-commit` (installed by `scripts/install-hooks.sh`, hooked up automatically by the `prepare` script during `npm install`). Any error blocks the commit outright, so you find out immediately instead of a round later from a human5556### When the architecture is renamed (folder renames, namespaces retired)5758Add the old spelling to the `DEPRECATED_PATTERNS` list in `scripts/lint-skills.js` (pattern, suggested replacement, reason). From then on every `npm run lint` and every commit sweeps all the Markdown under `skills/`, `fixtures/`, and `README.md` for references that were never migrated — no more grepping the whole repo by hand each time.5960## Red Flags6162| Excuse | Reality |63|------|---------|64| "The skill is written, I'll add it to the router table later" | Not in the router table = never triggered. No step of the registration checklist is optional. |65| "The description can be sloppy, the body is what matters" | Routing fires on the description's trigger phrases. Get them wrong and the skill never runs. |66| "It's faster to just put the rule straight into CLAUDE.md" | CLAUDE.md is the schema layer (capped at 100 lines); workflows belong in skills. |67| "For this rename I'll only touch the files the user pointed at" | If the old spelling never makes it into `DEPRECATED_PATTERNS`, the next time you fall in the same hole you are back to grepping the whole repo by hand. |