/plinth:template-updatefrom plinth
Apply the plinth-template update /plinth:floor-check reports as a draft pull request, from a worktree branched off the verified default branch, or move the project to another archetype the same way when the person asks. User-invoked only; it pushes a branch and opens a pull request, and it resolves a conflict only on the person's word for that file.
Ships in plinth. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Runs the copier update line /plinth:floor-check prints under its template
drift WARN, and turns the result into a draft pull request. One script does
it in three steps, each started only on the user's word in this session; this
skill runs it and relays what it says, then runs the project's review on the
pull request it opened. The command is the checker's own line,
read from it, never written out here or by you.
On GitLab it runs the same steps through glab: copier runs the same way,
and what reads and writes the host is glab api, asked of the host and
project origin's URL names, which ends in a draft merge request (a Draft:
title) where GitHub's ends in a draft pull request, with its pipeline in
place of the checks. Read "pull request" below as the merge request there.
The script stops before any work on a GitLab checkout whose origin URL names
no project; relay that and stop.
From the repository's own checkout:
${CLAUDE_PLUGIN_ROOT}/scripts/template-update.sh
It fetches the default branch, checks it against GitHub's copy, then compares the template tag this installed plinth targets with the latest plinth release's and the tag the project's CI pin was tested with. When the installed one is older it prints the commands and exits 1, having written nothing else. Show them and stop. The person types them, in this order:
claude plugin marketplace update plinthclaude plugin update plinth@plinth/reload-plugins, or a new session: a running session does not load a new
version/plinth:template-update againNever run them yourself. When it says the tag is in no release yet, pass that on too: the commands may find nothing until a release carries it, and the plan stops until then. When the release cannot be read it warns, naming the tag it goes on with: pass that warning on, and carry on with the plan.
Otherwise it prints the two tags, the worktree and branch it would make, and the command. It writes
nothing. Show that output whole. Exit 1 means nothing to do or a stop (the
recorded tag is the target, no pin to carry, a base it could not verify):
show the message and stop there. When the workflows call plinth at two
commits (ci.yml raised by hand, label.yml not) and each other file's is
an ancestor of the ci job's, the plan carries the ci job's commit and a
Moves: line names each file it moves forward; after copier, the apply
stops if any plinth uses: does not name that pin. Otherwise (another file
newer, two commits neither behind the other, a compare not read) it stops:
the message names each file with its commit, which is the newer when GitHub
says, and the line that makes them one. Never move the ci job's pin for
the person: that is their change, in its own pull request, before the update
runs again. One exception at the target tag: when the
repository recorded that its owner's .github shares a pull-request
template or issue forms, the owner no longer does, and the repository has
none of its own, the plan names each answer that turns false and gives a
line that re-renders the same tag, which writes the template's copies.
The command keeps the plinth commit the repository's workflows call today,
so an update never undoes a pin Dependabot moved, and it never moves that
pin. On GitHub it also carries
whether the owner's .github repository publishes a pull-request template
and issue forms, so an update never writes a form that hides the owner's
shared ones; when that cannot be read, the plan says so and stops. A
Plinth pin: line compares that pin with the one the target tag was tested
with; a newer live pin is kept.
The pin comes first, the update second. When the workflows call a plinth
older than the one the target tag was tested with, the plan exits 1 having
written nothing, and says so: the two commits, the compare link, and either
merge first: #<n> ..., an open pull request that changes the plinth uses:
lines (Dependabot's, or one a person opened), or, when none is open,
raise it first in one pull request of its own: ..., the change to make,
every workflow that calls plinth moved to the one SHA. Show that whole and
stop. The person merges that pull request (or opens and merges one with the
change), then runs /plinth:template-update again. Do not make the change
or merge it for them in this skill. When the comparison could not be read
(offline, or the tag's copier.yml unreadable), the plan stops too and
names what it could not read: pass that on and stop; it never updates as if
the pin were current. Rerunning helps only when a read failed; a pin GitHub
cannot order against the tested one (on another branch, or not a plinth
commit) is raised in its own pull request first, as above.
When .copier-answers.yml records a plinth_sha other than a pin the
workflows call (raised in the workflows only, by Dependabot or by hand), the
plan prints a Pin conflict: line, with one line under it. copier's old
render names the recorded pin; the command carries the pin the workflows
call, so their plinth uses: lines are not in conflict for that (measured
with copier 9.18.2). Two cases still are. A workflow whose pin is neither
the recorded one nor the one the command carries (the Moves: case above)
has its line left in conflict; the side to keep is the one naming the pin
the command carries (copier's after updating side). A plinth uses: line that
carries a trailing comment (# v2.41.0, as Dependabot writes it) is
changed too, since the template renders none: the plan names those files
as in conflict though both sides name the same pin, and either side runs
the same plinth. Tell the user this before asking for the yes, so
an exit 3 on those files is the conflict they were told of.
On GitHub the plan then runs the command on a copy of the default branch outside the repository, removed when done, and prints what it does there: what merges cleanly, what merges into this repository's own changes (worth a look: copier merged into the person's lines), each file left in conflict with the lines this repository added to the template's render, the template CHANGELOG's sections between the two tags, and how to undo the update before and after it merges. Show those lists whole; they are what the yes is to. When a list says it was not compared, pass that on. copier failing on the copy stops the plan with its last line: show it and stop.
Its New questions list names each question the target tag asks that this
project never answered and that applies to it, with the default it would
take and its help. A question with no default stops the plan (exit 1) with
its name, since copier would record null; it is still asked below.
Before the yes, ask each listed question, one at a time, in the list's
order: its name, its help, and its default as the recommended answer,
unless what you know of the person or the project says another answer fits
(a person who works in Korean, asked records_language, is recommended
Korean). The person's answer is theirs to give; never answer for them.
Keep each answer, or that they kept the default.
Then ask the user whether to apply exactly that plan, with those answers. Invoking this skill is not the yes: the yes is to the plan they have just read. Without it, stop.
On a yes, run the --apply line the plan printed, as printed, adding your
own agent and model:
${CLAUDE_PLUGIN_ROOT}/scripts/template-update.sh --apply <sha from the plan> --assisted-by <agent>:<model>
For example --assisted-by Claude:claude-fable-5-1. Add --answer <name> <value> for each question the person answered with other than its
default, the value as they gave it (--answer records_language Korean);
one left out keeps its default, and the description says "default kept".
A name the plan did not list is refused (exit 2), having created nothing.
The line ends the pull
request description. The script refuses if the default branch moved since
the plan; then show the plan again and ask again. It stops as the plan does,
having created nothing, when the plinth pin is behind.
Exit 0: it made one commit in the worktree, pushed that branch (or found it pushed by the person after exit 5), and
opened a draft pull request. Show the URL. Its checks start now and nothing
waited for them. Do not wait for them, mark it ready or merge it.
Its description says Review: none (...), because no review has run yet.
In the worktree, run the project's default review, the one its AGENTS.md
names (on a project made with plinth, a fresh-context review given only the
diff), then replace the Review: line with what ran, for example
Review: fresh-context, with what it reported on the lines under it. If
none could run, the line stays none, with the reason why. That is the one
edit this skill makes to the description (gh pr edit --body-file, on the
body as gh pr view reads it; on GitLab glab mr update <iid> --description,
on the body as glab mr view <iid> -F json reads it). Show the user the findings, and change
nothing in the update for them without the user's word.
An update often changes the agent's own rules (AGENTS.md, CLAUDE.md,
.claude/settings.json, a file under .claude/skills/ or
.claude/output-styles/), which ci / diff-size lists. Tell the user:
when the account that pushed is not an admin of the repository,
ci / diff-size stays red until an admin approves the pull request on
GitHub (Files changed, Review changes, Approve); when it is an admin, it
stays green and the merge is the person's decision.
Exit 3, a conflict: copier left files that need a resolution. The script names them and the worktree, and nothing is pushed yet. Show the list and the path, then recommend, and resolve only on the user's word:
.rej beside its file) and say in plain words what the template
changed and what this repository changed. On GitHub the script also
lists, per file, the lines this repository added to the template's
render that the template's side drops, and writes a combination that
keeps them (the template's side with each line where it belongs now; a
key both set takes this repository's value) at the path it prints. A
file with such lines has no one side to recommend, since either side
whole loses something: recommend the combination. A file with none may
take the template's side. A plinth uses: line the plan's
Pin conflict: line named is that conflict: recommend the side naming
the pin the command carried. Give the reason in one sentence.no old place lost its neighbours: the combination
keeps it at the end of the block. Propose, for that line alone, where
it goes (in AGENTS.md, under ## This project, its last section,
first), and move it only on the person's word for that line..rej by hand and delete it; then
git add the file. Nothing else in the worktree changes.--finish line
the script printed, adding the same --assisted-by and one
--resolved <path> "<how>" per file, its path exactly as the script
named it (for a .rej, the .rej path).
<how> says which side and on whose word, for example
--resolved CONTRIBUTING.md "the template's side, applied by the agent on the user's word",
or "resolved by the user" for a file they resolved themselves. The
description also lists each line the script named and the file and
section it is in now, or that it is not there.If anything is still unresolved, --finish stops again with exit 3 and
opens nothing and keeps none of the --resolved it was given; show what
it names, go back to step 1 for those files, and give every --resolved
again on the run that finishes.
--resolved is a record for the description, not a check, so it never
lets an unresolved file through.
Exit 4, over the diff limit: counted as ci / diff-size counts, with
this repository's own max-diff-lines and diff-size-exclude, the update
is over the limit. It is a commit in the worktree and nothing is pushed.
Show the count and the proposed split: the paths of a first pull request
that fits (issue forms first), and this update with the rest, which keeps
.copier-answers.yml. Recommend the split, and run its lines only on the
user's word. They make the first part from the update's own changes, and
a person opens and merges its pull request. Then merge the default branch
into this worktree and run --finish again; it counts from the new merge
base. The other choice is --finish <worktree> --over-limit: the pull
request opens as it is, and ci / diff-size stays red on it until it is
split, since an approval does not lift the size limit.
Exit 5, the push is the person's: GitHub refused the branch because
it changes .github/workflows/ and the credential the agent pushes with
may not (a token without the workflow permission, as
${CLAUDE_PLUGIN_ROOT}/docs/how-to/give-the-agent-a-token.md recommends).
This is not a retry: --finish from here is refused the same way. The
commit is ready. Show the user the git push line the script printed and
ask them to run it from a separate terminal with a credential that has the
permission; do not run it yourself or look for another credential. When
they say it is pushed, run the printed --finish line once; it finds the
branch on origin at the commit and opens the draft without pushing again.
Exit 1: it stopped. Show the message; it names what to do. When the
push or the pull request failed, that is the same --finish line again,
which pushes the commit already made and does not make a second one. Do not
work around it: do not run copier, git push or gh pr create yourself.
Exit 2: the arguments were wrong and nothing was committed. A usage
line means a flag was missing its value or given in the wrong step; run
the step as written above. A --resolved path copier did not leave in
conflict is followed by the files that are; run --finish again naming
those.
The pull request's description gives the plan's plinth pin line, and lists what copier merged cleanly, each conflicted file with
how it was resolved (from --resolved), and anything else a person changed
after the update. When the updated template names GLOSSARY.md and the
repository's glossary is still CONTEXT.md (and CONTEXT-MAP.md), the
script moves it to the new name with its content unchanged, after copier and
before the commit, and the description lists the move; a GLOSSARY.md that
already exists is kept and named as the reason. Tell the user in one line. It
follows the fields of the pull-request template plinth-template renders:
## What and why, ## What I checked myself, ## How it was verified and a
Review: line, in that order. What I checked myself holds what the script
checked and says it is not a person's check; the rest stays as the script
wrote it, apart from the Review: line above. It does not read a template this
repository or its owner changed. If theirs differs, tell the user, and leave
the rewording to them. The
worktree stays beside the repository (<repository>-template-<tag>) after the
pull request opens. Nothing here pushes to the default branch, and nothing
runs again on its own.
Use --archetype <a> when the person says the project was made under an
archetype it does not fit: a data-ml project that trains nothing, for
example, which would otherwise delete the model example by hand and still get
it offered again by every update. Moving is the person's call: never propose
it as the fix for a warning, and run each step only on their word. It moves
between any two archetypes but web and dashboard, which it does not move
to or from (their hosting answers change with them, and that move was not
measured), on GitHub and on GitLab. Which names are archetypes
is the template's to say: copier refuses one it does not offer, and the plan
stops on that before anything is written. The project must already be
at the template tag this plinth targets: when it is behind, the plan stops
and says to update first.
The steps, from the plan to the conflicts a move leaves and what its pull
request says, are in ${CLAUDE_PLUGIN_ROOT}/skills/template-update/reference.md:
read it before planning a move, and follow it as written.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub coolbress/plinth --plugin plinth5 skills in this plugin
/arsenalThe tool for each stage of a plinth project, from the task alone - what to use, what plinth installs or lists, what each costs, how to add it, and what not to use with plinth. Use when choosing a tool for a stage or a job, or asked what plinth installs or what a tool costs. What to do now in a project is /plinth:guide, which the person types./floor-checkRead-only check of a repository through plinth's eyes: its protection rules, its base files and the agent's safety settings, plus what this machine's Claude Code settings say, and, on request, its issue and pull-request records. Gives a short list of what is missing and offers the missing files as one pull request the person approves, made after the check. Changes nothing in the repository and keeps one note on this machine, so the next run says what changed. Use when the user asks whether a repository is set up, protected, "has the floor", or what /plinth:new-project would have given it./guideReads the repository and says, in plain words and the person's own language, the one command to type next, then what is open and what happened so far, copied from the record; before the first merge, how to use the tools of the step it is at and the next one; a one-screen map of the whole way with `map`, one step in depth with `map <step>`, and what started off with `features`. User-invoked only; changes nothing. The whole catalog of tools and what each costs is /plinth:arsenal./new-projectCreate a new GitHub repository with required checks already enforced (with --host gitlab, a GitLab.com project with its wall). User-invoked only; creates a remote repository, and if a step that raises the wall fails, deletes it when the token can or names it when it cannot.