Get the FREE Ultimate OpenClaw Setup Guide →

build

npx machina-cli add skill Pamacea/smite/build --openclaw
Files (1)
SKILL.md
24.0 KB

Implement Skill - Unified Agent v3.0

šŸ”“ TOOL GATEKEEPER - NON-NEGOTIABLE

═══════════════════════════════════════════════════ 🚫 PROHIBITED WITHOUT EXCEPTION: grep | egrep | find | ack | ag | ls | dir | glob

āœ… MANDATORY REPLACEMENT: grepai search "pattern" | /toolkit search "query"

šŸŽÆ DECISION TREE: Need to search code? → grepai search or /toolkit search (NOT grep/ls/find) Need to implement? → /studio build [flags] "task" ═══════════════════════════════════════════════════


Mission

Provide ONE unified implementation entry point with:

  • 12 composable flags for maximum flexibility
  • Auto-detection for zero-configuration usage
  • Memory integration for continuous improvement
  • Progress tracking for transparent workflow
  • Quality metrics for objective validation
  • Legacy compatibility for smooth migration

When to Use

  • Building new features: "Build user authentication system"
  • Implementing functionality: "Implement payment processing"
  • Creating components: "Create dashboard widget"
  • Adding APIs: "Add REST API endpoint for users"
  • Developing modules: "Develop data validation layer"

Examples

# Simple fix
/studio build --speed "fix login button"

# Complex feature
/studio build --scale "build authentication system"

# Quality-critical
/studio build --quality "implement payment processing"

# Large project
/studio build --team "build full-stack SaaS feature"

When NOT to Use

  • āŒ One-off instructions (just put in CLAUDE.md)
  • āŒ Simple tool usage (Claude already knows how to use tools)
  • āŒ Pure research tasks (no implementation needed)
  • āŒ Questions about code (use Read/Grep tools)
  • āŒ Configuration only (use Edit tool directly)
  • āŒ Documentation review (use dedicated review skills)

šŸŽÆ Flag System v3.0

Core Flags (v2.0)

FlagAliasesEffectUse When
--speed--fast, --quickOptimized for velocityQuick fixes, small features
--scale--thorough, --epctComprehensive workflowComplex features, multiple files
--quality--validate, --predatorQuality gates enabledCritical code, production-ready
--team--swarm, --ralphParallel agent teamsLarge projects, multi-domain

šŸ†• New Flags (v3.0)

FlagEffectUse When
--cleanDelete-first philosophyRefactoring, removing duplication
--testTDD mode (RED-GREEN-REFACTOR)Test-critical features
--debugBug fixing workflowFixing existing bugs
--docsAuto-documentationAPI docs, guides
--gitGit-aware modeWorking with version control
--branchContext-aware behaviorBranch-specific workflows
--profilePerformance profilingPerformance optimization
--typesTypeScript improvementsType safety improvements

šŸ¤– Subagent Auto-Activation System

Studio v3.0 automatically loads specialized agents based on flags and task analysis.

Auto-Activation Rules

Flag DetectedSubagent Auto-LoadedTrigger KeywordsDisabled With
--profileworkflow/performance-profiler"slow", "performance", "optimize", "bottleneck", "latency"--no-profile-agent
--securityworkflow/security-scanner"security", "OWASP", "vulnerability", "audit", "auth", "injection"--no-security-agent
--typesworkflow/typescript-improver"types", "TypeScript", "strict", "any"--no-types-agent
--testtesting/tdd-guide (existing)"test", "TDD", "coverage", "spec"--no-test-agent
--teamCreates Agent Team"large", "multi-domain", "parallel"--no-team

Activation Messages

When a subagent is auto-activated, you'll see clear feedback:

[INFO] Flag --profile detected
[INFO] → Auto-loading: workflow/performance-profiler.agent.md
[INFO] → Capabilities: CPU profiling, Memory profiling, Benchmarking
[INFO] → To disable: --no-profile-agent

Keyword-Based Auto-Detection

Example 1: Performance profiling triggered without explicit flag

/studio build "optimize slow database queries"

