Skip to content

Claude Mode

When the --claude flag is passed, all sb commands output structured JSON to stdout instead of human-readable text. This is used when Claude calls the CLI as a tool.

Usage

Terminal window
sb --claude <command> [args]

Response envelope

Every response follows this structure:

{
"status": "success | not_found | error",
"action": "get | put | search | auth | init",
"message": "Human-readable description",
"data": { ... }
}
FieldDescription
statusOne of success, not_found, or error.
actionThe command that produced this response.
messageA human-readable summary.
dataCommand-specific payload (see below).

Data shapes by command

get — success

{
"name": "Deploy Helper",
"slug": "deploy-helper",
"type": "skill",
"bin": "personal",
"files_written": [".claude/skills/deploy-helper/SKILL.md"]
}

get — not found

{
"query": "deploy",
"suggestions": [
{ "name": "Deploy Helper", "slug": "deploy-helper", "bin": "personal" }
]
}

put — success

{
"name": "My Skill",
"slug": "my-skill",
"type": "skill",
"bin": "my-org",
"files_uploaded": ["SKILL.md"],
"created": true
}

search — success

{
"query": "deploy",
"count": 2,
"results": [
{
"slug": "deploy-helper",
"name": "Deploy Helper",
"description": "Helps with deployments",
"type": "skill",
"bin": "personal",
"is_personal": true
}
]
}

auth — success

{
"prefix": "sk-abc1234"
}

Error

{
"code": "AUTH_INVALID",
"detail": "Token expired or revoked.",
"hint": "Run `sb auth <token>` to set a new token."
}

Error codes

CodeDescription
AUTH_INVALIDToken missing, expired, or revoked (HTTP 401).
MISSING_TOKENNo token argument provided to sb auth.
INVALID_TOKENToken does not start with sk-.
NOT_FOUNDRequested skill not found (HTTP 404).
PERMISSION_DENIEDNot authorized for this action (HTTP 403).
NETWORK_ERRORCould not reach the API server.
LOCAL_NOT_FOUNDLocal path does not exist or has no recognized files.
LOCAL_ERRORFile system operation failed.
CONFIG_ERRORCould not write config file.