Xpersona
S

skill git - version control for your skills

CLAWHUB · Unverified

Manage AI agent skills with version control to initialize tracking, commit changes with semantic versioning, and revert to previous skill versions. Skill: skill git - version control for your skills Owner: zijinoier Summary: Manage AI agent skills with version control to initialize tracking, commit changes with semantic versioning, and revert to previous skill versions. Tags: latest:0.2.2 Version history: v0.2.2 | 2026-03-25T11:17:00.105Z | user Version 0.2.2 of skill-git --- Fix 1 — scan.md: Auto-deletion of missing skills → explicit confirmation Before: On pat

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1713ehvwbazj5dc5mczkmxjyx83hm06:skill-git
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-zijinoier-skill-git/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

145,555 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

assets/conflict-patterns/SKILL.md

---
name: Conflict Patterns
description: Identify conflicting rules between two lists of extracted rules. Use this skill when comparing a skill's rules against another skill's rules or against agent config rules (CLAUDE.md, GEMINI.md, etc.).
version: 1.0.0
---

# Conflict Patterns

This skill teaches you how to detect rule conflicts between two rule lists produced by the Rule Extraction skill.

## Types of Conflicts

### 1. Direct Contradiction
Two rules that explicitly state opposite behaviors.

Patterns to detect:
- `always X` vs `never X`
- `do X` vs `do not X` / `avoid X`
- `use X` vs `do not use X`
- `must X` vs `must not X`
- `始终 X` vs `禁止 X`
- `必须 X` vs `不允许 X`

Examples:
```
❌ "Always add docstrings to every function"
   vs "Do not add docstrings — keep code self-documenting"

❌ "Use double quotes for strings"
   vs "Use single quotes for strings"

❌ "Write commit messages in Chinese"
   vs "Write commit messages in English"
```

### 2. Semantic Contradiction
Two rules that don't use opposite words but prescribe incompatible behaviors.

Examples:
```
❌ "Keep functions under 20 lines"
   vs "Always include full error handling, logging, and retry logic in every function"
   (the second makes the first impossible to satisfy)

❌ "Optimize for readability, use verbose variable names"
   vs "Minimize code length, prefer concise expressions"

❌ "Add a comment above every line of code"
   vs "Comments should only appear when logic is non-obvious"
```

Detection approach: Ask whether it is possible to satisfy both rules simultaneously in a realistic scenario. If not, it is a semantic contradiction.

### 3. Scope Overlap (Non-Conflicting, Worth Noting)
Two rules that cover the same topic but are compatible — one is more specific than the other.

Examples:
```
⚠️  "Use camelCase for all identifiers"
    and "Use PascalCase for class names"
    (PascalCase rule is a valid specialization of the camelCase rule — not a conflict)

⚠️  "Write tests for all code"
    and "Write unit tests for utility functions"
    (second is a subset — no conflict)
```

These are **not conflicts** — label them as `overlap` only, not `conflict`.

## Non-Conflicts to Ignore

The following patterns look like conflicts but are not. **Do not flag these.**

### Meta-commentary vs. usage

A rule that **governs the style** of a pattern (advising against it) does not conflict with a rule that **utilizes** that same pattern for a specific operational purpose.

```
✅ NOT a conflict:
   rule A: "Avoid writing rules in ALL CAPS"
   rule B: "GENERATE THE EVAL VIEWER *BEFORE* evaluating inputs"

   rule A is giving writing advice to a human author.
   rule B is an imperative instruction to the agent using emphasis.
   Different registers, different audiences — not contradictory.
```

These are **not conflicts** — no need to be marked.

### Conditional vs. general

A rule that applies "when X" does not conflict with a general rule unless the condition X is always true.

```
✅ NOT a confl

assets/rule-extraction/SKILL.md

---
name: Rule Extraction
description: Extract a structured list of rules from all markdown files at the top level of a skill directory. Use this skill whenever you need to parse rules out of a skill for conflict checking, merging, or diffing.
version: 1.1.0
---

# Rule Extraction

This skill teaches you how to extract a structured, line-numbered list of rules from a skill directory.

## What Counts as a Rule

A **rule** is any statement that prescribes or constrains agent behavior. Recognize rules by their form:

- **Imperative directives**: "Always add type annotations", "Never use `var`"
- **Prohibition patterns**: "Do not X", "Avoid X", "禁止 X"
- **Requirement patterns**: "Must X", "Should X", "需要 X", "必须 X"
- **Conditional behavior**: "If X, then Y", "When X, do Y"
- **Style/format mandates**: "Use camelCase", "Limit lines to 80 characters"
- **Preference statements**: "Prefer X over Y", "优先使用 X"

Rules can appear as:
- Bullet list items (`-` or `*` or `+`)
- Numbered list items (`1.`, `2.`)
- Bold or emphasized sentences (`**Always do X**`)
- Plain sentences within a paragraph that contain directive language
- Section headers that are themselves imperatives ("Never commit secrets")

## What Does NOT Count as a Rule

Exclude the following from extraction:

- **Descriptive text**: Explanations of why a rule exists, background context
- **Examples**: Code blocks, sample outputs, "for example..." passages
- **Metadata**: YAML frontmatter, version info, author notes
- **Headings that introduce a section** (unless the heading itself is an imperative rule)
- **Vague non-actionable statements**: "Do good work", "Be helpful" — extract these but flag them as `vague: true`

## Output Format

Return a JSON array. Each rule is an object:

```json
[
  {
    "id": 1,
    "file": "SKILL.md",
    "line": 12,
    "text": "Always add type annotations to function parameters",
    "source_text": "- Always add type annotations to function parameters",
    "vague": false
  },
  {
    "id": 2,
    "file": "SKILL.md",
    "line": 15,
    "text": "Do not use var, prefer const or let",
    "source_text": "**Do not use `var`** — prefer `const` or `let`",
    "vague": false
  },
  {
    "id": 3,
    "file": "examples.md",
    "line": 4,
    "text": "Do good work",
    "source_text": "- Do good work",
    "vague": true
  }
]
```

Field definitions:
- `id`: Sequential integer starting from 1, across all files combined
- `file`: Filename (basename only, e.g. `SKILL.md`, `examples.md`) where the rule appears
- `line`: Line number within that file where the rule appears (1-indexed)
- `text`: Cleaned rule text, stripped of markdown formatting
- `source_text`: Original raw line as it appears in the file
- `vague`: `true` if the rule is too broad to be actionable

## Input Scope

The input is a **skill directory path** (e.g. `~/.claude/skills/humanizer/`).

**Files to read:** all `*.md` files directly inside the skill directory — `SKILL.md` first, then any other `*.md` files in

SKILL.md

---
name: skill-git
description: Version control for AI agent skills. Use when the user wants to initialize, commit, revert, check, scan, or merge their skills. Triggers on: "init my skills", "track skills", "commit skill changes", "save skill snapshot", "new skill version", "revert skill", "roll back skill", "undo skill changes", "restore skill", "check skill conflicts", "validate skill", "scan skills", "find overlapping skills", "merge skills", "combine skills".
argument-hint: [init|commit|revert|check|scan|merge] [options]
---

skill-git is a version control system for AI agent skills. It gives each skill folder its own independent git history, tagged with semantic versions (v1.0.0, v1.1.0, …), so you can commit snapshots and revert to any previous version at any time.

Six commands are available:
- **init** — set up version tracking for all skills under an agent directory
- **commit** — snapshot changed skills with a version bump and commit message
- **revert** — roll back one or more skills to a previous version
- **check** — check a skill for internal rule conflicts, agent config conflicts, and security issues
- **scan** — scan registered skills for semantic overlap and get merge suggestions
- **merge** — merge two or more similar skills into one stronger, more complete skill

## Prerequisites

Before using any command, ensure these tools are installed:
- **git** — `git --version` (install: `brew install git` on macOS, `apt install git` on Linux)
- **jq** — `jq --version` (install: `brew install jq` on macOS, `apt install jq` on Linux)

The `init` command will check for `git` automatically. If `jq` is missing, `commit` and `revert` will fail when updating `config.json`.

## Intent Routing

Parse `$ARGUMENTS`. If `$ARGUMENTS` is empty, infer intent from the user's natural language message.

| Trigger | Action |
|---|---|
| `init` / "initialize" / "set up" / "track my skills" / "start tracking" | Read `$CLAW_SKILL_DIR/init.md` and follow it exactly |
| `commit` / "save" / "snapshot" / "new version" / "save skill changes" | Read `$CLAW_SKILL_DIR/commit.md` and follow it exactly |
| `revert` / "roll back" / "undo" / "restore" / "go back to" | Read `$CLAW_SKILL_DIR/revert.md` and follow it exactly |
| `check` / "check skill" / "validate skill" / "find conflicts" / "skill conflicts" | Read `$CLAW_SKILL_DIR/check.md` and follow it exactly |
| `scan` / "scan skills" / "find overlapping skills" / "which skills can I merge" | Read `$CLAW_SKILL_DIR/scan.md` and follow it exactly |
| `merge` / "merge skills" / "combine skills" / "consolidate skills" | Read `$CLAW_SKILL_DIR/merge.md` and follow it exactly |
| No args or ambiguous intent | Show the menu below and wait for user input |

### Menu (show only when intent is unclear)

```
skill-git — version control for your AI skills

