⏪ Version Control Skill

SkillDev tools

Natural-language undo, rollback, and checkpoints that hide git entirely — "ย้อนกลับ", "undo", "ไม่เอาแล้ว", "เอาอันเดิมคืน" map to safe git stash/revert/checkpoint operations with cleanup and dev-server restart, reported in plain language. Use when the user wants to undo changes, restore a previous state, or save a safe checkpoint.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the ⏪ Version Control Skill skill

What this skill tells your AI

The instructions your AI receives, as published by wasintoh/toh-framework in src/skills/version-control/SKILL.md and read by ahel’s review.

Purpose: Easy undo/rollback without knowing git Version: 1.0.0 Author: Toh Framework Team

Overview

This skill enables users to undo changes easily using natural language, without needing to understand git commands or version control concepts.

Core Principle

User says: "ย้อนกลับ" or "undo"
AI does: git stash/revert + cleanup + restart dev
User sees: "เรียบร้อยครับ กลับไปก่อนแก้ไขล่าสุดแล้ว"

HIDE GIT COMPLEXITY - User just says what they want.


Trigger Words

Undo/Rollback

User SaysAI Understands
ย้อนกลับUndo last change
undoUndo last change
เอาอันเดิมคืนRevert to previous
ไม่เอาแล้วDiscard current changes
กลับไปก่อนหน้าGo back to previous state
ยกเลิกที่ทำไปCancel what was done
rollbackRevert changes

Checkpoint/Save

User SaysAI Understands
save ไว้ก่อนCreate checkpoint
checkpointCreate savepoint
เซฟไว้Save current state
บันทึกจุดนี้Mark this point

Auto-Checkpoint System

AI automatically creates checkpoints at key moments:

Auto-Checkpoint Triggers

EventCheckpoint Name
After /toh-vibevibe-[project-name]-initial
After /toh-ui completionui-[component-name]-done
After /toh-dev completiondev-[feature-name]-done
After /toh-connectconnect-supabase-done
Before major changespre-[action]-backup

Checkpoint Storage

.toh/checkpoints/
├── checkpoint-log.json     # List of all checkpoints
└── (git handles actual data)

checkpoint-log.json:

{
  "checkpoints": [
    {
      "id": "cp-001",
      "name": "vibe-coffee-shop-initial",
      "timestamp": "2024-12-03T10:30:00Z",
      "description": "หลังสร้างโปรเจคร้านกาแฟ",
      "gitRef": "abc123"
    },
    {
      "id": "cp-002",
      "name": "ui-dashboard-done",
      "timestamp": "2024-12-03T11:00:00Z",
      "description": "หลังสร้าง Dashboard UI",
      "gitRef": "def456"
    }
  ]
}

Undo Operations

Quick Undo (Last Change)

User: "ย้อนกลับ"

AI Process:
1. git stash or git checkout -- .
2. Restart dev server if needed
3. Confirm to user

AI Response:
"⏪ ย้อนกลับแล้วครับ!
กลับไปก่อนที่จะ [last action] แล้ว

💡 ถ้าต้องการ:
- ดูประวัติการแก้ไข พิมพ์ 'ดูประวัติ'
- ย้อนกลับไปจุดที่ save ไว้ พิมพ์ 'กลับไป [ชื่อ checkpoint]'"

Rollback to Checkpoint

User: "กลับไปก่อนแก้ไข dashboard"

AI Process:
1. Find checkpoint matching "dashboard"
2. git checkout [checkpoint-ref]
3. Restart dev server
4. Confirm to user

AI Response:
"⏪ กลับไป checkpoint 'ui-dashboard-done' แล้วครับ!
(บันทึกเมื่อ 2 ชั่วโมงก่อน)

สถานะปัจจุบัน:
- ✅ Dashboard UI เสร็จแล้ว
- ❌ การแก้ไขหลังจากนั้นถูกยกเลิก

ทำต่อได้เลยครับ!"

View History

User: "ดูประวัติ"

AI Response:
"📜 ประวัติการทำงาน:

1. 🕐 10:30 - สร้างโปรเจคร้านกาแฟ ✅
2. 🕐 11:00 - สร้าง Dashboard UI ✅
3. 🕐 11:30 - เพิ่ม POS logic ✅
4. 🕐 12:00 - ปรับ design → (ปัจจุบัน)

พิมพ์ 'กลับไป [เลข]' เพื่อย้อนกลับ
เช่น 'กลับไป 2' จะกลับไปหลังสร้าง Dashboard"

Safety Features

Before Destructive Operations

User: "ลบหน้า dashboard ทิ้ง"

AI: "⚠️ จะลบหน้า Dashboard นะครับ

ไฟล์ที่จะลบ:
- app/dashboard/page.tsx
- components/dashboard/

ยืนยันไหมครับ? (yes/no)
หรือพิมพ์ 'save ก่อน' เพื่อ backup ก่อนลบ"

Auto-Backup Before Risky Changes

AI automatically creates backup before:

  • Deleting files
  • Major refactoring
  • Changing database schema
  • /toh-connect (in case of data loss)

Git Operations Mapping

User Language → Git Commands

User SaysGit Operation
ย้อนกลับgit checkout -- . or git stash
กลับไป checkpointgit checkout [ref]
save ไว้git add . && git commit -m "[auto]"
ดูประวัติgit log --oneline
ดู diffgit diff
ลบทิ้งหมดgit reset --hard HEAD

AI Never Shows

  • Raw git commands
  • Commit hashes (use checkpoint names instead)
  • Merge conflicts (resolve automatically)
  • Git error messages (translate or fix)

Response Templates

Successful Undo

⏪ **ย้อนกลับแล้วครับ!**

กลับไปสถานะ: [checkpoint name]
เมื่อ: [time ago]

📁 ไฟล์ที่กลับคืน:
- [file list]

ทำต่อได้เลยครับ!

Checkpoint Created

💾 **บันทึก checkpoint แล้วครับ!**

ชื่อ: [checkpoint name]
เวลา: [now]

ถ้าต้องการกลับมาจุดนี้ พิมพ์:
"กลับไป [checkpoint name]"

Cannot Undo

⚠️ **ย้อนกลับไม่ได้ครับ**

เหตุผล: [reason in friendly language]

💡 แนะนำ:
- [alternative action]

Integration with Memory

Update .toh/memory/active.md after undo:

## Last Action
Undo to checkpoint: ui-dashboard-done

## Current State
- Dashboard UI complete
- POS logic removed (was undone)

## Available Checkpoints
- vibe-coffee-shop-initial (10:30)
- ui-dashboard-done (11:00) ← current

Best Practices

DO:

  • ✅ Auto-checkpoint at key moments
  • ✅ Use friendly checkpoint names
  • ✅ Confirm before destructive operations
  • ✅ Show what will be undone

DON'T:

  • ❌ Show raw git commands
  • ❌ Show commit hashes to user
  • ❌ Allow undo without confirmation for major changes
  • ❌ Lose user's work without backup

Last Updated: 2024-12-03

Signals

GitHub stars
96
Forks
19
Last commit
Sep 2026

ahel review

  • K4blow
    destructive-scoped

Automated review, not a security audit. Ruleset v1+k2.

Advanced
Catalog kind
skill
Gateway key
version-control-wasintoh
Source
github.com/wasintoh/toh-framework