Prompt Version Control

SKILLAI 工具
AI 工具 未标注权限 许可证不明确 已核验
安装这个技能

类Git的AI提示词版本控制,实现版本管理、语义差异、AB测试、指标追踪、回滚和远程协作。

一句话选型结论

按资料字段整理

Prompt Version Control是AI 工具类的 Agent Skill,安装方式:ClawHub 市场,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类AI 工具 安装方式ClawHub 市场 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

ClawHub 市场
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_15d05850/prompt-version-control
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

AI 工具
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_15d05850仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式ClawHub 市场安装包 clawhub
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791686496
正文体量13.4 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
组合多个 AI 能力

把写作、检索、总结串成一条流程。

搭工作流

把固定流程做成可重复调用的步骤。

做提示词与评测

整理提示词并对比输出效果。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 已做过站内核验,页面字段与仓库对得上。
  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在AI 工具场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
Prompt Version Control当前 未标注权限 ClawHub 市场 未标注 未标注 有
执行计划 只读 GitHub 仓库 151.5 万 Codex、Claude、Cursor 有
Playwright MCP 测试 浏览器控制 ClawHub 市场 136.5 万 OpenClaw 有
完成前的验证 未标注权限 GitHub 仓库 131.9 万 Codex、Claude、Cursor 有
子 Agent 驱动开发 只读 GitHub 仓库 131.2 万 Codex、Claude、Cursor 有
前端设计 执行命令 GitHub 仓库 125.6 万 Codex、Claude、Cursor 有

SKILL.md 全文

13.4 KB
模型实际读到的说明书原文,来自技能仓库

Prompt Version Control (Prompt 版本控制器)

Git-inspired version control system for AI prompts. Track every edit, run A/B tests, measure quality metrics, and rollback instantly — treat your prompts like code.

Core Capabilities

  • Version tracking: Every prompt change auto-commits with semantic versioning (major.minor.patch)
  • A/B testing: Run v1 vs v2 side-by-side, measure response quality, latency, and token cost
  • Diff engine: Compare prompt versions with semantic-aware diffs (not just text)
  • Rollback: Instantly revert to any previous version with full history preservation
  • Remote sync: Push/pull prompts to GitHub/GitLab for team collaboration
  • Metrics dashboard: Track improvement/degradation trends across versions
  • Conflict resolution: Merge divergent prompt branches with structured conflict markers

Workflow (9 Steps)

Step 1: Initialize Prompt Repository

Input: prompt init [directory] — user runs init command in a project or empty directory.
Output: Creates .prompt/ directory structure:

.prompt/
  config.yaml      # repo settings, LLM provider config, test dataset path
  prompts/         # individual prompt files
  history/         # version history (git-compatible)
  metrics/         # A/B test results
  branches/        # branch references

Logic: Auto-detect if already inside a git repo; if so, integrate .prompt/ as a subdirectory. Generate initial config.yaml with sensible defaults. Prompt user for LLM API key if not in environment.

Step 2: Register a New Prompt

Input: prompt add <name> [--template <type>] [--description "..."]
Output: Creates prompts/<name>.yaml with metadata and initial version v0.1.0.

name: customer-support-classifier
version: 0.1.0
description: Classify customer inquiries into 5 categories
model: gpt-4
temperature: 0.3
system: |
  You are a customer support classifier...
user_template: |
  {{query}}
variables:
  - name: query
    type: string
    required: true
test_cases:
  - input: "Where is my order #12345?"
    expected_category: "order_status"
metrics:
  quality_score: null
  avg_latency_ms: null
  avg_tokens: null

Logic: Templates include chat, classifier, generator, extractor, custom. Auto-extract variables from {{...}} patterns.

Step 3: Edit and Auto-Version

Input: User edits prompts/<name>.yaml directly or via prompt edit <name>.
Output: On save, auto-increments version:
- Patch bump (0.1.0 → 0.1.1): wording changes, examples, minor parameter tweaks
- Minor bump (0.1.0 → 0.2.0): new variables, restructured prompt, changed model
- Major bump (0.1.0 → 1.0.0): fundamentally different approach, breaking output format change

Logic: LLM-assisted semantic diff determines bump magnitude. User can override: prompt edit <name> --bump major.

Step 4: Run A/B Test

Input: prompt test <name> — runs the current version against the previous version.
Action:
1. Load test cases from test_cases in the prompt YAML
2. Send each test case to both prompt versions
3. Collect responses and compute metrics

Output: A/B comparison table.

Test Case Metric v0.1.2 v0.1.3 Δ
order_status Quality (1-10) 8.2 9.1 +0.9 ⬆
order_status Latency (ms) 1240 1180 -60 ⬇
order_status Tokens 340 312 -28 ⬇
refund_request Quality 7.5 7.3 -0.2 ⬇
... ... ... ... ...
Overall Quality 7.9 8.0 +0.1