Available commands:

  1. init      Set up version tracking for your skills
  2. commit    Snapshot changed skills with a new version
  3. revert    Roll back a skill to a prev

_meta.json

{
  "ownerId": "kn7azsbssk2gzg95s8m7hd8g71834sy0",
  "slug": "skill-git",
  "version": "0.2.2",
  "publishedAt": 1774437420105
}

check.md

---
name: skill-git:check
description: Check a skill for internal rule conflicts, agent config conflicts, and security issues. Usage: /skill-git:check <skill-name> [-a <agent>]
---

You are executing `/skill-git:check`. Follow the steps below precisely.

## Step 1: Parse Arguments

The user's input after the command name is: $ARGUMENTS

Extract:
- `skill_name`: the first positional argument (required). Two supported formats:
  - `<skill-name>` — search across all known skill paths
  - `<plugin-name>:<skill-name>` — search only within the specified plugin's skills directory
- `agent`: the value after `-a` flag (optional). Defaults to auto-detect if not provided.

If `skill_name` is missing, respond:
```
Usage: /skill-git:check <skill-name> [-a <agent>]
Examples:
  /skill-git:check code-review
  /skill-git:check my-plugin:code-review
  /skill-git:check code-review -a gemini
```
Then stop.

If the format is `<plugin-name>:<skill-name>`, set:
- `plugin_filter` = `<plugin-name>`
- `skill_name` = `<skill-name>`

Otherwise set `plugin_filter` = null.

## Step 2: Resolve Agent Configuration

The agent lookup table:

| agent | base_dir | project config | global config |
|-------|----------|---------------|---------------|
| `claude` | `~/.claude` | `CLAUDE.md` | `~/.claude/CLAUDE.md` |
| `gemini` | `~/.gemini` | `GEMINI.md` | `~/.gemini/GEMINI.md` |
| `codex` | `~/.codex` | `AGENTS.md` | `~/.codex/AGENTS.md` |
| `openclaw` | `~/.openclaw` | `CLAW.md` | `~/.openclaw/CLAW.md` |

After resolving the agent, set `base_dir` from the table above.

The user can override `base_dir` in `~/.skill-git/config.local.md`:
```yaml
---
default_agent: claude
base_dir: /custom/path/to/cli/data
---
```
If `base_dir` is set in config, it takes precedence over the table value.

**If `-a` was provided**: look up the agent value in the table above. If not found, check `~/.skill-git/config.local.md` for custom agent definitions:
```yaml
---
agents:
  my-custom-agent:
    project_config: "MY-AGENT.md"
    global_config: "~/.my-agent/MY-AGENT.md"
    project_skill_paths:
      - ".my-agent/skills/"
      - ".my-agent/plugins/*/skills/"
    global_skill_paths:
      - "~/.my-agent/skills/"
      - "~/.my-agent/plugins/*/skills/"
---
```
If still not found, respond:
```
Unknown agent: "<agent>"
Define it in ~/.skill-git/config.local.md or use a built-in agent: claude, gemini, codex, openclaw
```
Then stop.

**If `-a` was not provided**: auto-detect the current CLI tool using the following steps in order:

**Step A — Check parent process:**
Run `ps -p $PPID -o comm=` and match the output against known CLI names:
- contains `claude` → `claude`
- contains `gemini` → `gemini`
- contains `codex` → `codex`
- contains `openclaw` or `claw` → `openclaw`

If matched, use that agent and note in the output: `(agent auto-detected from process: <agent>)`

**Step B — Check user config (if Step A fails):**
Read `~/.skill-git/config.local.md` and look for a `default_agent` field:
```yaml
---
default_

Sponsored

Ads related to skill git - version control for your skills and adjacent AI workflows.