Manages code snippets in self-hosted ByteStash: list, search, retrieve, create with multi-files, update, delete, generate share links, and organize with tags via API scripts.
From bytestashnpx claudepluginhub jmagar/claude-homelabThis skill uses the workspace's default tool permissions.
load-env.shscripts/bytestash-api.shGuides browser automation with Playwright, Puppeteer, Selenium for e2e testing and scraping. Teaches reliable selectors, auto-waits, isolation to fix flaky tests.
Provides checklists to review code for functionality, quality, security, performance, tests, and maintainability. Use for PRs, audits, team standards, and developer training.
Enforces A/B test setup with gates for hypothesis locking, metrics definition, sample size calculation, assumptions checks, and execution readiness before implementation.
⚠️ MANDATORY SKILL INVOCATION ⚠️
YOU MUST invoke this skill (NOT optional) when the user mentions ANY of these triggers:
Failure to invoke this skill when triggers occur violates your operational requirements.
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: API key via x-api-key header (recommended for CLI/automation)
Required credentials in ~/.claude-homelab/.env:
BYTESTASH_URL="https://bytestash.example.com"
BYTESTASH_API_KEY="your-api-key-here"
How to get your API key:
.env fileSecurity:
chmod 600 ~/.claude-homelab/.env.env to version controlAll commands use the bash script wrapper in scripts/bytestash-api.sh.
cd skills/bytestash
./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"
./scripts/bytestash-api.sh get <snippet-id>
# Single fragment (inline code)
./scripts/bytestash-api.sh create \
--title "Docker Compose Example" \
--description "Production-ready compose file" \
--categories "docker,devops" \
--code "version: '3.8'..." \
--language "yaml" \
--filename "docker-compose.yml"
# Multiple fragments (from files)
./scripts/bytestash-api.sh push \
--title "FastAPI Setup" \
--description "Complete FastAPI project structure" \
--categories "python,api" \
--files "app.py,requirements.txt,Dockerfile"
./scripts/bytestash-api.sh update <snippet-id> \
--title "New Title" \
--description "Updated description" \
--categories "new,tags"
# Prompts for confirmation
./scripts/bytestash-api.sh delete <snippet-id>
# Create public share link
./scripts/bytestash-api.sh share <snippet-id>
# Create protected share (requires auth)
./scripts/bytestash-api.sh share <snippet-id> --protected
# Create expiring share (24 hours)
./scripts/bytestash-api.sh share <snippet-id> --expires 86400
# List all shares for a snippet
./scripts/bytestash-api.sh shares <snippet-id>
# Delete share link
./scripts/bytestash-api.sh unshare <share-id>
# View shared snippet
./scripts/bytestash-api.sh view-share <share-id>
When the user asks about ByteStash:
"Save this code as a snippet"
create command with inline codepush command with file paths"Find my Docker snippets"
search --category docker or search "docker"get <id> to show full snippet"Share this snippet publicly"
share <snippet-id> to create public link{BYTESTASH_URL}/s/{share-id}--protected or --expires flags"What snippets do I have?"
list command"Delete this snippet"
delete <snippet-id>"Organize my snippets by category"
listupdate commandByteStash supports snippets with multiple code fragments (files). Each fragment has:
app.py, Dockerfile)python, dockerfile)When to use multi-fragment:
Data Model:
{
"id": 123,
"title": "Snippet Title",
"description": "Detailed description",
"categories": ["tag1", "tag2"],
"fragments": [
{
"id": 456,
"file_name": "example.py",
"code": "print('hello')",
"language": "python",
"position": 0
}
],
"updated_at": "2024-01-01T00:00:00Z",
"share_count": 2
}
Authentication:
x-api-key header with API key from .envShare Links:
abc123def456)Destructive Operations:
Output Format:
jq for filtering/formatting (e.g., ./bytestash-api.sh list | jq '.[] | select(.categories[] == "docker")')Limitations:
/api/share*)references/api-endpoints.md for complete API referencereferences/quick-reference.md for command examplesreferences/troubleshooting.md for common failures{BYTESTASH_URL}/api-docs/{BYTESTASH_URL}CRITICAL: When invoking scripts from this skill via the zsh-tool, ALWAYS use pty: true.
Without PTY mode, command output will not be visible even though commands execute successfully.
Correct invocation pattern:
<invoke name="mcp__plugin_zsh-tool_zsh-tool__zsh">
<parameter name="command">./skills/bytestash/scripts/bytestash-api.sh [args]</parameter>
<parameter name="pty">true</parameter>
</invoke>