PromptGit Local Prompt Version Control for Openclaw

A local, dependency-free version control system designed to track, diff, and rollback iterations of AI prompts and templates.

theshadowrose
v1.0.2
Mar 10, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install prompt-git

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install prompt-git using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is PromptGit Local Prompt Version Control?

PromptGit is a purpose-built versioning tool that brings Git-like functionality to the world of prompt engineering. By utilizing this utility within the Openclaw Skills framework, developers can maintain a rigorous history of system prompts, task snippets, and complex templates without relying on cloud-based storage or manual file backups.

The tool operates entirely locally and offline, ensuring that your intellectual property remains private and accessible. It solves the common frustration of losing a high-performing prompt version during refinement by providing a structured way to save, tag, and compare changes over time.

PromptGit Local Prompt Version Control Use Cases

  • Prompt Engineering Iteration: Save every minor tweak as you refine your prompt and instantly see what changed between versions.
  • A/B Testing Prompts: Maintain multiple variations of a prompt and tag the winner after performance testing.
  • Team Prompt Sharing: Export your entire prompt history into a portable JSON bundle for team-wide collaboration.
  • Prompt Auditing: Track the exact timestamp and reasoning behind every modification to your AI system instructions.
  • Reusable Template Management: Organize and search through a library of reusable snippets for various LLM tasks.

How PromptGit Local Prompt Version Control Works

  1. Initialize a local repository which creates an index.json and a dedicated prompts directory in your home folder.
  2. Save a prompt via the CLI or API, which generates a unique version ID and stores the content as a text file while updating the metadata index.
  3. Add descriptive notes and tags (e.g., 'production', 'experimental') during the save process to provide context for future audits.
  4. Utilize the diff command to generate a side-by-side comparison between any two version IDs to visualize additions or deletions.
  5. Rollback to a previous state by updating the pointer for the current version to an earlier hash, ensuring stability when new edits fail.

PromptGit Local Prompt Version Control Setup

PromptGit is a zero-dependency Python tool compatible with Python 3.7+.

# Save a prompt version from a text file
python3 prompt_git.py save my-prompt --file prompt.txt --note "Initial v1"

# List all saved prompts and their metadata
python3 prompt_git.py list

# View the full version history of a specific prompt
python3 prompt_git.py versions my-prompt

PromptGit Local Prompt Version Control Data Schema & Taxonomy

The skill organizes data in a transparent, human-readable directory structure at ~/.promptgit/:

Component Description
index.json Global metadata mapping prompt names to categories, tags, and current version pointers.
prompts/{name}/ Individual directories for every tracked prompt.
versions.json Local history for a specific prompt, including timestamps and author notes.
{hash}.txt The raw text content of a specific prompt version, named by its unique identifier.

PromptGit Local Prompt Version Control Advanced Features

  • Python API Integration: Embed prompt version control directly into your custom AI agents or automated workflows.
  • Similarity Search: Discover prompts that share similar content using a configurable similarity threshold.
  • Regex & Keyword Filtering: Powerful search capabilities to find specific snippets across your entire historical library.
  • Multi-Prompt Export: Bundle multiple prompts with their full version history into a single, portable JSON file for sharing or migration.
  • Markdown Export: Convert prompt histories into documentation-ready Markdown files automatically.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*