Help us improve
Share bugs, ideas, or general feedback.
From homelab-core
Manages code snippets in self-hosted ByteStash: list, search, create/update/delete, share links, organize with tags via bash CLI scripts.
npx claudepluginhub jmagar/claude-homelab --plugin tautulliHow this skill is triggered — by the user, by Claude, or both
Slash command
/homelab-core:bytestashThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**⚠️ MANDATORY SKILL INVOCATION ⚠️**
Save, organize, search, and retrieve code snippets using tags, categories, smart search, and context suggestions. Invoke via /snippet-manager for commands like --search or --category.
Guides creating slash commands for Claude Code: structure, YAML frontmatter, dynamic arguments, file references, bash execution, user interactions, organization, and best practices.
Guides developers in creating and organizing slash commands for Claude Code, covering YAML frontmatter, dynamic arguments, bash execution, and user interaction patterns.
Share bugs, ideas, or general feedback.
⚠️ 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>"
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>