gentleman-trainer
Vim Trainer RPG system patterns for Gentleman.Dots. Trigger: When editing files in installer/internal/tui/trainer/, adding exercises, modules, or game mechanics.
Install
mkdir -p .claude/skills/gentleman-trainer && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2732" && unzip -o skill.zip -d .claude/skills/gentleman-trainer && rm skill.zipInstalls to .claude/skills/gentleman-trainer
About this skill
When to Use
Use this skill when:
- Adding new Vim training modules
- Creating exercises or boss fights
- Modifying progression/unlock system
- Working on the Vim command simulator
- Adding practice mode features
Critical Patterns
Pattern 1: ModuleID Constants
All modules MUST be defined as ModuleID constants in types.go:
type ModuleID string
const (
ModuleHorizontal ModuleID = "horizontal"
ModuleVertical ModuleID = "vertical"
ModuleTextObjects ModuleID = "textobjects"
ModuleChangeRepeat ModuleID = "cgn"
ModuleSubstitution ModuleID = "substitution"
ModuleRegex ModuleID = "regex"
ModuleMacros ModuleID = "macros"
// Add new modules here
)
Pattern 2: Exercise Structure
Every exercise follows this structure:
type Exercise struct {
ID string // "horizontal_001"
Module ModuleID // Parent module
Level int // 1-10 difficulty
Type ExerciseType // lesson, practice, boss
Code []string // Lines of code shown
CursorPos Position // Initial cursor
CursorTarget *Position // Target position (movement exercises)
Mission string // What user must do
Solutions []string // ALL valid solutions
Optimal string // Best/shortest solution
Hint string // Help text
Explanation string // Post-answer teaching
TimeoutSecs int // Before showing solution
Points int // Base score
}
Pattern 3: Module Unlock Order
Modules unlock sequentially - user must defeat boss to unlock next:
var moduleUnlockOrder = []ModuleID{
ModuleHorizontal, // Always unlocked
ModuleVertical, // After horizontal boss
ModuleTextObjects, // After vertical boss
ModuleChangeRepeat, // After textobjects boss
// ... etc
}
Pattern 4: Progression Flow
Lessons (sequential) → Practice (80% accuracy) → Boss Fight → Next Module
Decision Tree
Adding new module?
├── Add ModuleID constant in types.go
├── Add to moduleUnlockOrder slice
├── Add ModuleInfo in GetAllModules()
├── Create exercises_{module}.go file
├── Implement GetLessons(moduleID)
├── Implement GetBoss(moduleID)
└── Add practice exercises
Adding exercises?
├── Create Exercise with unique ID format: "{module}_{number}"
├── Provide multiple Solutions (all valid answers)
├── Set Optimal to shortest/best solution
├── Include Hint for learning
└── Add Explanation for post-answer
Adding boss fight?
├── Create BossExercise in exercises_{module}.go
├── Add 5-7 BossSteps (exercise chain)
├── Set Lives (usually 3)
├── Include variety of module skills
└── Return from GetBoss(moduleID)
Code Examples
Example 1: Creating a Module's Exercises File
// exercises_newmodule.go
package trainer
// NewModule lessons
func getNewModuleLessons() []Exercise {
return []Exercise{
{
ID: "newmodule_001",
Module: ModuleNewModule,
Level: 1,
Type: ExerciseLesson,
Code: []string{"function example() {", " return true;", "}"},
CursorPos: Position{Line: 0, Col: 0},
Mission: "Use 'xx' to delete two characters",
Solutions: []string{"xx", "2x", "dl dl"},
Optimal: "xx",
Hint: "x deletes character under cursor",
Explanation: "x is Vim's character delete. 2x or xx deletes two.",
Points: 10,
},
// ... more exercises
}
}
Example 2: Registering Module in GetAllModules
func GetAllModules() []ModuleInfo {
return []ModuleInfo{
// ... existing modules
{
ID: ModuleNewModule,
Name: "New Module",
Icon: "🆕",
Description: "Commands: xx, yy, zz",
BossName: "The New Boss",
},
}
}
Example 3: Boss Fight Structure
func getNewModuleBoss() *BossExercise {
return &BossExercise{
ID: "newmodule_boss",
Module: ModuleNewModule,
Name: "The New Boss",
Lives: 3,
Steps: []BossStep{
{
Exercise: Exercise{
ID: "newmodule_boss_1",
Module: ModuleNewModule,
Code: []string{"challenge code here"},
CursorPos: Position{Line: 0, Col: 0},
Mission: "First boss challenge",
Solutions: []string{"w", "W"},
Optimal: "w",
},
TimeLimit: 10,
},
// ... more steps (5-7 total)
},
}
}
Example 4: Exercise Validation
// Validation checks if answer is in Solutions
func ValidateAnswer(exercise *Exercise, answer string) bool {
answer = strings.TrimSpace(answer)
for _, solution := range exercise.Solutions {
if answer == solution {
return true
}
}
// Also check via simulator for creative solutions
return validateViaSimulator(exercise, answer)
}
Exercise Guidelines
Good Exercise Design
- Clear Mission: User knows exactly what to do
- Multiple Solutions: Accept all valid Vim ways
- Optimal Marked: Teach the best approach
- Progressive Difficulty: Level 1-10 within module
- Real Code: Use realistic code snippets
Solutions Array Rules
// GOOD: Accept all valid variations
Solutions: []string{"w", "W", "e", "E", "f "},
// BAD: Only accept one way
Solutions: []string{"w"},
Exercise ID Format
{module}_{number} → "horizontal_001"
{module}_boss_{step} → "horizontal_boss_1"
Commands
cd installer && go test ./internal/tui/trainer/... # Run all trainer tests
cd installer && go test -run TestExercise # Test exercises
cd installer && go test -run TestSimulator # Test Vim simulator
cd installer && go test -run TestProgression # Test unlock system
Resources
- Types: See
installer/internal/tui/trainer/types.gofor data structures - Exercises: See
installer/internal/tui/trainer/exercises_*.gofor patterns - Simulator: See
installer/internal/tui/trainer/simulator.gofor Vim emulation - Validation: See
installer/internal/tui/trainer/validation.gofor answer checking - Stats: See
installer/internal/tui/trainer/stats.gofor persistence
More by Gentleman-Programming
View all →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
rust-coding-skill
UtakataKyosui
Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.