🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Prompt Git

by @theshadowrose

Git for your prompts. Track every change, diff versions, rollback mistakes, never lose a good prompt again. All local, zero dependencies, works offline.

Versionv1.0.2
Installs1
⚑ When to Use
TriggerAction
Save every version as you refine your prompt. See what changed. Rollback if something breaks. Never lose a good version.
### 2. **A/B Testing Prompts**
Save version A, save version B, tag with results. Compare diffs to see exactly what changed between the winner and loser.
### 3. **Team Prompt Sharing**
Export your best prompts. Share the JSON file. Team imports it. Everyone has the same version, with full history if you want.
### 4. **System Prompt Library**
Organize all your system prompts by category. Tag the ones that work best. Search across all of them when you need inspiration.
### 5. **Audit Trail**
See when a prompt was changed, what changed, and what note was left. Perfect for compliance or debugging "when did this break?"
### 6. **Template Management**
Save reusable templates (e.g., "email writer", "code reviewer"). Pull them when needed. Never rewrite from scratch.
---
πŸ’‘ Examples

Example 1: Refining a System Prompt

# Initial version
echo "You are a helpful assistant." | \
  python3 prompt_git.py save assistant --category system --note "v1"

After testing, add more detail

echo "You are a helpful assistant. Provide concise answers." | \ python3 prompt_git.py save assistant --note "v2: added conciseness"

Hmm, too concise. Rollback

python3 prompt_git.py rollback assistant

Try a different approach

echo "You are a helpful assistant. Provide detailed, thoughtful answers." | \ python3 prompt_git.py save assistant --note "v3: detailed instead" --tag testing

This one works! Tag it

python3 prompt_git.py tag assistant best python3 prompt_git.py tag assistant production

Example 2: Sharing Prompts with a Team

# Export your best system prompt
python3 prompt_export.py export my-system-prompt team-prompt.json --history

Teammate imports it

python3 prompt_export.py import team-prompt.json

Now they have the full history and can see how it evolved

python3 prompt_git.py versions my-system-prompt

Example 3: Finding What Broke

# Prompt stopped working. When?
python3 prompt_git.py versions my-prompt

Output shows versions with timestamps

Pick two versions: one that worked, one that didn't

python3 prompt_git.py diff my-prompt

Diff shows exactly what changed

Fix it and save a new version


βš™οΈ Configuration

See config_example.json for reference constants and example values

# Change storage location
STORAGE_DIR = '/path/to/your/prompts'

Define your own categories

DEFAULT_CATEGORIES = ['system', 'task', 'template', 'snippet', 'general']

Suggested tags

SUGGESTED_TAGS = ['best', 'testing', 'production', 'deprecated']

Similarity threshold for "find similar" search

SIMILARITY_THRESHOLD = 0.5

See config_example.json for all options.


πŸ“‹ Tips & Best Practices

Q: Does it sync across devices? A: No. It's local-only. But you can export/import to share manually, or put ~/.promptgit in a synced folder (Dropbox, Git, etc.).

Q: Can I use it with Git? A: Yes! The storage directory is just JSON and text files. You can version the whole thing with Git if you want meta-version-control.

Q: What about collaborative editing? A: Not built-in. Export/import is the collaboration model. For real-time collab, use a shared folder or Git.

Q: Does it work with images or multimodal prompts? A: Text only. If your multimodal prompt has a text component, you can save that.

Q: How do I delete a prompt? A: Currently, no delete command (by design οΏ½ version control shouldn't delete easily). You can manually delete the folder in ~/.promptgit/prompts/.


View on ClawHub
TERMINAL
clawhub install prompt-git

πŸ§ͺ Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

πŸ” Can't find the right skill?

Search 60,000+ AI agent skills β€” free, no login needed.

Search Skills β†’