Logo von Bytestash

Bytestash

Community
jmagar
bytestash

Manage code snippets in ByteStash snippet storage service. This skill should be used when the user asks to "save a snippet", "search snippets", "find code", "share snippet", "organize snippets", "list my snippets", "create snippet", "delete snippet", or mentions ByteStash, code storage, snippet management, or code archival.

Übersicht

Herausgeberjmagar
Repositoryclaude-homelab
Skill-Namebytestash
Sterne
87
Forks
11
Mitgelieferte Dateien
5
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 5 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von jmagar auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Bytestash in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/jmagar/claude-homelab/tree/main/skills/bytestash
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jmagar/claude-homelab.git /tmp/claude-homelab
mkdir -p .claude/skills
cp -r /tmp/claude-homelab/skills/bytestash .claude/skills/bytestash
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Bytestash in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Bytestash automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Bytestash nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

ByteStash Skill

⚠️ MANDATORY SKILL INVOCATION ⚠️

YOU MUST invoke this skill (NOT optional) when the user mentions ANY of these triggers:

  • "save snippet", "store code", "archive snippet"
  • "search snippets", "find snippet", "lookup code"
  • "share snippet", "create share link", "public snippet"
  • "list snippets", "show my snippets", "snippet library"
  • "delete snippet", "remove snippet", "update snippet"
  • "organize snippets", "categorize snippets", "tag snippets"
  • Any mention of ByteStash or code snippet management

Failure to invoke this skill when triggers occur violates your operational requirements.

Purpose

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:

  • Read-only: List, search, and retrieve snippets
  • Create/Update: Save new snippets with multiple code fragments
  • Delete: Remove snippets with user confirmation
  • Share Management: Create, view, and delete share links (public/protected/expiring)
  • Organization: Categorize and organize snippets with tags

Authentication: API key via x-api-key header (recommended for CLI/automation)

Setup

Required credentials in ~/.claude-homelab/.env:

bash
BYTESTASH_URL="https://bytestash.example.com"
BYTESTASH_API_KEY="<your_api_key>"

How to get your API key:

  1. Log in to ByteStash web interface
  2. Navigate to Settings → API Keys
  3. Create new API key with a descriptive name
  4. Copy the generated key to .env file

Security:

  • Set permissions: chmod 600 ~/.claude-homelab/.env
  • API keys are scoped to your user account
  • NEVER commit .env to version control

Commands

All commands use the bash script wrapper in scripts/bytestash-api.sh.

List Snippets

bash
cd skills/bytestash
./scripts/bytestash-api.sh list

Search Snippets

bash
# Search by title (case-insensitive partial match)
./scripts/bytestash-api.sh search "docker"

# Search by category
./scripts/bytestash-api.sh search --category "bash"

Get Snippet Details

bash
./scripts/bytestash-api.sh get <snippet-id>

Create Snippet

bash
# 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"

Update Snippet

bash
./scripts/bytestash-api.sh update <snippet-id> \
  --title "New Title" \
  --description "Updated description" \
  --categories "new,tags"

Delete Snippet

bash
# Prompts for confirmation
./scripts/bytestash-api.sh delete <snippet-id>

Share Management

bash
# 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>

Workflow

When the user asks about ByteStash:

  1. "Save this code as a snippet"

    • Determine if single or multiple files
    • If single: Use create command with inline code
    • If multiple: Use push command with file paths
    • Always include title, description, and categories
  2. "Find my Docker snippets"

    • Use search --category docker or search "docker"
    • Present results with ID, title, description, and categories
    • If user wants details: Use get <id> to show full snippet
  3. "Share this snippet publicly"

    • Use share <snippet-id> to create public link
    • Return share URL: {BYTESTASH_URL}/s/{share-id}
    • Optionally use --protected or --expires flags
  4. "What snippets do I have?"

    • Use list command
    • Group by categories for better organization
    • Show total count and recent updates
  5. "Delete this snippet"

    • Confirm with user before deletion
    • Use delete <snippet-id>
    • Verify deletion with success message
  6. "Organize my snippets by category"

    • List all snippets with list
    • Identify missing/inconsistent categories
    • Suggest category updates with update command

Multi-Fragment Snippets

ByteStash supports snippets with multiple code fragments (files). Each fragment has:

  • file_name: Display name (e.g., app.py, Dockerfile)
  • code: The actual code content
  • language: Syntax highlighting language (e.g., python, dockerfile)
  • position: Display order (0-indexed)

When to use multi-fragment:

  • Related configuration files (docker-compose.yml + .env)
  • Full project structures (API + tests + docs)
  • Before/after code examples
  • Multi-language implementations

Notes

Data Model:

json
{
  "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:

  • Uses x-api-key header with API key from .env
  • API keys are managed in ByteStash web UI (Settings → API Keys)
  • Preferable to JWT tokens for automation

Share Links:

  • Public shares: Anyone with link can view
  • Protected shares: Requires authentication to view
  • Expiring shares: Auto-delete after specified seconds
  • Share IDs are random strings (e.g., abc123def456)

Destructive Operations:

  • Delete snippet: Permanently removes snippet and all fragments
  • Delete share: Invalidates share link (snippet remains)
  • Both require user confirmation before execution

Output Format:

  • All commands return JSON by default
  • Use jq for filtering/formatting (e.g., ./bytestash-api.sh list | jq '.[] | select(.categories[] == "docker")')
  • Errors return HTTP status codes with JSON error messages

Limitations:

  • API key required for all operations (no anonymous access via API)
  • Categories are tags (no hierarchical structure)
  • No bulk operations (must process snippets individually)
  • Share links cannot be updated (must delete and recreate)
  • Some deployments may require JWT auth for share endpoints (/api/share*)

Reference

  • API Endpoints: See references/api-endpoints.md for complete API reference
  • Quick Reference: See references/quick-reference.md for command examples
  • Troubleshooting: See references/troubleshooting.md for common failures
  • Official Docs: API documentation at {BYTESTASH_URL}/api-docs/
  • Web Interface: Full-featured UI at {BYTESTASH_URL}

🔧 Agent Tool Usage Requirements

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:

typescript
<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>

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Bytestash?

Manage code snippets in ByteStash snippet storage service. This skill should be used when the user asks to "save a snippet", "search snippets", "find code", "share snippet", "organize snippets", "list my snippets", "create snippet", "delete snippet", or mentions ByteStash, code storage, snippet management, or code archival.

Warum Bytestash in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Bytestash besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Bytestash in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/jmagar/claude-homelab/tree/main/skills/bytestash ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Bytestash nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Bytestash verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Bytestash damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Bytestash kostenlos?

Ja. Der Skill wird von jmagar auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