vhs
Charmbracelet VHS Best Practices
Comprehensive best practices guide for VHS terminal recordings, maintained by Charmbracelet. Contains 47 rules across 8 categories, prioritized by impact to guide creation of professional, portable, and optimized terminal demos.
When to Apply
Reference these guidelines when:
- Writing new VHS tape files
- Creating terminal demos for documentation
- Setting up CI/CD for automated GIF generation
- Optimizing recording file size and quality
- Troubleshooting tape file issues
- Reviewing tape files for best practices
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Configuration Structure | CRITICAL | config- |
| 2 | Dependency Management | CRITICAL | deps- |
| 3 | Command Syntax | HIGH | cmd- |
| 4 | Timing & Synchronization | HIGH | timing- |
| 5 | Output Optimization | MEDIUM-HIGH | output- |
| 6 | Visual Quality | MEDIUM | visual- |
| 7 | CI/Automation | MEDIUM | ci- |
| 8 | Advanced Patterns | LOW | advanced- |
Quick Reference
1. Configuration Structure (CRITICAL)
config-settings-order- Place all settings before commandsconfig-output-first- Declare output at file startconfig-shell-explicit- Explicitly set shell typeconfig-typing-speed-global- Set global TypingSpeed earlyconfig-dimensions-explicit- Set explicit terminal dimensionsconfig-comments-document- Use comments to document tape structure
2. Dependency Management (CRITICAL)
deps-require-early- Use Require for dependency validationdeps-require-order- Place Require before settingsdeps-require-all- Require all external commandsdeps-system-requirements- Verify system dependencies
3. Command Syntax (HIGH)
cmd-type-syntax- Use correct Type command syntaxcmd-enter-explicit- Always follow Type with Entercmd-key-repeat- Use key repeat countscmd-ctrl-combinations- Use Ctrl combinations for terminal controlcmd-hide-show- Use Hide/Show for sensitive operationscmd-env-variables- Use Env for environment variablescmd-screenshot- Use Screenshot for static capturescmd-multiline-type- Handle multiline commands properly
4. Timing & Synchronization (HIGH)
timing-sleep-after-enter- Add Sleep after commands for outputtiming-wait-pattern- Use Wait for dynamic command completiontiming-type-speed-override- Override TypingSpeed for emphasistiming-sleep-units- Use explicit time unitstiming-final-sleep- End recordings with final Sleeptiming-natural-pauses- Add natural pauses between actionstiming-wait-timeout- Set appropriate Wait timeoutstiming-playback-speed- Use PlaybackSpeed for final adjustments
5. Output Optimization (MEDIUM-HIGH)
output-format-selection- Choose output format based on use caseoutput-framerate- Optimize framerate for file sizeoutput-dimensions-optimize- Right-size terminal dimensionsoutput-loop-offset- Use LoopOffset for seamless loopsoutput-multiple-formats- Generate multiple output formatsoutput-relative-paths- Use relative paths for portability
6. Visual Quality (MEDIUM)
visual-font-readable- Choose readable font settingsvisual-theme-selection- Select appropriate themevisual-window-decoration- Add window decorations for polishvisual-spacing- Adjust letter and line spacingvisual-padding-margin- Use padding and margins effectivelyvisual-cursor-visibility- Ensure cursor visibility
7. CI/Automation (MEDIUM)
ci-github-action- Use official VHS GitHub Actionci-auto-commit- Auto-commit generated assetsci-golden-files- Use golden files for integration testingci-matrix-builds- Generate platform-specific demosci-caching- Cache VHS dependencies in CI
8. Advanced Patterns (LOW)
advanced-source-include- Use Source for reusable tape componentsadvanced-clipboard- Use Copy and Paste for complex inputadvanced-recording-live- Record live sessions then editadvanced-server-mode- Use server mode for remote access
How to Use
Read individual reference files for detailed explanations and code examples:
- Section definitions - Category structure and impact levels
- Rule template - Template for adding new rules
Reference Files
| File | Description |
|---|---|
| AGENTS.md | Complete compiled guide with all rules |
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
More from pproenca/dot-skills
zod
Zod schema validation best practices for type safety, parsing, and error handling. This skill should be used when defining z.object schemas, using z.string validations, safeParse, or z.infer. This skill does NOT cover React Hook Form integration patterns (use react-hook-form skill) or OpenAPI client generation (use orval skill).
2.0Kvitest
Vitest testing framework patterns for test setup, async testing, mocking with vi.*, snapshots, and test performance (formerly test-vitest). This skill should be used when writing or debugging Vitest tests. This skill does NOT cover TDD methodology (use test-tdd skill), API mocking with MSW (use test-msw skill), or Jest-specific APIs.
907react-hook-form
React Hook Form performance optimization for client-side form validation using useForm, useWatch, useController, and useFieldArray. This skill should be used when building client-side controlled forms with React Hook Form library. This skill does NOT cover React 19 Server Actions, useActionState, or server-side form handling (use react-19 skill for those).
668expo-react-native-performance
Expo React Native performance optimization guidelines. This skill should be used when writing, reviewing, or refactoring Expo React Native code to ensure optimal performance patterns. Triggers on tasks involving React Native components, lists, animations, images, or performance improvements.
589wxt-browser-extensions
WXT browser extension performance optimization guidelines. This skill should be used when writing, reviewing, or refactoring WXT browser extension code to ensure optimal performance patterns. Triggers on tasks involving WXT, browser extensions, content scripts, service workers, messaging, and extension APIs.
484shadcn
shadcn/ui component library best practices and patterns (formerly shadcn-ui). This skill should be used when writing, reviewing, or refactoring shadcn/ui components to ensure proper architecture, accessibility, and performance. Triggers on tasks involving Radix primitives, Tailwind styling, form validation with React Hook Form, data tables, theming, or component composition patterns.
477