Logic: Quality scoring uses LLM-as-judge with predefined rubrics. Statistical significance check (p < 0.05) when ≥20 test cases. Flag degradation in red.

Step 5: Diff Two Versions

Input: prompt diff &lt;name&gt; v0.1.2 v0.1.3
Output: Semantic-aware diff highlighting:
- Text changes: Standard line diff with context
- Structural changes: Added/removed variables, parameter changes
- Intent changes: LLM-summarized description of what changed and why it matters

--- customer-support-classifier v0.1.2
+++ customer-support-classifier v0.1.3
@@ system @@
- You are a helpful customer support classifier.
+ You are an expert customer support triage agent with 10 years of experience.

@@ variables @@
+ added: priority_level (enum: low, medium, high, urgent)

Summary: Added urgency classification dimension and elevated persona specificity.

Step 6: View Version History

Input: prompt log &lt;name&gt; [--limit N]
Output: Git-log-style history with metrics overlay.

v0.3.0 (2026-06-15)  Alice  Added priority classification, bumped to gpt-4o
v0.2.1 (2026-06-12)  Bob    Fixed edge case: empty query → graceful fallback
v0.2.0 (2026-06-10)  Alice  Added examples for refund flow
v0.1.0 (2026-06-01)  Alice  Initial prompt
---
Quality trend: ████▌ 7.2 → 7.9 → 8.4 → 9.1

Step 7: Rollback

Input: prompt rollback &lt;name&gt; --to v0.2.1
Output: Restores v0.2.1 as current working version, creates a new commit marking the rollback.
Logic: Rollback is itself a versioned action (bumps patch). History is never destroyed. prompt rollback &lt;name&gt; --undo to return to pre-rollback state.

Step 8: Remote Sync

Input: prompt push [--remote origin] / prompt pull
Output: Syncs .prompt/ to/from configured remote (GitHub/GitLab).
Logic: Standard git push/pull under the hood. Merge conflicts surfaced with structured markers for manual resolution. prompt merge --tool opens interactive merge UI.

Step 9: Generate Iteration Report

Input: prompt report &lt;name&gt; [--from v0.1.0] [--format markdown|html]
Output: Full version history report with:
- Version timeline (Mermaid chart)
- Quality score trend (sparkline)
- Token cost trend
- Top 3 most impactful changes (by quality delta)
- Regression alerts

Sample Prompts

Prompt 1: Initialize and First Prompt

User: prompt init ./my-prompts &amp;&amp; prompt add email-generator --template generator --description &quot;Generate marketing emails&quot;
Expected Output: Repository created, first prompt registered at v0.1.0.

Prompt 2: A/B Test

User: prompt test email-generator
Expected Output: Side-by-side comparison of current vs previous version across all test cases, with overall quality delta.

Prompt 3: Rollback After Degradation

User: prompt rollback email-generator --to v1.2.0
Expected Output: v1.2.0 restored as working version, commit logged. "Rolled back from v1.3.1 to v1.2.0 (quality dropped 12% in v1.3.0)".

Prompt 4: Diff Understanding

User: prompt diff email-generator v1.2.0 v1.3.0
Expected Output: Semantic diff with text changes, structural changes, and LLM-generated summary of what changed.

Prompt 5: Team Collaboration

