From klair-legacy
Use when user wants to explore multiple implementation approaches for a feature by creating parallel Claude Code sessions. Triggers on phrases like "competitive prototyping", "prototype in parallel", "compare implementations", "try different approaches", or "race implementations".
npx claudepluginhub ai-builder-team/ai-builder-plugin-marketplace --plugin klair-legacyThis skill uses the workspace's default tool permissions.
This skill helps users explore multiple implementation strategies for a single feature by spawning parallel Claude Code sessions in Warp terminal. Each session runs in a separate clone of the repository, allowing Claude instances to work independently without file conflicts.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
This skill helps users explore multiple implementation strategies for a single feature by spawning parallel Claude Code sessions in Warp terminal. Each session runs in a separate clone of the repository, allowing Claude instances to work independently without file conflicts.
Activate this skill when the user:
Do NOT ask extensive clarifying questions at this stage.
Format the task description to be sent to both Claude instances. Keep it concise and focused:
# Task: [Feature Name]
[Concise description of what needs to be built - 1-3 paragraphs maximum]
## Key Requirements
- [Requirement 1]
- [Requirement 2]
- [Requirement 3]
## Technical Context
[Any relevant technical details, constraints, or codebase context]
---
run in plan mode. Read all the relevant code to understand the task better, before asking any clarifying questions. Think hard about the best approach to implement. Share approach before you start implementing
CRITICAL: The message MUST end with: "run in plan mode. Read all the relevant code to understand the task better, before asking any clarifying questions. Think hard about the best approach to implement. Share approach before you start implementing"
CRITICAL: Use the clipboard-based approach to avoid AppleScript escaping issues with special characters, quotes, newlines, and markdown.
Workflow:
spawn-variants.sh template file from the skill directory/tmp/competitive-prototyping.sh using Bash heredoc (NOT Write tool){{FEATURE_NAME}} with the sanitized feature name{{TASK_DESC}} with the full task descriptionWhy clipboard approach?
keystroke commandsStep 1: Copy the template to /tmp using Bash (NOT Write tool):
# Read the spawn-variants.sh template and copy to /tmp
cat .claude/skills/competitive-prototyping/spawn-variants.sh > /tmp/competitive-prototyping.sh
chmod +x /tmp/competitive-prototyping.sh
Step 2: Replace the placeholders using Edit tool (TWO replacements required):
# Step 2a: Extract and sanitize feature name from task description first line
# Take first line after "# Task:", remove markdown, sanitize, lowercase, limit to 50 chars
# Example: "# Task: BU Retention Metrics Trend Chart" -> "bu-retention-metrics-trend-chart"
# Step 2b: Replace {{FEATURE_NAME}} placeholder with sanitized feature name
Edit(
file_path="/tmp/competitive-prototyping.sh",
old_string="{{FEATURE_NAME}}",
new_string="bu-retention-metrics-trend-chart" # Your sanitized feature name
)
# Step 2c: Replace {{TASK_DESC}} placeholder with full task description
Edit(
file_path="/tmp/competitive-prototyping.sh",
old_string="{{TASK_DESC}}",
new_string="[Your formatted task description here - can contain newlines, quotes, markdown, special chars]"
)
IMPORTANT: Replace {{FEATURE_NAME}} FIRST, then {{TASK_DESC}}. Do NOT use replace_all: true for either replacement!
Step 3: Execute the script:
/tmp/competitive-prototyping.sh
What the script does (worktree-based approach):
create.sh twice to create tree1 and tree2 with services/tmp/variant_task.txtResult: 4 Warp tabs
How the script works (clipboard-based approach):
/tmp/variant_task.txt (avoids escaping issues)cd $TREE1 && claude)pbcopykeystroke "v" using command downKey timing requirements:
Template structure (already in spawn-variants.sh):
# Task written to temp file (handles all special characters)
cat > /tmp/variant_task.txt << 'TASKEOF'
{{TASK_DESC}}
---
run in plan mode. Read all the relevant code to understand the task better, before asking any clarifying questions. Think hard about the best approach to implement. Share approach before you start implementing
TASKEOF
# For each variant:
# 1. Open Warp tab, navigate to worktree, start Claude
osascript <<APPLESCRIPT
tell application "Warp"
activate
delay 1
tell application "System Events"
keystroke "t" using command down
delay 1
keystroke "cd $TREE1 && claude"
delay 0.5
key code 36
delay 4 # Wait for Claude initialization
end tell
end tell
APPLESCRIPT
# 2. Copy task to clipboard and paste
echo "VARIANT A (tree1):
$(cat /tmp/variant_task.txt)" | pbcopy
osascript <<'APPLESCRIPT'
tell application "Warp"
activate
tell application "System Events"
keystroke "v" using command down # Paste!
delay 0.5
key code 36 # Submit
end tell
end tell
APPLESCRIPT
After executing the script, inform the user about:
What just happened:
What happens next:
User's next steps:
Cleanup:
/tmp/variant_task.txtgit worktree remove trees/tree1 (or tree2)IMPORTANT: The entire process is fully automated. The user should NOT need to manually type or paste anything.
claude command available)The skill creates worktrees automatically:
/path/to/project/
├── .git/ # Shared git directory (~66% disk space savings!)
├── trees/
│ ├── tree1/ # Auto-created with branch tree1-<feature>
│ └── tree2/ # Auto-created with branch tree2-<feature>
└── [main worktree files]
No manual setup required - the skill handles everything!
git worktree remove trees/tree1User: "I want to build a user authentication feature with JWT tokens and refresh token rotation. Let's do competitive prototyping."
Claude Response:
Worktree creation fails:
git statusgit --version (need 2.5+)Services not starting:
pnpm --versionuv --versionSessions not opening:
Claude not starting:
claude command in terminal manuallyToo many tabs open:
Messages not sent to Claude sessions:
echo "test" | pbcopy && pbpastePlan mode not working:
AppleScript escaping issues (SHOULD NOT HAPPEN with v1.2):
keystroke "text" with embedded variables - always use clipboard!Task description has errors when displayed:
{{TASK_DESC}} with actual content using Edit toolBoth variants doing the same thing:
Worktree already exists error:
.claude/scripts/create-worktrees/cleanup.sh --auto tree1,tree2git worktree remove trees/tree1 --force (and tree2)Timing issues:
Write tool errors when creating script:
cat > file << EOF) instead of Write tool for /tmp filesPlaceholder replacement errors / Script syntax errors:
{{FEATURE_NAME}} and {{TASK_DESC}}{{FEATURE_NAME}} FIRST with sanitized feature name{{TASK_DESC}} SECOND with full task descriptionreplace_all: true - it will replace both placeholders with the same content!