# Auto-detects:
# - Keywords: "optimize", "slow"
# → Activates: --profile mode
# → Loads: workflow/performance-profiler.agent.md

Example 2: Security scanning triggered by context

/studio build "add authentication to API"

# Auto-detects:
# - Keywords: "authentication"
# → Activates: --security mode
# → Loads: workflow/security-scanner.agent.md

Example 3: TypeScript improvements triggered

/studio build "fix type errors in user service"

# Auto-detects:
# - Keywords: "type errors", TypeScript files
# → Activates: --types mode
# → Loads: workflow/typescript-improver.agent.md

Hybrid: Explicit Flag + Auto-Loading

# Explicit flag (clear intent)
/studio build --profile "optimize user list"

# Process:
# 1. User explicitly sets --profile
# 2. System loads: workflow/performance-profiler.agent.md
# 3. Applies performance patterns
# 4. Reports before/after metrics

# Same as implicit (auto-detected)
/studio build "optimize slow user list"

# Process:
# 1. System detects keywords: "optimize", "slow"
# 2. Auto-activates: --profile mode
# 3. Loads: workflow/performance-profiler.agent.md
# 4. Same result with less typing!

Disabling Auto-Activation

Disable specific agent:

/studio build --profile "optimize code" --no-profile-agent
# → Won't load workflow/performance-profiler.agent.md
# → Uses built-in performance patterns only

Disable all agents:

/studio build --scale "build feature" --no-agents
# → No specialized agents loaded
# → Uses core build skill only

Agent Loading Priority

1. Explicit flag (--profile, --security, --types)
   ↓
2. Explicit agent (--agent=workflow/performance-profiler)
   ↓
3. Auto-detection (keywords in task)
   ↓
4. Tech-specific agent (--tech=nextjs, --tech=rust)
   ↓
5. Default behavior

Example: Full Auto-Activation Flow

# User command
/studio build "optimize slow authentication with proper types"

# System analysis:
ā”œā”€ Keywords: "optimize", "slow" → Activates --profile
ā”œā”€ Keywords: "authentication" → Activates --security
ā”œā”€ Keywords: "types" → Activates --types
ā”œā”€ File detection: .ts files → Activates --types
└─ Tech detection: --tech (if specified)

# Agents loaded:
āœ… workflow/performance-profiler.agent.md
āœ… workflow/security-scanner.agent.md
āœ… workflow/typescript-improver.agent.md

# Execution order:
1. Performance profiling (identify bottlenecks)
2. Security scanning (OWASP compliance)
3. TypeScript improvements (type safety)
4. Implementation with all patterns applied

# Result:
- Optimized performance (≄20% improvement)
- OWASP Top 10 compliant
- Zero `any`, type coverage ≄95%
- Proper commit message (if --git)
- Memory saved to claude-mem

šŸš€ NEW: Flag Details

--clean (Delete-First Mode)

Purpose: Implement "Delete First" philosophy - remove before adding

Philosophy:

  • Best code is no code
  • Delete duplication before creating new
  • Simplify over abstracting

Workflow:

EXPLORE (delete-focused, 10 min)
  - Search for existing implementations
  - Count occurrences of similar code
  - Identify what can be removed
  - Find components to compose

PLAN (minimal)
  - List deletions planned
  - List additions after deletions
  - Verify nothing breaks

CODE (delete-first, 20-30 min)
  1. DELETE first:
     - Remove duplicated code
     - Delete unused components
     - Simplify abstractions
  2. THEN add:
     - Implement new feature
     - Compose existing components
     - Use variant props

TEST (verify)
  - Verify nothing broke
  - Test new implementation
  - Measure code reduction

Example:

# Refactor with delete-first
/studio build --clean --scale "refactor user service"

# Quick duplicate removal
/studio build --clean --speed "remove duplicate buttons"

# Validated refactor
/studio build --clean --quality "simplify auth flow"

Success Criteria:

  • Net code reduction (removed > added)
  • Zero duplication
  • Tests passing
  • No regressions

--test (TDD Mode)

Purpose: Force Test-Driven Development (RED-GREEN-REFACTOR)

