Skip to content
versioning-skills logo

Versioning Skills

versioning-skills

REQUIRED for all skill development. Automatically version control every skill file modification for rollback/comparison. Use after init_skill.sh, after every str_replace/create_file, and before packaging.

mattnigh/skills_collection0installs24stars

SKILL.md

Full skill instructions

Versioning Skills

Use git to track changes during skill development. Initialize repos after creating skills, commit after each logical change, and use git commands to compare versions or revert mistakes.

When Creating a New Skill

After running init_skill.sh, immediately initialize git:

cd /​home/​claude/​skill-name
git init
git add .
git commit -m "Initial commit: skill structure"

When Editing Skills

After each logical change (adding a section, fixing an example, refactoring), commit:

cd /​home/​claude/​skill-name
git add .
git commit -m "Add: validation workflow pattern"

Commit message patterns:

  • "Add [feature]: description" - New functionality
  • "Fix [issue]: description" - Bug fixes
  • "Update [section]: description" - Content changes
  • "Refactor [component]: description" - Structural changes
  • "Remove [feature]: description" - Deletions

When User Asks "What Changed?"

CRITICAL: Never display diffs inline - redirect to files and provide links.

ALSO CRITICAL: Only create diffs/​changelogs when user explicitly asks "what changed?" or "show differences"

Don't preemptively create:

  • CHANGELOG.md files
  • Change documentation
  • "Here's what I modified" summaries

Why: The updated code/​docs ARE the documentation. Creating separate changelogs wastes tokens and duplicates information.

When user asks, show commit history:

cd /​home/​claude/​skill-name
git log --oneline

Save diff to file (prevents token waste):

cd /​home/​claude/​skill-name
git diff <commit-hash-1> <commit-hash-2> > /​mnt/​user-data/​outputs/​changes.diff

