/ideaspaces:is-publishfrom ideaspaces
Put this space online — host the current folder as a remote ideaspace, so it outlives this machine and the team or another device can reach it. Use when someone says put it online, publish this, host it, back this up, get this on my other computer, or make it available to the team; or after `/is-setup` finishes. Hosting starts private — who gets in is is-share. Plan-first: the bundled CLI shows exactly what would happen and mutates nothing until the user agrees and it runs again with --yes.
Ships in ideaspaces. 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.
None: SKILL.md is the whole skill.
Goal: login check → plan (publish without --yes, zero mutations) → the user agrees → apply
(publish --yes) → narrate result. The plan-then-apply split is the CLI's contract, not a
courtesy — see the outward tier of the agreement principle.
This skill is the conversational layer around the bundled CLI:
node ${CLAUDE_PLUGIN_ROOT}/cli/bundle/ideaspaces.js ...
No separate install required.
Inside an ideaspace? This dir should be a git repo with a root contract — _agent/agreement.md, or _agent/foundation.md on the older shape; the CLI publishes either. If neither, suggest /is-setup first.
{ test -f _agent/agreement.md || test -f _agent/foundation.md; } && test -d .git && echo "ok" || echo "missing"
Portable identity agrees? Current shared scaffolds declare root_node_id; legacy Spaces may validly omit it. Never mint, edit, stage, or commit identity during publish. Run the bundled CLI's status --json and inspect root_identity: stop on invalid, drift, ambiguous, or declaration.dirty. Publish repeats this preflight against HEAD, index, worktree, canonical origin, and local registry before login or remote mutation.
Markdown frontmatter parses? The CLI preflights all tracked Markdown for YAML syntax. If it fails, surface the output and ask the user to fix and commit the reported YAML.
On the main branch? IdeaSpaces uses main as the default branch — publishing requires the local branch to match so server and clones stay aligned. Detect:
git rev-parse --abbrev-ref HEAD
If output is the literal string HEAD, the user is in detached-HEAD state. Don't offer a rename — short-circuit with: "You're in detached-HEAD state. Check out a branch first (e.g. git checkout main) and re-run /is-publish."
Otherwise, if output isn't main, ask before proceeding:
"You're on
<current-branch>. IdeaSpaces usesmainas the default — keeping local and remote consistent makes futuregit pull/ clones work without surprises. Rename<current-branch>→mainfor this folder?"
In a non-interactive session there is nobody to answer — never rename on your own; stop with the question as the result. If yes, run git branch -m main. If the rename fails (most common cause: a local main branch already exists — perhaps stale or orphaned), surface git's error verbatim and stop with: "You may already have a local main branch. Resolve manually (git branch -d main if it's stale, or git checkout main if it's the one you want) and re-run /is-publish." On success, continue. If the user declines the rename, abort: "Switch to main and re-run /is-publish when ready." — don't try to push a non-main branch; ideaspaces publish refuses anyway.
Logged in? Ask the bundled CLI; never read or print the credentials file:
node ${CLAUDE_PLUGIN_ROOT}/cli/bundle/ideaspaces.js status account --json
On a successful command, logged_in: true means continue; logged_in: false means propose login. A nonzero exit (including an offline or uncertain session check) is not signed out: stop, surface the error, preserve credentials, and retry after the cause is resolved. Existing authorized API-key mode remains supported; this command does not online-validate every legacy key.
Already published? Check the folder-keyed map, if present:
node - <<'NODE'
const fs = require('fs');
const path = `${process.env.HOME}/.ideaspaces/spaces.json`;
if (!fs.existsSync(path)) { console.log('null'); process.exit(0); }
const map = JSON.parse(fs.readFileSync(path, 'utf8'));
console.log(JSON.stringify(map[process.cwd()] || null));
NODE
If non-null, this folder is already mapped to a remote. Re-publishing is fine — the CLI reuses the existing repo_id and pushes to the same remote.
"You'll need to sign in to this CLI install first. I'll open a browser; complete sign-in there. It saves a short-lived access token and rotating refresh locally, and you can manage this install in the web's Desktop sign-ins list. OK?"
On confirm:
node ${CLAUDE_PLUGIN_ROOT}/cli/bundle/ideaspaces.js login
The bundled CLI uses client=cli with a loopback callback; do not copy tokens into chat. If the user is in a remote shell or browser open fails, surface the CLI output and let them decide the next step. SSH requires explicit loopback forwarding; headless/CI may use an existing authorized key. Sign out first before switching accounts or services.
is_auth action="logout" (or bundled power logout) signs this session out on the server before clearing local credentials. If sign-out fails or is offline, credentials stay for retry; report the failure, never claim success or delete the file manually.
--yesThe CLI is plan-first: without --yes it runs every preflight, prints exactly what would happen —
destination namespace/slug, the dir-local git identity write, whether the tip-commit author gets
rewritten, the origin URL, the commit count — and changes nothing, local or remote.
node ${CLAUDE_PLUGIN_ROOT}/cli/bundle/ideaspaces.js publish [--slug ...] [--name ...] [--hostname ...]
Show the user the plan and get their yes. Publishing is an outward action: even when the user
already said "publish this", the plan surfaces side effects they haven't seen (the identity write,
an author rewrite) — one look before it happens is the agreement, not friction. Flag overrides:
--slug <name>, --name "<display>", --hostname <host> for org spaces (first publish only).
For re-publish the plan says it reuses the existing Space identity — don't re-ask names.
Non-interactive sessions stop here. With nobody to agree, the plan output is the honest
result; never add --yes on the user's behalf.
--yesOn the user's yes:
node ${CLAUDE_PLUGIN_ROOT}/cli/bundle/ideaspaces.js publish --yes [same flags as the plan]
The CLI:
root_node_id on first publish.--force cannot fork or rekey it.main.~/.ideaspaces/spaces.json.If the CLI exits 1 with Cannot publish yet: N tracked file(s) exceed the 200,000-byte server limit. followed by a list of path (bytes) lines, the offenders are tracked files larger than the server cap. The CLI fails fast locally — no push attempted. Parse the offender list and decide:
Known clutter — if every offender path matches one of these patterns, offer the conversational fix as a single yes/no:
.obsidian/ node_modules/ .DS_Store .cache/ .idea/ .vscode/
"I see
<matched paths>tracked — that's <vault config / build output / editor metadata>, not your knowledge. I can append to.gitignore, untrack withgit rm --cached -r <path>, commit, and retry publish. OK?"
Before changing anything, require a clean index with git diff --cached --quiet. If it is not clean, stop and ask the user to commit or unstage their existing work first — never mix publish cleanup with an in-progress commit. Also require git status --short -- .gitignore to be empty before appending. If it is not empty, stop and surface the pre-existing modified or untracked file instead of absorbing it into the cleanup commit.
On confirm, run in this order:
.gitignore without duplicating existing lines, then stage only that file with git add -- .gitignore if it changed.git rm --cached -r -- <path> for each confirmed clutter path. This removes it from git while preserving the local files.git diff --cached --name-status. Every staged entry must be .gitignore or a removal under the confirmed clutter paths. If anything else is staged, stop — do not commit or publish.git commit -m "Untrack non-publishable clutter". The clean-index gate and staged-set check are mandatory because this commit intentionally records the prepared index; skipping either could sweep unrelated work.ideaspaces publish command.If any step fails, leave the state visible with git status --short and stop for the user to review.
Mixed or unknown offenders — if any offender is outside the clutter list (e.g. a 5 MB image the user might want), don't auto-fix. Surface the CLI output verbatim and stop with: "These files are over the 200KB cap. Shrink them, store externally, or link via frontmatter (attached_to:). Re-run /is-publish when resolved." — the user might have intent for that file.
If the mapped remote is gone, inaccessible, or incompatible with the contract/origin/registry evidence, stop before mutation. Never delete the registry entry or use --force merely to make publish proceed: that would erase authority rather than repair it. Offer the actual choices:
ideaspaces link when the hosted identity is known and the local mapping alone is stale;On success, surface the remote URL and the local changes:
"Published
<name>to<remote_url>. This folder's git identity is nowperson:<username>@ideaspaceslocally, so server-side attribution works. The folder mapping is saved at~/.ideaspaces/spaces.json."
Then name the next two steps, every time:
"It's online and still private. When you commit more, is-push sends it there. To let someone in, or to make it public, use is-share."
| Symptom | Likely cause | What to suggest |
|---|---|---|
Not logged in | No usable sign-in | Offer bundled login; do not infer this from a failed/offline status check. |
Cannot publish yet: N tracked file(s) exceed the 200,000-byte server limit. | CLI size preflight | See "Size-cap recovery" above — auto-handle known clutter, surface the rest. |
Push failed: ... size cap | Server-side cap (only if CLI preflight is bypassed) | Same as above; re-run /is-publish so the local preflight surfaces the offender list. |
This folder is mapped to ... but that remote no longer exists or you no longer have access | Hosted binding cannot be reached | Restore access/binding; a new Space requires explicit local Fork in a separate destination. |
Push failed: ... attribution doesn't match | Commit author doesn't match account | Re-run publish; it sets local user.email. Amend/recommit if needed. |
Local branch is \`; IdeaSpaces uses `main`` | Pre-flight didn't run / user invoked CLI directly | Rename via git branch -m main and retry, or use /is-publish which offers the rename. |
Couldn't determine the current branch — is HEAD detached? | Detached-HEAD state (rare; pre-flight catches via skill) | Check out a branch (git checkout main) and retry. |
Root identity evidence is invalid / Root identity drift / Root identity is ambiguous | Foundation, origin, or registry evidence is unsafe | Stop. Inspect bundled status --json; repair evidence explicitly without rewriting identity. |
The root identity declaration differs between HEAD, the index, and the worktree | Identity has an uncommitted change | Commit the intended declaration or restore it; never publish a different worktree value than HEAD. |
publish --force cannot fork or rekey | Existing hosted binding | Re-publish normally, or use explicit local Fork in a separate destination. |
--name only apply on first publish | Re-publish path | Drop the flag. A new name/identity requires explicit local Fork, not --force. |
Recovery posture: re-running publish is safe after repair. Preserve identity authority: restore or explicitly link matching evidence, or create a separate local Fork when a new Space is intended.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ideaspaces-xyz/claude-code-plugin --plugin ideaspaces14 skills in this plugin
/is-captureWrite something down so it is not lost — a decision, a finding, a piece of context worth keeping. Use when someone says write this down, note this, save this, keep this somewhere, don't let me forget, remember this, put this in my notes, or add this to the knowledge base; or when a decision has just been made that would be expensive to relitigate. Not for saving an ordinary source or config file — that is a plain file write.
/is-forkMaterialize an independent local Space from a canonical Space URL. Use when the user says fork this Space, take this public Space home, make a local independent copy, update or refresh a maintained fork, or wants to work from a copy without an account. Fork is history-free and unpublished; use is-publish later to host it.
/is-