From spellguard
Bootstraps Spellguard GitHub credentials via WebSocket and browser authorization. Run /spellguard-setup or when GitHub access needs initial setup.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spellguard:spellguard-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill bootstraps a Spellguard credential for the current Claude Code
This skill bootstraps a Spellguard credential for the current Claude Code session. It opens a WebSocket to the Spellguard broker, surfaces a setup URL the user follows in their browser, starts the persistent credential daemon, and waits (bounded) for the broker to push a scoped GitHub token back to the plugin.
Run the wrapper with the BashTool:
${CLAUDE_PLUGIN_ROOT}/bin/skill-spellguard-setup
The wrapper writes interactive prompts and the URL to stderr; it returns a JSON summary on stdout when complete. It can legitimately run for ~15 minutes (up to 10 waiting for the browser approval, then up to 5 waiting for the dashboard GitHub connect), so prefer running it in the background and relay the setup URL to the user as soon as it appears in the output.
~/.config/spellguard/config.json.The JSON summary reports what happened, e.g.
{"ok":true,"daemon":"spawned","githubCredential":"delivered"}.
githubCredential:"pending" is NOT an error — it means the dashboard
GitHub connect hasn't completed yet.
Git-credential protection for the CURRENT session still finishes wiring at the next session start (restart or /clear) — the env-file injection is performed by the SessionStart hook.
Just execute the wrapper and surface its output. Don't try to reimplement the flow in the conversation — the wrapper is the source of truth.
The wrapper runs non-interactively under the skill, so it cannot show its menu. If it reports an existing identity, ASK THE USER which action they want, then re-run the wrapper with the matching flag:
--choice print — show the current identity (default behavior)--choice additional — provision an additional agent (replaces the
credential stored on this machine; the server keeps the existing agent)--choice reauthorize — re-authorize this machine (re-binds the same
agent identity; only the secret rotates)/spellguard-reset — disconnect this machine: deregister server-side
(tolerates an already-deleted agent), stop the local credential daemon,
and delete the stored credential. Use before a from-scratch test.If the wrapper reports the agent is "no longer recognized by the server", it has already fallen through to fresh setup — just surface the new URL.
SessionStart hooks fire only on startup/resume/clear/compact — never on
/reload-plugins — so on a fresh mid-session install nothing else can
start the daemon before the user's next session. Setup must leave one
running or the pushed GitHub credential has no consumer (2026-06-11
incident).
npx claudepluginhub spellguard/spellguard --plugin spellguardAutomatically detects and configures GitHub credentials (GITHUB_TOKEN, gh CLI, SSH, helpers) for git remotes and auth in workflows targeting GitHub repositories.
Resets Spellguard agent on the current machine: deregisters from server, stops daemon, deletes credential. Use for from-scratch setup tests or clean teardown.
Creates, verifies, and revokes GitHub fine-grained personal access tokens from a declarative JSON spec via browser automation, since no API exists for this.