User: prompt push (after editing prompts locally) then prompt pull (on teammate's machine)
Expected Output: Remote sync with conflict markers if both edited same prompt.

Prompt 6: Full Report

User: prompt report email-generator --from v0.1.0 --format markdown
Expected Output: Complete iteration history with quality/cost trends and top-impact changes.

Real Task Examples

Example 1: Solo Developer Iterating

Scenario: Developer building a customer-facing chatbot, iterating the system prompt daily.
Input: Series of prompt edit sessions over 2 weeks, with periodic prompt test runs.
Steps:
1. prompt init → repo created
2. prompt add chatbot --template chat → v0.1.0
3. Edit 5 times over week 1 → versions 0.1.1 through 0.3.0
4. prompt test chatbot → discovers v0.2.1 had best quality (9.2)
5. prompt rollback chatbot --to v0.2.1 → restores best version
6. Continue iterating from v0.2.1 → v0.4.0 surpasses old best
7. prompt report chatbot → shows quality journey: "V-shaped recovery after rollback"
Output: 14 versions tracked, best version identified, recovery path documented.

Example 2: Team Prompt Collaboration

Scenario: 3-person AI team managing 50+ prompts for a product.
Input: Multiple team members editing prompts, pushing/pulling.
Steps:
1. Alice: prompt init + prompt add pricing-prompt → pushes to GitHub
2. Bob: prompt pull → gets pricing-prompt v0.1.0
3. Alice edits → v0.2.0, Bob edits → v0.2.0-bob (branch)
4. prompt push from both → merge conflict detected
5. prompt merge --tool → interactive resolution showing both versions side-by-side
6. Resolved → v0.3.0 on main
7. prompt test pricing-prompt → validates merged version
Output: Conflict resolved, merged version tested, team workflow established.

Example 3: Production Rollback Emergency

Scenario: Production chatbot quality suddenly drops after latest prompt deploy.
Input: Alert from monitoring: user satisfaction down 15%.
Steps:
1. prompt log chatbot --limit 3 → identifies v2.4.0 as latest deploy
2. prompt diff chatbot v2.3.0 v2.4.0 → shows new "be more concise" instruction caused incomplete answers
3. prompt rollback chatbot --to v2.3.0 → instant revert
4. Verification: quality metrics return to baseline within minutes
5. Post-mortem: prompt report chatbot --from v2.3.0 documents the incident
Output: Rollback completed in <1 minute. Incident documented for team review.

🚀 First-Success Path (3 Steps)

  1. Step 1: Run prompt init ./my-prompts &amp;&amp; prompt add hello --template chat
  2. Step 2: Edit the prompt, then run prompt log hello to see your first version
  3. Step 3: Edit again, run prompt diff hello v0.1.0 v0.2.0 — see your changes tracked instantly

Boundary Conditions

Condition Behavior
Prompt file deleted manually Detect in next prompt log, offer recovery from .prompt/history/
Concurrent edits (team) Merge conflict on push; structured markers for resolution
Empty test_cases Warn; A/B test requires ≥1 test case, proceed with manual review mode
LLM API key missing Test commands fail gracefully; editing/log/diff still work
Large repository (>500 prompts) Pagination on prompt log --all; recommend splitting into sub-repos
Git remote not configured prompt push prompts to set remote URL
Model change (gpt-4 → gpt-4o) Auto-detected as minor bump; flag in diff as "model change"
Binary/incompatible changes Warn if output schema changes; recommend major version bump

Error Handling

Error Code Scenario Handling
E-NOT-INIT Command run outside a prompt repo "No prompt repo found. Run prompt init first."
E-PROMPT-NOT-FOUND Referenced prompt name doesn't exist Show similar prompt names (Levenshtein distance)
E-VERSION-NOT-FOUND Referenced version doesn't exist Show available versions for that prompt
E-MERGE-CONFLICT Push/pull conflict detected Show conflicting sections, offer prompt merge --tool
E-API-FAIL LLM API call fails during test Skip failed test case, report in results, don't block remaining
E-TEST-INSUFFICIENT A/B test with <10 test cases Show results but flag low confidence

Security Requirements

  • API key storage: Store in environment variables or OS keychain only; never in .prompt/config.yaml or git history
  • Prompt content privacy: Prompt files may contain proprietary business logic; respect .gitignore patterns
  • Team access control: Remote sync via standard git permissions; no additional auth layer
  • Production data safety: Test cases should use synthetic or anonymized data; never real user data in version control
  • Audit trail: All version changes are immutable and attributed; no history rewriting

Implementation

Project Structure

File Purpose
SKILL.md Full design document (this file)
skill.json Skill metadata with script/schema references
scripts/prompt-vc.sh Main CLI script — implements all workflow steps
schemas/input.schema.json JSON Schema for prompt YAML files
schemas/output.schema.json JSON Schema for test results / diff / log output
references/config.yaml Default .prompt/config.yaml template

CLI Usage

# Initialise repository
./scripts/prompt-vc.sh init ./my-prompts

# Add a prompt with a template
./scripts/prompt-vc.sh add email-generator --template generator

# Edit (opens $EDITOR)
./scripts/prompt-vc.sh edit email-generator

# Diff two versions
./scripts/prompt-vc.sh diff email-generator v0.1.0 v0.2.0

# View version history
./scripts/prompt-vc.sh log email-generator

# Run A/B test
./scripts/prompt-vc.sh test email-generator

# Rollback
./scripts/prompt-vc.sh rollback email-generator --to v0.1.0

# Generate report
./scripts/prompt-vc.sh report email-generator

Dependencies

  • bash 4+ (macOS: modern bash via Homebrew, or use default system bash)
  • diff (standard Unix utility)
  • python3 (optional — used for YAML parsing in test/report)
  • git (optional — auto-detected for .gitignore integration)
  • $EDITOR (defaults to vi; set EDITOR env var to customise)

All test output is simulated offline (no LLM API calls). The A/B test engine generates deterministic metrics based on prompt length to validate the CLI workflow without requiring API keys.

常见问题

5 问
答案由本站依据条目字段整理
Prompt Version Control怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_15d05850/prompt-version-control。安装方式为ClawHub 市场。装完刷新技能列表或重开客户端。

Prompt Version Control支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

Prompt Version Control权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

Prompt Version Control收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

Prompt Version Control用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。