/sp-site-design-harness:publish-design-optionsfrom sp-site-design-harness
Packages completed HTML design options into a private Spacefast space with a minimal index page and returns a single shareable Access URL.
Ships in sp-site-design-harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Package the completed HTML design options into a single private Spacefast space with a minimal index page, and hand the user one shareable Access URL.
Arguments (optional): $ARGUMENTS — a directory containing the options, or an
explicit list of entry HTML files. Supplying a path is the most reliable
invocation; without it, discovery is inferred and must be confirmed.
Read the publish-to-spacefast skill before publishing. Do not
reimplement its API handling — this skill delegates all publish mechanics to
the Spacefast CLI.
Standing constraints — do not deviate without being asked:
~/.spacefast/, or any auth file.data.access, which breaks the private-link requirement. No credential means
stop.$ARGUMENTS if given, else git rev-parse --show-toplevel, else $PWD.
Never $HOME, never /.
Cheapest, highest-precision signal first. Stop at the first tier that yields candidates.
$ARGUMENTS. Skip scanning entirely.create-design skill), so
the transcript already names them. Prefer these; use the filesystem only to
fill gaps.find "$ROOT" -type f -name '*.html' -maxdepth 4 \
-not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' \
-newermt '-24 hours'
Cap at 20 candidates. Over that, stop and ask for a path.
Classify the shape and say which one was detected:
| Shape | Signal | Treatment |
|---|---|---|
| folder-per-option | two or more sibling dirs each holding index.html | each dir is one option |
| flat siblings | several *.html in one dir sharing assets | each file is one option |
| one multi-page site | an entry file whose hrefs resolve to other candidates | one option, not N |
The disambiguating test is cross-linking: separate options never link to each
other, pages of one site do. Grep each candidate's hrefs against the other
candidates. If it resolves as one site, say "this is one site, not N options"
and get a decision before continuing.
In precedence order, and state which source was used for each:
<title>.Print a table: proposed name | name source | entry path | last modified. Accept inline renames. Require explicit approval before staging.
Do not offer or honour a flag that skips this gate. Every other failure in this flow is loud; this is the only step that can succeed and be wrong. Publishing a stale option folder from a previous run returns a perfectly normal-looking Access URL, behind a URL identical to last time's, that nobody can tell is wrong.
Before any staging work, so failure is cheap:
sf whoami --json
sf is installed at /usr/local/bin/sf as a shim that pins Node 20 — the
default node here is v18, which crashes the CLI (toSorted is not a function), and the standalone Bun binary warns that this CPU lacks AVX. If
sf is ever missing, fall back to
PATH="$HOME/.nvm/versions/node/v20.20.2/bin:$PATH" npx -y [email protected] ….
If whoami fails, stop and ask the user to re-authenticate. Do not attempt an
anonymous publish.
Walk up from the scope root looking for .spacefast/space.json. Cross-check
with sf spaces list. Also check for a publish receipt earlier in this
conversation.
spaceId.After a successful publish, write only the non-secret form at the project root (never in the staging dir):
{"space":"<spc_id>"}
Never write state.json or any credential file. Mention once that in a git repo
this file should be gitignored or committed deliberately — do not edit
.gitignore automatically.
Use a new directory under the session scratchpad, not a directory inside the project. Two reasons, both load-bearing:
.env or .git can leak
by construction.Layout mirrors the source shape. Per-option directories stay directories,
each with its entry file as index.html:
stage/
index.html # generated
01-<slug>/index.html + siblings
02-<slug>/...
Flat siblings stay flat, so a shared styles.css is neither duplicated nor
orphaned. Dereference symlinks (cp -RL) or reject them — the publish walker
hard-fails on symlinks. Exclude .DS_Store. Print the absolute staging path in
the final report.
Strip HTML comments first — a commented-out link is not a real dependency and
will otherwise fail the audit. Then walk every local href and src in the
staged tree and assert the target file exists, compared case-sensitively (APFS is case-insensitive and will hide a
Styles.css vs styles.css bug that 404s once published).
| Pattern | Action |
|---|---|
file:// path | hard fail — always broken once published; list every occurrence |
<base href> | hard fail — almost certainly wrong after staging |
root-relative /styles.css | report; breaks under per-option dirs. Offer flat staging or stop |
../shared/tokens.css | fix by raising the staging root to the common ancestor — never by copying assets upward |
https:// CDN link | warn only, never block (the house samples use Google Fonts) |
If paths do not survive a straight copy, report and stop. Rewriting the options' markup is where silent, plausible-looking damage happens.
Before filling anything, check whether a template was already chosen for this
project earlier in the session (this run, or a prior publish/design run —
check for a .design-template file at the scope root resolved in step 1,
whether or not that root happens to be a projects/<slug>/ folder). If so,
reuse it without re-asking.
Otherwise, read ${CLAUDE_PLUGIN_ROOT}/skills/publish-design-options/templates/ MANIFEST.md, list every template there (name + one-line description) with the
one marked Default pre-selected, and ask the user which to use for this
partner share. A bare confirmation ("yes" / enter / "the default") picks the
default — this is a lightweight confirm, not a multi-question gate, and stays
that way even as more templates are added.
Fill the chosen template (today, only ${CLAUDE_PLUGIN_ROOT}/skills/ publish-design-options/templates/design-options-index.html, the deck
template) and write the
result as index.html at the staging root. It follows the team's
presentation pattern: full-bleed blue cover with the Automattic wordmark and
an oversized tight-tracked headline, then a numbered table of contents in
black on white, then a provenance footer. Do not restyle it per run —
consistency across runs is the point. Change it only when the template
itself changes. This is the same template create-design fills for
directions/index.html, so a project's local nav page and its published
partner-facing page match.
Tokens to substitute, all of them required:
| Token | Value |
|---|---|
{{PROJECT}} | Project or client name — appears in <title> and under the cover headline |
{{VERSION}} | Version 1.0, or the round of review this is |
{{DATE}} | Long-form date, e.g. January 1, 2026 |
{{COUNT}} | Number of options |
{{OPTIONS}} | One <li> per option, in the shape below |
{{PROVENANCE}} | <dt>/<dd> pairs: a Published timestamp, then one per option naming its absolute source path |
Each option is one list item — the numeral is generated by CSS, so do not write one:
<li><a href="01-slug/index.html">
<span>
<span class="toc__name">Option name</span>
<span class="toc__note">One line on what this direction does.</span>
</span>
</a></li>
HTML-escape every substituted value, and assert no {{ remains in the output
before continuing. Keep each toc__note to one line — what the direction does,
in the language used with the user, not a feature list.
The provenance block is the highest-value element on the page: every run sits behind an identical-looking URL, so the timestamp and source paths are the only thing that makes a stale or wrong publish visible to someone looking at it.
Serve the staging directory over loopback HTTP and check it in a browser — not
file://, which masks exactly the case-sensitivity and root-relative failures
that matter here.
Add a launch.json entry in the working directory, never in the staging
dir — a .claude/ folder inside the stage would be published — and root the
server at the stage with --directory:
{ "name": "design-options", "runtimeExecutable": "python3",
"runtimeArgs": ["-m","http.server","--directory","<STAGE>","8731"], "port": 8731 }
Then preview_start it.
read_page and assert exactly N option links, each resolving.read_network_requests and abort on any same-origin non-2xx.
This is the load-bearing check — a missing stylesheet renders an unstyled
page that a screenshot cannot distinguish from an intentional brutalist
direction. Third-party CDN failures warn only.read_console_messages with onlyErrors per option; surface what it finds.Any same-origin 4xx or 5xx aborts before publish. If loopback is unavailable, fall back to the static link audit from step 8 and say which mode ran.
find "$STAGE" \( -name .spacefast -o -name .git -o -name '.env*' \
-o -name node_modules -o -name '*.zip' \) -print -quit
Must be empty. Otherwise abort.
One CLI call. Updating an existing space:
sf publish "$STAGE" --space "$SPACE_ID" --team allan-team --wait --json -y \
-m "Design options: <names> — <date>"
Creating the space the first time — drop --space, add:
--access private --name "<project> — design options"
--wait follows the data.next continuation loop, so there is no poll logic to
write here.
The Bash sandbox blocks outbound network. This step needs the
sandbox-disabled path. On a connect timeout to api.spacefast.com, say so
rather than retrying.
sf publish does not return data.access. The publish-to-spacefast
skill claims owned publishes carry a reusable Access URL; this CLI emits none,
and the bare live URL returns 403 to anyone outside the team. Do not
report the live URL as though a partner can open it.
What actually exists: Spacefast auto-creates a Link named Open on the
space at first publish, carrying page.view, comments.read, and
comments.write, with no expiry. It survives later publishes. That is the
partner link — read it, never create one:
sf share link ls --space "$SPACE_ID" --team allan-team --json 2>&1
sf share link copy <lnk_id> --space "$SPACE_ID" --team allan-team --show-secret --json 2>&1
Two quirks, both verified: share link ls does not accept --show-secret
(only copy returns the URL), and copy --json writes its JSON to stderr,
so 2>&1 is required or you get an empty result. Pick the active link named
Open; if it is missing or revoked, say so and stop rather than minting a
replacement — creating a grant widens access and is the user's call.
Then report:
data.activation.outcome — what decides whether the version is serving.
Never infer liveness from version status.sf share link revoke <id> is how it ends.Never print API keys, space keys, or state files. The share link itself is the deliverable and is meant to be reported.
Report the problem document's code, type, and requestId, and follow its
documented recovery.
Before retrying a publish, re-read .spacefast/space.json and sf spaces list.
A publish that names no existing spaceId creates a new space, so a blind
retry after an uncertain write silently duplicates the project's space.
Identical files alone do not make a retry safe.
Creating or widening grants — the command reads the auto-created Open link
and never mints one. Reading the keychain or auth files. Anonymous
publish and claim flows. Rewriting option HTML to repair paths or inject a
<base>. Reimplementing the publish API, manifests, or resumable uploads.
Custom domains, rollback, _redirects / _headers / sf.jsonc. Editing
.gitignore or touching git state. Screenshot thumbnails on the index page.
Design critique or accessibility checks — the create-design skill already
ran those. Slack or email delivery of the link.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub a8cteam51/claude-code-plugins --plugin sp-site-design-harness7 skills in this plugin
/create-designDesign process for producing distinctive, art-directed digital design instead of generic AI-default interfaces. Use whenever building or refining the visual design of a marketing site, landing page, product interface, web app, mobile UI concept, interactive experience, or design prototype — including any request to "make it look good," "design a page," "improve the UI," or "make this less generic." Governs design thinking, direction-setting, critique, reduction, and polish; framework- and style-agnostic. Phase 2 (Design) of the sp-site-design-harness pipeline — ported from consistent-high-quality-design. For feedback or changes to an existing direction or built theme (token swaps, copy, one-section revisions), use `iterate` instead./dev-handoffDistill a chosen design direction plus research context into structured design decisions — a DESIGN.md token/prose spec and a decisions.md notes file — ready for a separate WordPress block-theme build agent to consume. Phase 3 (Dev Handoff) of the sp-site-design-harness pipeline. Use once a direction from create-design (Phase 2) has been chosen and needs to be turned into a developer-ready handoff. Does not build the theme itself./find-fontBrowse the local font catalog for a family matching a mood/use-case description, classifying candidates on demand/iterateApply feedback to an existing design direction or built block theme fast — swap a token, fix copy, adjust a property, rework one section, or work through a pasted list of partner notes. Use whenever the user asks to change, fix, tweak, or revise something in an existing `directions/NN-<slug>.html` or a block theme built from this harness's handoff. Does not run the create-design engine (no critic, no gates, no re-exploration); requests that need a new direction or a new concept are routed back to `create-design`./research-intakeGather brand material, project goals, and context for a new site engagement, normalize it into a confidence-tagged brief, and hand off to the design phase — without blocking on sparse or empty input. Phase 1 (Research) of the sp-site-design-harness pipeline. Use when starting a new client/partner site engagement, or whenever raw brand material (PDFs, style guides, copy docs, existing assets, reference URLs) needs to be turned into a usable project brief before design work begins./scan-font-sourcesScan all configured font sources and refresh the local-font-sources catalog's index