Then provide: [View changes](computer:///mnt/​user-data/​outputs/​changes.diff)

For multiple diffs:

# Changed files list
git diff --name-only <commit-1> <commit-2> > /​mnt/​user-data/​outputs/​changed-files.txt

# Full diff
git diff <commit-1> <commit-2> > /​mnt/​user-data/​outputs/​full-diff.diff

# Summary stats
git diff --stat <commit-1> <commit-2> > /​mnt/​user-data/​outputs/​diff-stats.txt

Wrong: git diff <commit-1> <commit-2> (displays in stdout, wastes tokens) Right: git diff <commit-1> <commit-2> > /​mnt/​user-data/​outputs/​diff.txt (file + link)

Reverting Commits or Discarding Work

Undo last commit (keep uncommitted changes):

cd /​home/​claude/​skill-name
git reset --soft HEAD~1

Undo last commit (discard all changes):

git reset --hard HEAD~1

Revert specific commit (creates new commit, preserves history):

git revert <commit-hash>

Discard uncommitted edits (restore to last commit):

git restore .

Prefer git revert over git reset --hard to preserve history.

When Testing Experimental Changes

Create a branch before risky modifications:

cd /​home/​claude/​skill-name

# Create and switch to experiment branch
git checkout -b experiment-new-approach

# Make changes, test
# ... edit files ...
git add .
git commit -m "Experiment: alternative validation"

# If successful, merge back
git checkout main
git merge experiment-new-approach
git branch -d experiment-new-approach

# If failed, abandon and return to main
git checkout main
git branch -D experiment-new-approach

When Comparing Two Skill Versions

If user uploads or provides two versions:

cd /​home/​claude
mkdir -p compare

# Extract both versions
unzip /​mnt/​user-data/​uploads/​skill-v1.zip -d compare/​v1
unzip /​mnt/​user-data/​uploads/​skill-v2.zip -d compare/​v2

# Initialize git in each
cd compare/​v1 && git init && git add . && git commit -m "Version 1"
cd ../​v2 && git init && git add . && git commit -m "Version 2"

# Compare
cd ../​v1
git diff --no-index . ../​v2

Or use diff directly without git:

diff -ur compare/​v1 compare/​v2

When Packaging Skills

Before zipping, verify clean state:

cd /​home/​claude/​skill-name
git status  # Should show no uncommitted changes
git log --oneline  # Review history

# Package (excludes .git automatically with -x)
cd /​home/​claude
zip -r /​mnt/​user-data/​outputs/​skill-name.zip skill-name/ -x "*.git*"

Workflow Integration

During skill creation:

  1. Run init_skill.sh
  2. Immediately: git init && git add . && git commit -m "Initial structure"
  3. Edit SKILL.md
  4. Commit: git add . && git commit -m "Add: core documentation"
  5. Continue editing → commit after each major change

During skill editing:

  1. Make change with str_replace or bash
  2. Test if needed
  3. Commit: git add <file> && git commit -m "Fix: corrected example"
  4. Repeat

Before delivery:

  1. Review history: git log --oneline
  2. Verify clean: git status
  3. Package with -x to exclude .git

Configuration

Set git identity once per session to avoid prompts:

git config --global user.name "Claude"
git config --global user.email "[email protected]"

Common Issues

"not a git repository" → Run git init first

"nothing to commit"
→ No changes made, or forgot git add

Commit message editor opens → Always use -m "message" with commit

Best Practices

Commit after each logical change, not every keystroke. Use descriptive commit messages in present tense. Create branches for experimental changes. Use git log --oneline frequently to track progress.

Limitations

Git repos in /​home/​claude reset between sessions. Version control only persists within a single development session. Network restrictions prevent push/​pull to remote repos.

More skills from mattnigh

spring-framework-patterns logo
mattnigh/skills_collection

spring-framework-patterns

Comprehensive Spring Framework and Spring Boot best practices including dependency injection patterns, bean lifecycle and scopes, REST API development, Spring Data JPA, service layer design, Spring Security, testing strategies, caching, AOP, async processing, error handling, and common anti-patte...

24 0
View

TypeScript厳格モードによる型安全性設計を専門とするスキル。 📖 参照書籍: - 『Effective TypeScript』(Dan Vanderkam): 型設計 📚 リソース参照: - `resources/Level1_basics.md`: レベル1の基礎ガイド - `resources/Level2_intermediate.md`: レベル2の実務ガイド - `resources/Level3_advanced.md`: レベル3の応用ガイド - `resources/Level4_expert.md`: レベル4の専門ガイド - `resources/di...

24 0
View
deploying-cloud-k8s logo
mattnigh/skills_collection

deploying-cloud-k8s

Deploys applications to cloud Kubernetes (AKS/GKE/DOKS) with CI/CD pipelines. Use when deploying to production, setting up GitHub Actions, troubleshooting deployments. Covers build-time vs runtime vars, architecture matching, and battle-tested debugging.

24 0
View
moai-alfred-agent-guide logo
mattnigh/skills_collection

moai-alfred-agent-guide

19-agent team structure, decision trees for agent selection, Haiku vs Sonnet model selection, and agent collaboration principles. Use when deciding which sub-agent to invoke, understanding team responsibilities, or learning multi-agent orchestration.

24 0
View
mermaid-diagram-generator logo
mattnigh/skills_collection

mermaid-diagram-generator

Converts architecture descriptions, module specs, or workflow docs into Mermaid diagrams. Use when visualizing brick module relationships, workflows (DDD, investigation), or system architecture. Supports: flowcharts, sequence diagrams, class diagrams, state machines, entity relationship diagrams,...

24 0
View
pre-flight-check logo
mattnigh/skills_collection

pre-flight-check

INVOKE FIRST before any code work. Validates git workflow (branch, issue, worklog) and checks approach. Use at START of every task and END before completing. Prevents skipped steps.

24 0
View
browser-dev-tools logo
mattnigh/skills_collection

browser-dev-tools

This skill should be used when working with browser-rendered artifacts (i.e. Bun, React/React Native) to proactively validate that development work on localhost is being built appropriately and to support debugging browser-rendered content. Use this skill after making frontend changes to verify t...

24 0
View
lead-dev logo
mattnigh/skills_collection

lead-dev

Lead Développeur - Coordination technique opérationnelle, code review, mentoring et livraison. Pair de web-dev-process au niveau OPÉRATIONS.

24 0
View
worker-monitor logo
mattnigh/skills_collection

worker-monitor

Monitor Docker workers, RQ queue health, and auto-scale workers (max 4). Use when: checking job progress, monitoring queue depth, scaling workers up/down, diagnosing slow processing, or waiting for jobs to complete. Referenced by data-quality skill during reprocessing.

24 0
View
quality-advisor logo
mattnigh/skills_collection

quality-advisor

Proactive quality guidance system that monitors artifact creation and provides real-time feedback on documentation quality

24 0
View
bump-version logo
mattnigh/skills_collection

bump-version

This skill should be used when the user wants to bump the version number in the workspace. It updates versions across all pyproject.toml files (root, tde, and tda packages) and the CHANGELOG.md to keep them synchronized.

24 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View