Philosophy:

  • Tests first, implementation second
  • Specifications drive design
  • Failing tests guide implementation

Workflow:

PLAN (test specs)
  - Define test scenarios
  - Specify acceptance criteria
  - Set coverage targets

CODE - RED (5-10 min)
  - Write failing tests first
  - Describe behavior, not implementation
  - Test edge cases
  - Output: test suite (all failing)

CODE - GREEN (15-30 min)
  - Implement minimum to pass tests
  - No extra code
  - Make tests pass one by one
  - Output: tests passing

CODE - REFACTOR (if needed)
  - Clean up implementation
  - Keep tests green
  - Extract abstractions
  - Output: clean code + passing tests

TEST (coverage)
  - Verify coverage ≄ 80%
  - All tests passing
  - No testTODOs left
  - Output: coverage report

Levels:

# Basic TDD (critical tests only)
/studio build --test --speed "add user validation"

# Full TDD (complete test suite)
/studio build --test --scale "payment processing"

# Strict TDD (100% coverage required)
/studio build --test --quality "security-critical auth"

Success Criteria:

  • Tests written before implementation
  • All tests passing
  • Coverage ≄ 80% (or ≄ 95% with --quality)
  • Tests describe behavior, not implementation

--debug (Debug Mode)

Purpose: Fix existing bugs systematically

Philosophy:

  • Understand before fixing
  • Fix root cause, not symptoms
  • Add regression tests

Workflow:

EXPLORE (error investigation, 10 min)
  - Search for error message in code
  - Find stack trace source
  - Identify code path
  - Understand context
  - Output: investigation.md

ANALYZE (root cause, 10 min)
  - Reproduce the bug
  - Identify root cause
  - Understand why it happens
  - Check related code
  - Output: root_cause.md

FIX (implementation, 15-30 min)
  - Implement fix
  - Add regression test
  - Verify fix works
  - Check for similar bugs
  - Output: fix.md

VERIFY (validation)
  - Test fix works
  - Regression test passes
  - No new bugs introduced
  - Edge cases covered
  - Output: validation.md

Levels:

# Quick fix
/studio build --debug --speed "fix TypeError in auth"

# Validated fix
/studio build --debug --quality "critical production bug"

# Fix + refactor
/studio build --debug --clean "fix and simplify"

Success Criteria:

  • Root cause identified
  • Fix implemented
  • Regression test added
  • Bug cannot recur

--docs (Documentation Mode)

Purpose: Generate documentation automatically

Philosophy:

  • Code is truth, docs are reflection
  • Document why, not just what
  • Self-documenting code first

Workflow:

CODE (with documentation)
  - Write code with JSDoc/comments
  - Document complex logic
  - Explain "why" not "what"
  - Use self-documenting names

OUTPUT (auto-generation)
  - README.md (30-second hook)
  - API.md (API documentation)
  - GUIDE.md (5-minute storytelling)
  - REFERENCE.md (cheat sheet)

FORMAT (structured)
  - Examples in README
  - Type signatures in API.md
  - Architecture in GUIDE.md
  - Quick reference in REFERENCE.md

Levels:

# Basic docs (README only)
/studio build --docs --speed "utility function"

# Full docs (README + API)
/studio build --docs --scale "API endpoints"

# Complete docs (all formats)
/studio build --docs --quality "public library"

Output Structure:

docs/
ā”œā”€ā”€ README.md       # Hook, quick start, examples
ā”œā”€ā”€ API.md          # All public APIs with types
ā”œā”€ā”€ GUIDE.md        # Architecture, patterns, workflows
└── REFERENCE.md    # Quick reference card

Success Criteria:

  • README < 50 lines
  • Quick start < 3 commands
  • API documentation complete
  • Examples runnable

--git (Git-Aware Mode)

Purpose: Intelligently work with Git changes

Workflow:

EXPLORE (git context)
  - git diff to see changes
  - git log for recent commits
  - Understand branch context
  - Check staging area

PLAN (git-aware)
  - Consider modified files
  - Respect branch purpose
  - Plan atomic commits
  - Prepare commit messages

