/bytestash:bytestashfrom bytestash
This skill should be used when the user asks to save a snippet, store code, create a snippet, search snippets, find a snippet, share a snippet, list snippets, delete a snippet, add to ByteStash, or mentions ByteStash or snippet management.
Ships in bytestash. 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; scripts run unread.
ByteStash is a self-hosted code snippet management service with multi-file support, sharing capabilities, and organization features. This skill provides read-write access to manage snippets with full CRUD operations.
Capabilities:
Authentication: JWT via the bytestashauth: bearer <token> header.
Warning: API keys do NOT work for snippet writes on ByteStash ≤ 1.0.0. Its
authenticateTokenmiddleware ignoresreq.apiKeyand still demands a JWT, sox-api-keyreturns401 Authentication requiredon/api/snippets. The wrapper therefore authenticates with a JWT (login or a pre-minted token). API keys only work on the read-only public endpoints (/api/public/snippets). This is fixed on ByteStashmain(theif (req.apiKey) return next()bypass) — once released,x-api-keywill work for writes again.
Configure credentials through the plugin userConfig when possible. The plugin
hook writes ${XDG_CONFIG_HOME:-~/.config}/lab-bytestash/config.env with mode
600; ~/.lab/.env is only a migration fallback.
BYTESTASH_URL="https://bytestash.example.com"
BYTESTASH_USERNAME="<your_username>"
BYTESTASH_PASSWORD="<your_password>" # recommended: wrapper logs in each run, never expires
# --- or, instead of username/password: ---
BYTESTASH_TOKEN="<a_jwt>" # pre-minted JWT (expires; login is more durable)
BYTESTASH_API_KEY="<your_api_key>" # optional; only useful for /api/public reads (and future versions)
The wrapper resolves auth in this order: BYTESTASH_TOKEN → BYTESTASH_USERNAME+BYTESTASH_PASSWORD
(via POST /api/auth/login). Override the env file path with BYTESTASH_ENV_FILE.
How to get credentials:
jwt.sign({id,username}, JWT_SECRET)) or copy bytestash_token
from your browser's cookies/localStorage. Note JWTs expire (default 24h).Security:
chmod 600 ~/.lab/.env if you use it.env to version controlBYTESTASH_TOKEN is a standing credential — revoke by rotating the
server's JWT_SECRET. Prefer username/password where possible.All commands use the bash wrapper scripts/bytestash-api.sh. Run it from this
skill directory (or call it by absolute path); output is JSON by default. These
five cover the common path — the full command catalog (update, push,
share/unshare/view-share, jq recipes, bulk workflows) is in
references/quick-reference.md.
# List all snippets
./scripts/bytestash-api.sh list
# Search by title (case-insensitive partial match)
./scripts/bytestash-api.sh search "docker"
# Search by category
./scripts/bytestash-api.sh search --category "bash"
# Get one snippet's full detail
./scripts/bytestash-api.sh get <snippet-id>
# Create a single-fragment snippet
./scripts/bytestash-api.sh create \
--title "Docker Compose Example" \
--categories "docker,devops" \
--code "version: '3.8'..." \
--language "yaml" \
--filename "docker-compose.yml"
Multi-file snippets use push --files "a.py,b.txt,Dockerfile"; each file becomes
an ordered fragment (file_name, code, language, position). The full
snippet data model is documented in references/api-endpoints.md.
delete <snippet-id> permanently removes the snippet and all fragments, and
prompts for confirmation. Always confirm with the user first.unshare <share-id> invalidates a share link (the snippet remains).references/quick-reference.md — full command catalog, jq filters, and bulk workflowsreferences/api-endpoints.md — complete REST API reference and snippet data modelreferences/troubleshooting.md — auth (401 on ≤1.0.0), connectivity, and share-endpoint failures{BYTESTASH_URL}/api-docs/ — Web UI: {BYTESTASH_URL}Run this skill's scripts from this skill directory.
./scripts/bytestash-api.sh [args]
CHANGELOG.md (opens in a new tab)README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)load-env.sh (opens in a new tab)references/api-endpoints.md (opens in a new tab)references/quick-reference.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)scripts/bytestash-api.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub dinglebear-ai/dendrite --plugin bytestash