Logo di 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.

Panoramica

Autorejmagar
Repositoryclaude-homelab
Nome della skillbytestash
Stelle
87
Fork
11
File inclusi
5
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 5 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da jmagar su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Bytestash in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/jmagar/claude-homelab/tree/main/skills/bytestash
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Bytestash in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Bytestash non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Bytestash non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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>

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Bytestash su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Bytestash è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Bytestash in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/jmagar/claude-homelab/tree/main/skills/bytestash. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Bytestash?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Bytestash?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Bytestash: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Bytestash è gratuita?

Sì. È pubblicata su GitHub da jmagar con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