IMPLEMENT (with git)
  - Work on changed files
  - Stage appropriately
  - Suggest commit message
  - Follow Git Flow Master format

Git Flow Master Format:

TYPE: PROJECT_NAME - vX.Y.Z

- Change 1
- Change 2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Combinations:

# Feature with git integration
/studio build --git --scale "add OAuth"

# Bug fix with proper commit
/studio build --git --debug "fix auth bug"

# Refactor with git history awareness
/studio build --git --clean "simplify service"

--branch (Context-Aware Mode)

Purpose: Behavior adapted to Git branch

Auto-Detection:

Branch PatternDetected Behavior
feature/*--scale (new features)
bugfix/*--debug (fixes)
refactor/*--clean (refactoring)
main/master--quality (production)
hotfix/*--debug --quality (urgent fixes)
docs/*--docs (documentation)
test/*--test (test-focused)

Usage:

# Auto-detect from branch
/studio build --branch "implement auth"

# Explicit override
/studio build --branch=feature/auth "add OAuth"

# Combined with flags
/studio build --branch --scale "large feature"

🧠 NEW: Memory Integration

After each build, automatically save to claude-mem:

Auto-Save Triggers:

  • āœ… New pattern discovered
  • āœ… Architecture decision made
  • āœ… Anti-pattern identified
  • āœ… Convention established
  • āœ… Bug solution found
  • āœ… Refactoring technique applied

Memory Categories:

CategoryWhat to Store
PatternsWorking code patterns
DecisionsTech choices + rationale
Anti-PatternsWhat NOT to do
WorkflowsRepeatable processes
SolutionsBug fixes and their causes

Usage:

# Search memory before implementing
"Let me check claude-mem for similar patterns first"

# Save after solving
"Saving successful pattern to claude-mem for future reference"

šŸ“Š NEW: Progress Indicators

Show clear progress during implementation:

[ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘] 80% - Coding (3/4 files done)

āœ“ EXPLORE (5 min) → Found 4 relevant files
āœ“ PLAN (3 min) → 3-step implementation
→ CODE (15 min) → Implementing feature...
ā—‹ TEST (pending)

Phase Breakdown:

Phase 1: EXPLORE ā± 5 min
ā”œā”€ Searching codebase...
ā”œā”€ Found 4 relevant files
ā”œā”€ Pattern identified: feature-module
└─ āœ“ Complete

Phase 2: PLAN ā± 3 min
ā”œā”€ Creating implementation strategy...
ā”œā”€ 3 steps identified
ā”œā”€ Files to modify: 4
└─ āœ“ Complete

Phase 3: CODE ā± 15 min (in progress)
ā”œā”€ [ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘] 80%
ā”œā”€ File 1/4: āœ“ auth.service.ts
ā”œā”€ File 2/4: āœ“ auth.types.ts
ā”œā”€ File 3/4: āœ“ auth.controller.ts
└─ File 4/4: → auth.test.ts (writing...)

Phase 4: TEST ā± pending
ā”œā”€ Run tests
ā”œā”€ Verify coverage
└─ Check regressions

šŸ“ NEW: Quality Metrics

Report objective quality after build:

Code Quality Report
════════════════════════════════════════
Lines Added:        127
Lines Removed:      23 (delete-first!)
Net Change:         +104
Files Touched:      4

Barrel Exports:     āœ“ All proper
Type Coverage:      100%
Test Coverage:      85% (target: 80%)
Complexity:         Reduced by 15%

Debt:               -50 lines (net improvement)
Performance:        +20% faster (measured)

Memory:             2 patterns saved to claude-mem
Documentation:      README.md + API.md generated

Status:             āœ“ READY FOR MERGE
════════════════════════════════════════

Metrics Collected:

  • Code volume (added/removed/net)
  • Test coverage (%)
  • Type coverage (%)
  • Complexity (cyclomatic)
  • Performance (when applicable)
  • Technical debt (lines)
  • Documentation completeness

šŸ”„ Flag Combinations

Power Combinations

CommandBehaviorUse For
/studio build --clean --scaleDelete-first thorough refactorMajor refactoring
/studio build --test --qualityTDD with 100% coverageCritical features
/studio build --debug --gitBug fix with proper commitProduction bugs
/studio build --clean --typesTypeScript improvementType safety
/studio build --test --docs --scaleTDD + docs + thoroughLibraries/APIs
/studio build --debug --cleanFix + refactorBug with cleanup
/studio build --git --branch --scaleFull git-aware featureFeature branches
/studio build --profile --qualityPerformance optimizationSlow code
/studio build --speed --teamQuick parallelLarge simple tasks

šŸ¤– Auto-Detection (Enhanced)

When no flags are provided, the system analyzes the task and selects appropriate behavior.

Enhanced Detection Rules

SignalDetected Profile
< 100 chars, no "and/with"--speed
Contains "feature/build/create"--scale
Contains "SaaS/platform/system"--team
Contains "critical/security/payment"--quality
Contains "refactor/cleanup/remove"--clean
Contains "test/TDD/coverage"--test
Contains "fix/bug/error/debug"--debug
Contains "docs/API/guide"--docs
Contains "slow/performance"--profile
Contains "types/TypeScript"--types

Examples

# Auto-detects as --speed
/studio build "fix login button"

# Auto-detects as --clean
/studio build "refactor user service, remove duplicates"

# Auto-detects as --test
/studio build "add payment feature with full test coverage"

# Auto-detects as --debug
/studio build "fix TypeError in auth controller"

# Auto-detects as --docs
/studio build "create API with documentation"

# Auto-detects as --scale --test
/studio build "build payment feature with tests"

šŸ”§ Technical Subagents

SubagentTech StackWhen Used
impl-nextjsReact 19, RSC, Prisma--tech=nextjs
impl-rustOwnership, async/await--tech=rust
impl-pythonType hints, FastAPI--tech=python
impl-goGoroutines, interfaces--tech=go
impl-typescriptStrict types, Zod--types flag

āœ… Success Criteria

Universal Criteria (All Flags)

  • āœ… Correct flag(s) chosen for task
  • āœ… Implementation follows flag behavior
  • āœ… Tests passing (flag-appropriate level)
  • āœ… No regressions
  • āœ… Code quality maintained

Additional Criteria by Flag

FlagAdditional Criteria
--cleanNet code reduction, zero duplication
--testTests written first, coverage ≄ 80%
--debugRoot cause identified, regression test added
--docsDocumentation complete and accurate
--gitProper commit message prepared
--profilePerformance improved, measured
--typesType coverage 100%, no any

šŸš€ Best Practices

  1. Start with auto-detection - Let the system choose, then refine
  2. Compose flags naturally - Combine for custom behavior
  3. Use --clean before --scale - Delete first, then add
  4. Use --test for critical features - Invest in test coverage
  5. Use --debug when fixing bugs - Systematic bug fixing
  6. Use --docs for public APIs - Good documentation matters
  7. Use --git for version control - Proper commit messages
  8. Check memory before implementing - Reuse past solutions
  9. Review metrics after build - Objective quality assessment

šŸŽÆ Decision Guide (Enhanced)

Quick Decision Tree

Need to implement?
ā”œā”€ Simple fix / small feature? → /studio build --speed
ā”œā”€ Complex / multi-file? → /studio build --scale
ā”œā”€ Quality-critical / security? → /studio build --quality
ā”œā”€ Large project / multi-domain? → /studio build --team
ā”œā”€ Refactoring / cleanup? → /studio build --clean
ā”œā”€ Test-critical feature? → /studio build --test
ā”œā”€ Bug fixing? → /studio build --debug
ā”œā”€ Public API / library? → /studio build --docs
ā”œā”€ Performance issue? → /studio build --profile
ā”œā”€ Type safety issues? → /studio build --types
ā”œā”€ Working with Git? → /studio build --git
ā”œā”€ Branch-specific workflow? → /studio build --branch
ā”œā”€ Not sure? → /studio build (auto-detect)
└─ Need specific combination? → Compose flags!

Combination Guide

Too slow? Add --speed
Not thorough enough? Add --scale
Quality issues? Add --quality
Too large for one agent? Add --team
Too much duplication? Add --clean
Need test coverage? Add --test
Fixing a bug? Add --debug
Need documentation? Add --docs
Using Git? Add --git
Performance issues? Add --profile
Type safety issues? Add --types
Branch-specific? Add --branch

šŸ”„ Legacy Compatibility

Deprecated Commands (Still Work)

Old CommandNew Equivalent
/oneshot "..."/studio build --speed "..."
/epct "..."/studio build --scale "..."
/predator "..."/studio build --quality "..."
/ralph "..."/studio build --scale --team "..."
/builder --tech=nextjs "..."/studio build --scale --tech=nextjs "..."
/studio build --quick "..."/studio build --speed "..."
/studio build --epct "..."/studio build --scale "..."
/studio build --predator "..."/studio build --quality "..."
/studio build --ralph "..."/studio build --scale --team "..."
/studio build --builder "..."/studio build --scale --tech=* "..."

Note: Legacy commands show a deprecation notice but work normally.


Anti-Patterns

Anti-PatternProblemFix
Using --scale for simple fixesWastes time on quick tasksUse --speed for < 100 char tasks
Using --speed for complex featuresMisses important workflow stepsUse --scale for multi-file features
Ignoring --test for critical codeRegressions in productionAlways use --test for payment/auth/security
Skipping EXPLORE phaseMisses existing implementationsAlways search codebase first
Using --team for small tasksUnnecessary overheadUse --team only for large/multi-domain tasks
Not checking flagsSuboptimal workflowReview flag combinations before starting
Ignoring auto-detectionMisses smart defaultsTry without flags first, let system choose
Combining too many flagsConflicting behaviorsMax 2-3 complementary flags

Integration with Other Skills

Requires:

  • semantic-search - For EXPLORE phase (finding existing code)
  • memory-integration - For saving patterns to claude-mem

Complements:

  • refactor - Use after implementation for cleanup
  • multi-review - Use for comprehensive code review
  • pattern-capture - Use after successful implementation to save patterns

Used by:

  • All smite workflows as primary implementation entry point

Implement Skill v3.0.0 - 12-flag system with memory integration and quality metrics

Source

git clone https://github.com/Pamacea/smite/blob/main/plugins/studio/skills/build/SKILL.mdView on GitHub

Overview

build is the mandatory entry point for all implementation tasks in the Smite project. It supports phrases like 'build feature', 'implement this', 'create component', 'add functionality', and 'develop API'. It uses a 12-flag system with auto-detection, memory integration, and quality metrics to streamline feature development.

How This Skill Works

It exposes 12 composable flags (--speed, --scale, --quality, --team, --clean, --test, --debug, --docs, --git, --branch, --profile, --types) and can auto-detect context for zero-configuration usage. It integrates memory for continuous improvement and tracks progress and quality metrics to validate outcomes. Invoke it via /studio build [flags] "<task>" to drive the work.

When to Use It

  • Building new features: Build user authentication system
  • Implementing functionality: Implement payment processing
  • Creating components: Create dashboard widget
  • Adding APIs: Add REST API endpoint for users
  • Developing modules: Develop data validation layer

Quick Start

  1. Step 1: Run /studio build with the desired flags and a task description
  2. Step 2: Pass the relevant flags (--speed, --scale, --quality, etc.) to shape the workflow
  3. Step 3: Review progress, memory integration outputs, and quality metrics; iterate as needed

Best Practices

  • Use the 12 flags to tailor the workflow for each task
  • Leverage auto-detection to minimize manual config
  • Enable memory integration to support continuous improvement
  • Monitor quality metrics and adjust accordingly
  • Maintain legacy compatibility during migrations

Example Use Cases

  • /studio build --speed \"fix login button\"
  • /studio build --scale \"build authentication system\"
  • /studio build --quality \"implement payment processing\"
  • /studio build --team \"build full-stack SaaS feature\"
  • /studio build --docs \"API docs for new module\"

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers ↗