Skip to content
Development
Command

/prototype

Intelligent prototyping orchestrator with technology detection, rapid scaffolding, and validation automation

From plugin
claude-cmd
313180 skills180 commands

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/prototype

Context preview

What this command does when you run it.

Intelligent prototyping orchestrator with technology detection, rapid scaffolding, and validation automation

Command definition

prototype.md
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"

Context

  • Session ID: !`gdate +%s%N 2>/dev/null || date +%s%N 2>/dev/null || echo "$(date +%s)$(jot -r 1 100000 999999 2>/dev/null || shuf -i 100000-999999 -n 1 2>/dev/null || echo $RANDOM$RANDOM)"`
  • Prototype target: $ARGUMENTS
  • Current directory: !`pwd`
  • Existing projects: !`fd "(package\.json|Cargo\.toml|go\.mod|deno\.json|pom\.xml|build\.gradle)" . -d 2 | head -5 || echo "No existing projects detected"`
  • Technology stack hints: !`echo "$ARGUMENTS" | rg -o "(rust|go|deno|node|react|vue|api|cli|web|frontend|backend)" | head -3 || echo "No technology hints in description"`
  • Available tools: !`echo "deno: $(which deno >/dev/null && echo ✓ || echo ✗) | cargo: $(which cargo >/dev/null && echo ✓ || echo ✗) | go: $(which go >/dev/null && echo ✓ || echo ✗) | node: $(which node >/dev/null && echo ✓ || echo ✗)"`

Your Task

STEP 1: Initialize intelligent prototyping session with technology detection

  • CREATE session state file: `/tmp/prototype-session-$SESSION_ID.json`
  • ANALYZE prototype requirements from $ARGUMENTS
  • DETECT optimal technology stack based on description and available tools
  • DETERMINE prototype complexity (simple proof-of-concept vs. multi-component system)
# 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.json

STEP 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();
EOF

WHEN "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 f
Read more
Ships withclaude-cmd

A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.

Get the whole plugin