ποΈ Preview Mode Skill
SkillDev toolsShow-before-commit previews β after completing work, present what changed as a live dev-server URL or a concise plain-language description so the user can confirm or request changes with confidence. Use when delivering visible changes (pages, components, styling) to a running project.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the ποΈ Preview Mode Skill skill
What this skill tells your AI
The instructions your AI receives, as published by wasintoh/toh-framework in src/skills/preview-mode/SKILL.md and read by ahelβs review.
Purpose: Show users what will change before applying Version: 1.0.0 Author: Toh Framework Team
Overview
This skill enables AI to show previews of changes before applying them, giving users confidence in what's being created.
Core Principle
AI completes work
β
Show preview (description + URL if available)
β
User confirms or requests changes
β
Apply changes (or iterate)
SEE BEFORE COMMIT
Preview Types
Type 1: Dev Server Preview (Live)
When dev server is running:
β
**ΰΈͺΰΈ£ΰΉΰΈ²ΰΈ Dashboard ΰΉΰΈͺΰΈ£ΰΉΰΈΰΉΰΈ₯ΰΉΰΈ§!**
ποΈ **Preview:**
π http://localhost:3000/dashboard
πΈ **ΰΈͺΰΈ΄ΰΉΰΈΰΈΰΈ΅ΰΉΰΈͺΰΈ£ΰΉΰΈ²ΰΈ:**
- Header ΰΈΰΈ£ΰΉΰΈΰΈ‘ navigation
- Stats cards (4 ΰΈΰΈ±ΰΈ§)
- Sales chart
- Recent orders table
ΰΉΰΈΰΈ΄ΰΈ URL ΰΈΰΉΰΈ²ΰΈΰΈΰΈΰΉΰΈΰΈ·ΰΉΰΈΰΈΰΈΉ preview ΰΉΰΈΰΉΰΉΰΈ₯ΰΈ’ΰΈΰΈ£ΰΈ±ΰΈ!
π‘ ΰΈΰΉΰΈΰΈΰΈΰΈ²ΰΈ£ΰΉΰΈΰΉΰΉΰΈΰΈΰΈ°ΰΉΰΈ£ΰΉΰΈ«ΰΈ‘ΰΈΰΈ£ΰΈ±ΰΈ?
Type 2: Description Preview (No Server)
When dev server isn't running:
β
**ΰΉΰΈΰΈ£ΰΈ΅ΰΈ’ΰΈ‘ Dashboard ΰΈΰΈ£ΰΉΰΈΰΈ‘ΰΉΰΈ₯ΰΉΰΈ§!**
π **Preview ΰΈͺΰΈ΄ΰΉΰΈΰΈΰΈ΅ΰΉΰΈΰΈ°ΰΈͺΰΈ£ΰΉΰΈ²ΰΈ:**
**Layout:**
βββββββββββββββββββββββββββββββββββββββ
β π΅ Header (Logo + Nav + Profile) β
βββββββββββββββββββββββββββββββββββββββ€
β π Stats Cards (4 columns) β
β βββββ βββββ βββββ βββββ β
β β $ β β π¦β β π₯β β πβ β
β βββββ βββββ βββββ βββββ β
βββββββββββββββββββββββββββββββββββββββ€
β π Sales Chart (Line/Bar) β
β [Chart area] β
βββββββββββββββββββββββββββββββββββββββ€
β π Recent Orders Table β
β ID | Customer | Amount | Status β
βββββββββββββββββββββββββββββββββββββββ
**Components:**
- StatsCard.tsx (reusable)
- SalesChart.tsx (with Recharts)
- OrdersTable.tsx (with pagination)
ΰΈͺΰΈ£ΰΉΰΈ²ΰΈΰΉΰΈ₯ΰΈ’ΰΉΰΈ«ΰΈ‘ΰΈΰΈ£ΰΈ±ΰΈ? ΰΈ«ΰΈ£ΰΈ·ΰΈΰΈΰΉΰΈΰΈΰΈΰΈ²ΰΈ£ΰΈΰΈ£ΰΈ±ΰΈΰΈΰΈ°ΰΉΰΈ£ΰΈΰΉΰΈΰΈ?
Type 3: Before/After Preview (Modifications)
When modifying existing code:
π **Preview ΰΈΰΈ²ΰΈ£ΰΉΰΈΰΈ₯ΰΈ΅ΰΉΰΈ’ΰΈΰΉΰΈΰΈ₯ΰΈ:**
**Before:**
```tsx
<Button>Submit</Button>
After:
<Button
onClick={handleSubmit}
disabled={isLoading}
>
{isLoading ? <Spinner /> : 'Submit'}
</Button>
Changes:
- β ΰΉΰΈΰΈ΄ΰΉΰΈ‘ onClick handler
- β ΰΉΰΈΰΈ΄ΰΉΰΈ‘ loading state
- β ΰΉΰΈΰΈ΄ΰΉΰΈ‘ Spinner component
Apply ΰΈΰΈ²ΰΈ£ΰΉΰΈΰΈ₯ΰΈ΅ΰΉΰΈ’ΰΈΰΉΰΈΰΈ₯ΰΈΰΈΰΈ΅ΰΉΰΉΰΈ«ΰΈ‘ΰΈΰΈ£ΰΈ±ΰΈ?
---
## Auto Dev Server Detection
AI should detect if dev server is running:
```javascript
// Check if localhost:3000 is accessible
// If yes β Provide live URL
// If no β Provide description preview
With Dev Server
ποΈ **Live Preview ΰΈΰΈ£ΰΉΰΈΰΈ‘ΰΉΰΈ₯ΰΉΰΈ§:**
π http://localhost:3000/[path]
(ΰΉΰΈΰΈ΄ΰΈΰΈΰΈΉΰΉΰΈΰΉΰΉΰΈ₯ΰΈ’ΰΈΰΈ£ΰΈ±ΰΈ!)
Without Dev Server
π‘ **ΰΉΰΈΰΈ΄ΰΈ preview ΰΉΰΈΰΉΰΉΰΈΰΈ’:**
```bash
npm run dev
ΰΉΰΈ₯ΰΉΰΈ§ΰΉΰΈΰΈΰΈ΅ΰΉ http://localhost:3000/[path]
---
## Preview Confirmation Flow
### Standard Flow
- AI creates/modifies files
- AI shows preview
- User reviews
- Options:
- "OK" / "ΰΉΰΈΰΉΰΉΰΈ₯ΰΈ’" β Continue
- "ΰΉΰΈΰΉΰΉΰΈ [detail]" β AI modifies
- "ΰΈ’ΰΈΰΉΰΈ₯ΰΈ΄ΰΈ" β AI reverts
### Quick Flow (For Simple Changes)
- AI shows preview inline
- Applies immediately
- User can undo if needed
---
## Preview Templates by Task Type
### New Page Preview
```markdown
π **New Page: /dashboard**
**Layout:**
[ASCII art layout]
**Features:**
- [Feature list]
**Components Used:**
- [Component list]
**Files to Create:**
- app/dashboard/page.tsx
- components/dashboard/StatsCard.tsx
- components/dashboard/SalesChart.tsx
ΰΈͺΰΈ£ΰΉΰΈ²ΰΈΰΉΰΈ₯ΰΈ’ΰΉΰΈ«ΰΈ‘ΰΈΰΈ£ΰΈ±ΰΈ?
New Component Preview
π§© **New Component: ProductCard**
**Preview:**
βββββββββββββββββββ
β [Image] β
β Product Name β
β ΰΈΏ199 β
β [Add to Cart] β
βββββββββββββββββββ
**Props:**
- product: Product
- onAddToCart: () => void
**Features:**
- Responsive
- Hover effect
- Loading state
ΰΈͺΰΈ£ΰΉΰΈ²ΰΈΰΉΰΈ₯ΰΈ’ΰΉΰΈ«ΰΈ‘ΰΈΰΈ£ΰΈ±ΰΈ?
Design Change Preview
β¨ **Design Changes:**
**Color Palette:**
- Primary: #3B82F6 β #2563EB (darker)
- Background: #F9FAFB β #F3F4F6 (warmer)
**Typography:**
- Headings: font-semibold β font-bold
- Body: text-gray-600 β text-gray-700
**Spacing:**
- Cards: p-4 β p-6 (more breathing room)
- Sections: gap-4 β gap-6
**Before/After:**
[Side by side comparison if possible]
Apply changes ΰΉΰΈ«ΰΈ‘ΰΈΰΈ£ΰΈ±ΰΈ?
Logic Change Preview
βοΈ **Logic Changes: handleSubmit**
**What changes:**
1. Add validation before submit
2. Add loading state
3. Add success/error toast
4. Clear form on success
**Flow:**
User clicks Submit β Validate form (Zod) β Show loading state β Call API β Success? β Show toast + Clear form Error? β Show error message
Apply changes ΰΉΰΈ«ΰΈ‘ΰΈΰΈ£ΰΈ±ΰΈ?
Multi-File Change Preview
When changes span multiple files:
π **Files to Change:**
**Create:**
- components/checkout/PaymentForm.tsx
- lib/stripe.ts
- app/api/checkout/route.ts
**Modify:**
- app/cart/page.tsx (add checkout button)
- types/index.ts (add PaymentIntent type)
**Total:** 3 new files, 2 modified
ΰΈΰΈΉ diff ΰΉΰΈΰΉΰΈ₯ΰΈ°ΰΉΰΈΰΈ₯ΰΉΰΉΰΈ«ΰΈ‘ΰΈΰΈ£ΰΈ±ΰΈ? ΰΈ«ΰΈ£ΰΈ·ΰΈ apply ΰΉΰΈ₯ΰΈ’?
Preview for Destructive Actions
Extra confirmation for risky operations:
β οΈ **Warning: Destructive Action**
**ΰΈΰΈ°ΰΈ₯ΰΈ:**
- app/old-dashboard/ (3 files)
- components/old-chart/ (2 files)
**Total:** 5 files ΰΈΰΈ°ΰΈΰΈΉΰΈΰΈ₯ΰΈ
β‘ ΰΈΰΉΰΈΰΈΰΈ₯ΰΈ:
- [x] ΰΈͺΰΈ£ΰΉΰΈ²ΰΈ backup checkpoint ΰΉΰΈ₯ΰΉΰΈ§
- [x] ΰΉΰΈΰΈ₯ΰΉΰΉΰΈ«ΰΈ‘ΰΉΰΈΰΈ£ΰΉΰΈΰΈ‘ΰΉΰΈΰΉΰΉΰΈΰΈΰΉΰΈ₯ΰΉΰΈ§
ΰΈΰΈ΄ΰΈ‘ΰΈΰΉ 'confirm' ΰΉΰΈΰΈ·ΰΉΰΈΰΈ’ΰΈ·ΰΈΰΈ’ΰΈ±ΰΈΰΈΰΈ²ΰΈ£ΰΈ₯ΰΈ
ΰΈ«ΰΈ£ΰΈ·ΰΈ 'cancel' ΰΉΰΈΰΈ·ΰΉΰΈΰΈ’ΰΈΰΉΰΈ₯ΰΈ΄ΰΈ
Preview Settings
User can configure preview behavior:
/toh-settings preview
**Preview Mode:**
- [x] Always show preview (default)
- [ ] Quick mode (apply without preview)
- [ ] Ask each time
**Preview Detail:**
- [ ] Minimal (layout only)
- [x] Normal (layout + components)
- [ ] Verbose (everything)
Integration with Other Skills
| Skill | Integration |
|---|---|
| Version Control | Auto-checkpoint before apply |
| Error Handling | Preview potential issues |
| Smart Suggestions | Suggest improvements in preview |
| Progress Tracking | Show progress after apply |
Best Practices
DO:
- β Always show preview for major changes
- β Provide live URL when possible
- β Use ASCII art for layout preview
- β List all files that will change
- β Highlight breaking changes
DON'T:
- β Skip preview for destructive actions
- β Show too much technical detail
- β Assume user wants to proceed
- β Apply without any confirmation for major changes
ASCII Art Templates
Dashboard Layout
βββββββββββββββββββββββββββββββββββββββββββ
β Header β
βββββββββββ¬ββββββββββββββββββββββββββββββββ€
β Sidebar β Main Content β
β β β
β Nav β Cards / Charts / Tables β
β Items β β
β β β
βββββββββββ΄ββββββββββββββββββββββββββββββββ
Card Grid
βββββββββ βββββββββ βββββββββ
β Card β β Card β β Card β
β 1 β β 2 β β 3 β
βββββββββ βββββββββ βββββββββ
Form Layout
βββββββββββββββββββββββββββββββ
β Form Title β
βββββββββββββββββββββββββββββββ€
β Label [Input ] β
β Label [Input ] β
β Label [Textarea ] β
β [ ] β
βββββββββββββββββββββββββββββββ€
β [Cancel] [Submit] β
βββββββββββββββββββββββββββββββ
Table Layout
ββββββ¬βββββββββββ¬βββββββββ¬βββββββββ
β ID β Name β Amount β Status β
ββββββΌβββββββββββΌβββββββββΌβββββββββ€
β 1 β Item 1 β ΰΈΏ100 β β
β
β 2 β Item 2 β ΰΈΏ200 β β³ β
ββββββ΄βββββββββββ΄βββββββββ΄βββββββββ
Last Updated: 2024-12-03
Signals
- GitHub stars
- 96
- Forks
- 19
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
preview-mode- Source
- github.com/wasintoh/toh-framework