agent-browser-automati…
Automate browser interactions for development testing using Puppeteer MCP
Scaffold production-ready Deno automation script with Dax integration and deno.json task registration
How it fires
How this command gets triggered: by you, by Claude, or both.
/scaffold-deno-scriptContext preview
What this command does when you run it.
Scaffold production-ready Deno automation script with Dax integration and deno.json task registration
allowed-tools: Read, Write, MultiEdit, Bash(deno:*), Bash(fd:*), Bash(bat:*), Bash(jq:*), Bash(gdate:*), Bash(mkdir:*) name: "Scaffold Deno Script" description: "Scaffold production-ready Deno automation script with Dax integration and deno.json task registration" author: "wcygan" tags: ["scaffold","deno"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
STEP 1: Initialize session state and validate project context
# Initialize scaffold session state
echo '{
"sessionId": "'$SESSION_ID'",
"scriptName": "'$ARGUMENTS'",
"projectRoot": "'$(pwd)'",
"timestamp": "'$(gdate -Iseconds 2>/dev/null || date -Iseconds)'",
"scaffoldingSteps": [],
"daxConfigured": false,
"taskRegistered": false
}' > /tmp/scaffold-script-session-$SESSION_ID.jsonIF script_name is empty:
STEP 2: Project structure analysis and preparation
TRY:
**Directory Structure Setup:**
# Ensure scripts directory exists if ! fd scripts . -t d -d 1 >/dev/null 2>&1; then echo "📁 Creating scripts directory..." mkdir -p scripts fi # Check for deno.json configuration if ! fd "deno\.json" . -d 1 >/dev/null 2>&1; then echo "⚠️ No deno.json found - will create minimal configuration" fi
**Existing Script Analysis:**
# Check for naming conflicts if [[ -f "scripts/$ARGUMENTS.ts" ]]; then echo "⚠️ Script scripts/$ARGUMENTS.ts already exists" echo "Options: 1) Choose different name 2) Overwrite existing" fi # Analyze existing scripts for patterns existing_count=$(fd "\.ts$" scripts/ 2>/dev/null | wc -l | tr -d ' ') echo "📊 Found $existing_count existing TypeScript scripts"
STEP 3: Deno configuration management with smart updates
**deno.json Configuration:**
IF deno.json exists:
ELSE:
{
"imports": {
"@std/path": "jsr:@std/path@^1.0.9",
"@std/fs": "jsr:@std/fs@^1.0.17",
"@std/cli/parse-args": "jsr:@std/cli@^1.0.9",
"@std/assert": "jsr:@std/assert@^1.0.9",
"@david/dax": "jsr:@david/dax@^0.42.0"
},
"tasks": {
"$ARGUMENTS": "deno run --allow-all scripts/$ARGUMENTS.ts",
"check": "deno check **/*.ts",
"fmt": "deno fmt",
"lint": "deno lint"
},
"compilerOptions": {
"strict": true
}
}STEP 4: Generate production-ready script template
**Comprehensive Script Template Creation:**
CREATE `scripts/$ARGUMENTS.ts` with:
#!/usr/bin/env -S deno run --allow-all
/**
* $ARGUMENTS - Auto-generated Deno script with Dax integration
*
* Generated by Claude Code scaffold-deno-script command
* Session: $SESSION_ID
* Created: $(gdate -Iseconds 2>/dev/null || date -Iseconds)
*/
import { parseArgs } from "@std/cli/parse-args";
import { $, Path } from "@david/dax";
import { cyan, green, red, yellow } from "@std/fmt/colors";
// CLI argument parsing
const args = parseArgs(Deno.args, {
boolean: ["help", "verbose", "dry-run"],
string: ["input", "output"],
alias: { h: "help", v: "verbose", d: "dry-run" },
});
if (args.help) {
console.log(`
${cyan("🛠️ $ARGUMENTS Script")}
Usage:
deno task $ARGUMENTS [options]
deno run --allow-all scripts/$ARGUMENTS.ts [options]
Options:
-h, --help Show this help message
-v, --verbose Enable verbose output
-d, --dry-run Show what would be done without executing
--input <path> Input file or directory
--output <path> Output file or directory
Examples:
deno task $ARGUMENTS --verbose
deno task $ARGUMENTS --input ./data --output ./processed
`);
Deno.exit(0);
}
// Main script functionality
async function main(): Promise<void> {
try {
console.log(cyan(`🚀 Starting $ARGUMENTS script...`));
if (args.verbose) {
console.log(yellow(`📊 Arguments: ${JSON.stringify(args, null, 2)}`));
}
// Example: Cross-platform file operations
const currentDir = new Path(".");
console.log(green(`📁 Working directory: ${currentDir.toString()}`));
// ExA 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