agent-browser-automati…
Automate browser interactions for development testing using Puppeteer MCP
Intelligent prototyping orchestrator with technology detection, rapid scaffolding, and validation automation
How it fires
How this command gets triggered: by you, by Claude, or both.
/prototypeContext preview
What this command does when you run it.
Intelligent prototyping orchestrator with technology detection, rapid scaffolding, and validation automation
allowed-tools: Task, Write, Edit, MultiEdit, Bash(mkdir:*), Bash(cd:*), Bash(deno:*), Bash(cargo:*), Bash(go:*), Bash(npm:*), Bash(fd:*), Bash(rg:*), Bash(gdate:*), Bash(jq:*), Bash(git:*) name: "Prototype" description: "Intelligent prototyping orchestrator with technology detection, rapid scaffolding, and validation automation" author: "wcygan" tags: ["workflow","create"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
STEP 1: Initialize intelligent prototyping session with technology detection
# Initialize prototyping session state
echo '{
"sessionId": "'$SESSION_ID'",
"prototypeTarget": "'$ARGUMENTS'",
"detectedTechnology": "auto-detect",
"complexity": "simple",
"components": [],
"timeEstimate": "2-4 hours",
"validationCriteria": []
}' > /tmp/prototype-session-$SESSION_ID.jsonSTEP 2: Intelligent technology stack selection and project scaffolding
TRY:
**Technology Detection Algorithm:**
# Analyze requirements and select optimal stack
determine_tech_stack() {
local description="$ARGUMENTS"
case "$description" in
*"api"*|*"backend"*|*"service"*)
if command -v deno >/dev/null; then
echo "deno-fresh-api"
elif command -v cargo >/dev/null; then
echo "rust-axum"
elif command -v go >/dev/null; then
echo "go-connectrpc"
else
echo "node-express"
fi
;;
*"cli"*|*"tool"*|*"command"*)
if command -v cargo >/dev/null; then
echo "rust-clap"
elif command -v deno >/dev/null; then
echo "deno-cli"
elif command -v go >/dev/null; then
echo "go-cobra"
else
echo "node-commander"
fi
;;
*"web"*|*"frontend"*|*"ui"*)
if command -v deno >/dev/null; then
echo "deno-fresh"
else
echo "react-vite"
fi
;;
*"data"*|*"pipeline"*|*"processing"*)
if command -v deno >/dev/null; then
echo "deno-streams"
elif command -v cargo >/dev/null; then
echo "rust-tokio"
else
echo "node-streams"
fi
;;
*)
echo "deno-general"
;;
esac
}**Rapid Project Scaffolding:**
CASE detected_technology: WHEN "deno-fresh-api":
# Deno Fresh API Prototype
mkdir -p prototype-$SESSION_ID/routes/api
cd prototype-$SESSION_ID
# Initialize Deno project
deno init --lib
# Create minimal API prototype
cat > routes/api/demo.ts << 'EOF'
import { FreshContext } from "$fresh/server.ts";
interface DemoRequest {
action: string;
data?: any;
}
interface DemoResponse {
success: boolean;
result: any;
timestamp: string;
prototype: boolean;
}
export const handler = {
async POST(req: Request, _ctx: FreshContext): Promise<Response> {
try {
const body: DemoRequest = await req.json();
// Prototype logic implementation
const result = await processPrototypeRequest(body);
const response: DemoResponse = {
success: true,
result,
timestamp: new Date().toISOString(),
prototype: true
};
return Response.json(response);
} catch (error) {
return Response.json({
success: false,
error: error.message,
timestamp: new Date().toISOString(),
prototype: true
}, { status: 400 });
}
}
};
async function processPrototypeRequest(request: DemoRequest): Promise<any> {
// Mock implementation for rapid prototyping
await new Promise(resolve => setTimeout(resolve, 100)); // Simulate processing
return {
processed: request.data,
action: request.action,
metrics: {
processingTimeMs: 100,
itemsProcessed: Array.isArray(request.data) ? request.data.length : 1
}
};
}
EOF
# Create deno.json with prototype tasks
cat > deno.json << 'EOF'
{
"imports": {
"$fresh/": "jsr:@fresh/core@^2.0.0-alpha.22/"
},
"tasks": {
"dev": "deno run --allow-all --watch main.ts",
"test": "deno test --allow-all",
"proto-test": "curl -X POST http://localhost:8000/api/demo -H 'Content-Type: application/json' -d '{\"action\":\"test\",\"data\":[1,2,3]}'"
}
}
EOF
# Create main server file
cat > main.ts << 'EOF'
import { serve } from "$fresh/server.ts";
console.log("🚀 API Prototype running on http://localhost:8000");
console.log("📊 Test endpoint: POST /api/demo");
console.log("🧪 Run tests: deno task proto-test");
await serve();
EOFWHEN "rust-clap":
# Rust CLI Prototype
mkdir -p prototype-$SESSION_ID/src
cd prototype-$SESSION_ID
# Initialize Cargo project
cargo init --name prototype-cli
# Create CLI prototype with Clap
cat > src/main.rs << 'EOF'
use clap::{Parser, Subcommand};
use anyhow::{Result, Context};
use std::fs;
use std::path::PathBuf;
#[derive(Parser)]
#[command(name = "prototype")]
#[command(about = "A prototype CLI tool fA lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Automate browser interactions for development testing using Puppeteer MCP
Prepare branches for merging across multiple worktrees and coordinate integration
Transform into accessibility expert for WCAG compliance and inclusive design
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Transform into backend specialist for scalable API and system design
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies