Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Update Empstack?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jueyi6-update-empstack)
---
name: update-empstack
description: Maintainer runbook to port upstream releases into empstack.
disable-model-invocation: true
---
# Update empstack
empstack is a hand-merged copy of three upstreams, pinned in `UPSTREAM.json` at the repo root. An update ports what changed upstream since the pins. Nothing is generated. Work in a clone of the empstack repo, not in the plugin cache. Tools that read GitHub need `GITHUB_TOKEN=$(gh auth token)`. The person starts every update. Nothing runs on a schedule.
## 1. See what changed
Run `node tools/upstream.mjs`. It compares each pin with the upstream default branch and prints the changed files that empstack tracks, each with the empstack path it lands in. "Up to date" for all → report that and stop.
Save a token baseline before touching anything: `node tools/token-report.mjs --save before`.
## 2. Port each change
Split the listed files into groups that touch different empstack files, and give each group to an `empstack:poteto-agent` subagent. Each one reads the upstream diff (`node tools/upstream.mjs --diff <upstream path>`) and applies its meaning to the empstack file. Nothing is copied over wholesale.
- **Skill bodies ported from pstack** (most of `skills/`): run `tools/port.mjs` on a fresh checkout into a scratch folder to see the mechanical port (tool names, model values, paths, skill prefixes). Then apply the diff and make the new text Claude-native. Never overwrite the repo with its output.
- **Hand-written files**: `skills/empstack/SKILL.md`, `skills/help/SKILL.md`, `skills/setup/SKILL.md`, `skills/grill/SKILL.md`, `skills/research/SKILL.md`, `skills/setup-tracker/SKILL.md`, and the playbooks `wayfinder.md`, `decomposition.md` and `interview.md` in `skills/empstack/playbooks/`. Upstream changes to their sources (`poteto-mode`, `poteto-help`, `setup-pstack`, `grilling`, `grill-with-docs`, `research`, `setup-matt-pocock-skills`, `wayfinder`, `to-spec`, `to-tickets`) are merged by meaning. Matt's `wayfinder` lands in `playbooks/wayfinder.md`, and his `to-spec` and `to-tickets` in `playbooks/decomposition.md`. A take value in `UPSTREAM.json` that ends in `.md` names that file. Upstream's `playbooks/authoring-a-skill.md` lands in `playbooks/authoring-a-skill-or-agent.md`, whose agent steps are empstack's own. Keep these files short.
- **watch-pr** (`skills/empstack/scripts/watch-pr/`): runs on Node, so upstream's Bun parts are merged by meaning. A `commander` option becomes an entry in `OPTIONS` in `cli.ts`, and a `bun:test` `expect()` becomes `node:assert` (`assertMatches` for `toMatchObject`). Upstream's `bootstrap.ts` and `bun.lock` are skipped. When `package.json` changes, run `npm install --package-lock-only` in `skills/empstack/scripts/` so CI's `npm ci` still matches it.
- **TokenEconomizer** (`te/`) ported by meaning like the rest. `node tools/te-drift.mjs --upstream <old> <new>` shows upstream's own change, laid out as `te/` is. Every line empstack changes in `te/` carries a `# empstack:` comment saying why, and `node tools/te-drift.mjs` shows all of empstack's changes against the pin. Keep the executable bit on `scripts/te` and `scripts/te-hook` (`git update-index --chmod=+x`). If its hook events or command arguments changed, update `hooks/hooks.json` and the `te-*` skills to match.
- **New upstream skill**: pstack → port it. Matt → take it only if it does a job pstack has no skill for, and say so in the report. Add it to `UPSTREAM.json` and to the table in `skills/help/SKILL.md`.
- **Removed or renamed upstream skill**: do the same here and fix every reference.
Rules that every port keeps:
- Claude only. No other vendor's model, no Cursor-only tool. A step with no Claude Code equivalent becomes `Skipped in Claude Code: <step>. <reason>.`
- pstack wins. Where a Matt skill overlaps a pstack skill or playbook, the pstack one stays and the Matt text is dropped.
- Only the `LISTED` skills in `tools/check.mjs` are model-invocable. Every other skill carries `disable-model-invocation: true` and is reached by path. A new skill gets a line in the entry skill or a playbook that names it, or a place in `MANUAL` when only the person can want what it does. The check fails until it has one.
- In `skills/empstack/SKILL.md` the stage sentence comes before any tool call, and the Interview playbook does not apply the Build rules first. Every playbook sits under one stage and ends with a **Next:** line, and the check fails until a new one has both.
- Cut filler. A sentence that repeats another file becomes a pointer to it.
## 3. Review the port
The lead reviews every subagent's work itself. `node tools/port-review.mjs --base HEAD` prints, for each changed upstream file, the upstream hunk, the empstack hunk it became, a token row and a checklist line. Answer each line: Claude only, pstack wins, the skill is `LISTED` or reached by a named line or `MANUAL`, the meaning of the upstream change arrived, and the tokens it costs are worth it. Send a file back to its subagent until its line holds.
Then `node tools/token-report.mjs --base HEAD --compare before` shows what every session and task now pays (listed descriptions, agent descriptions, the session-start note, the entry skill). Explain each growth in the report, or cut it.
## 4. Check what changed
`node tools/check.mjs` always passes. Then run the checks for what the port touched:
| What changed | Checks |
|---|---|
| A skill body | `node tools/live-check.mjs --skill <name>` (the follow lines in `tools/routing/follow.jsonl` for it) |
| A skill or agent description | `node tools/routing/descriptions.mjs --base HEAD` routes about as well as `HEAD` (99% names hidden at the last cut) |
| `skills/empstack/SKILL.md` | `node tools/routing/entry.mjs` opens the same first playbook on every task, then `node tools/routing/smoke.mjs` prints 9 of 9 |
| The `LISTED` set or a listed description | `node tools/routing/invoke.mjs` |
| `hooks/` | `node tools/hook-bench.mjs --base HEAD`, then `node tools/live-check.mjs --base HEAD` |
| `te/` | `node tools/te-drift.mjs --test`, `node tools/hook-bench.mjs --base HEAD`, `node tools/live-check.mjs` |
| The MCP proxy | `node tools/live-check.mjs` (its check f) |
| Claude Code itself, since the last port | `node tools/tool-cost.mjs`, `node tools/live-check.mjs`. A tool it lists as loaded in full that few tasks call goes into `DEFER` in `hooks/tools.ts`, and the token counts there are refreshed |
A new skill needs two requests in `tools/routing/requests.jsonl` and a line in `tools/routing/follow.jsonl`, and the check fails until it has them. After the release is installed, `node tools/live-check.mjs --installed` runs the same checks on the installed copy.
## 5. Release
Set the new `version` and `commit` in `UPSTREAM.json`. Set `version` in `.claude-plugin/plugin.json` to the new pstack version, such as `0.15.50`. A release of empstack's own changes while pstack has not moved adds one more number: `0.15.49.1`, then `0.15.49.2`. Add a `## <version> (<date>)` entry to `CHANGELOG.md` with a few short lines under `Added`, `Changed`, `Fixed` or `Removed`: what changed for the user, not how. For a port, one line names the pstack version.
Commit, then push to `main` only on the user's yes. Claude Code updates the plugin only when `version` in `.claude-plugin/plugin.json` changes, so a push that keeps the version reaches new installs only. Report to the user: upstream versions before and after, what changed for them, the token change, anything skipped.