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
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": { ... }}| Field | Description |
|---|---|
status | One of success, not_found, or error. |
action | The command that produced this response. |
message | A human-readable summary. |
data | Command-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
| Code | Description |
|---|---|
AUTH_INVALID | Token missing, expired, or revoked (HTTP 401). |
MISSING_TOKEN | No token argument provided to sb auth. |
INVALID_TOKEN | Token does not start with sk-. |
NOT_FOUND | Requested skill not found (HTTP 404). |
PERMISSION_DENIED | Not authorized for this action (HTTP 403). |
NETWORK_ERROR | Could not reach the API server. |
LOCAL_NOT_FOUND | Local path does not exist or has no recognized files. |
LOCAL_ERROR | File system operation failed. |
CONFIG_ERROR | Could not write config file. |