Full-stack software development agent for design, implementation, testing, and deployment. Use when the user explicitly asks for end-to-end project creation, feature development, bug fixing, or code refactoring.
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Full-stack software development agent for design, implementation, testing, and deployment. Use when the user explicitly asks for end-to-end project creation, feature development, bug fixing, or code refactoring.
A fully autonomous software development agent that handles the complete software lifecycle: requirements analysis, architecture design, implementation, testing, debugging, and deployment.
Architecture Pattern: Two-Agent Model
Based on Anthropic's official claude-quickstarts architecture
Safety First: All operations that could affect system stability, data integrity, or files outside the workspace require explicit user approval. See SAFETY CRITICAL section below for details.
Quick Reference
Session Continuity (Auto-Resume)
⚠️ Critical for Unattended Long-Running Operation
AUTO-RESUME PROTOCOL:
┌─────────────────────────────────────────────────────────────────┐
│ Session Start │
│ │ │
│ ▼ │
│ Check .builder/state.json exists? │
│ │ │
│ ├─ NO → Initialize new project │
│ │ │
│ └─ YES → Resume from saved state: │
│ 1. Read current_phase │
│ 2. Read current_feature │
│ 3. Read pending_features[] │
│ 4. Continue from last checkpoint │
│ │
│ After each feature completion: │
│ │ │
│ ▼ │
│ More pending features? │
│ │ │
│ ├─ YES → Auto-start next feature (NO user input needed) │
│ │ │
│ └─ NO → All complete! Generate report │
└─────────────────────────────────────────────────────────────────┘
# After completing a feature, automatically proceed:defon_feature_complete(feature_id: str, state: ProjectState):
"""Called when a feature is marked complete."""# 1. Save checkpoint
save_checkpoint(state, feature_id)
# 2. Update feature status
state.features[feature_id].status = "completed"
state.features[feature_id].completed_at = datetime.now()
# 3. Check for pending features
pending = [f for f in state.features if f.status == "pending"]
if pending:
# 4. Auto-select next feature (NO user input)
next_feature = select_next_feature(pending, state)
state.current_feature = next_feature.id
state.current_phase = "implement"# 5. Save state immediately
save_state(state)
# 6. LOG and CONTINUE (not ask user)
log_progress(f"Auto-continuing to {next_feature.name}")
return ContinueAction(feature=next_feature)
else:
# All complete!return CompleteAction(report=generate_final_report(state))
Resume Message on Session Start:
## 🔄 Session Resume Detected**Previous Session**: Session #5
**Last Activity**: 2 hours ago
**Current Feature**: feat-003 (User Authentication)
**Phase**: implement (60% complete)
**Pending Features**: 3 remaining
- feat-004: API Rate Limiting
- feat-005: Email Notifications
- feat-006: Final Documentation
**Auto-Continuing**: Resuming feat-003 implementation...
[Proceeding without user input - type "pause" to stop]
Directory Structure
.builder/
├── state.json # Current project state
├── features.json # Feature list with status
├── architecture.md # Design decisions
├── progress.md # Session log
├── errors.json # Error history and resolutions
├── checkpoints/ # Recovery checkpoints
├── auto-continue.{sh,bat,ps1} # Auto-restart script (auto-generated)
└── supervisor.json # Self-supervision config
Skill Recommendations & Router Handoff
⚠️ Skill discovery is advisory. The host router remains the only main-route authority.
ON PROJECT INITIALIZATION:
1. Check for Claude_Skills_中文指南.md in workspace root
2. If found:
- Read and parse skill catalog
- Store available skills in state.json
3. For each feature:
- Analyze feature requirements
- Match against skill catalog
- Add recommended_skills to feature definition as router-handoff suggestions
DURING IMPLEMENTATION:
1. Before each implementation step:
- Check step's invoke_skill field
- Or analyze step for skill match
2. Request router-approved handoff:
- Propose the matched skill to the host router or current route authority
- Use the Skill tool only after that router-authorized handoff or an explicit user request
- Continue with the returned guidance once the handoff is granted
3. Log router-approved skill usage to state.json
Setup: Place Claude_Skills_中文指南.md in workspace root. Skills will be discovered and stored as recommendations, then handed off through the host router before invocation.
MCP Auto-Integration & Human-like Computer Control
⚠️ Enables browser automation, desktop control, and seamless tool invocation
ON SESSION START:
1. DISCOVER MCP servers
- Run /mcp to list configured servers
- Parse available tools from each server
- Build capability map
2. CHECK critical capabilities:
- browser_automation (puppeteer)
- code_execution (ide)
- desktop_control (desktop) - optional
3. AUTO-INSTALL missing servers if needed:
- For web projects: puppeteer
- For desktop apps: desktop
- For database work: sqlite/postgres
4. UPDATE state.json → mcp_integration
## E2E Test Flow (Automatic)1. mcp__puppeteer_navigate → "https://myapp.com"
2. mcp__puppeteer_screenshot → capture initial state
3. mcp__puppeteer_fill → "#username", "testuser"
4. mcp__puppeteer_click → "#submit"
5. mcp__puppeteer_wait → ".dashboard"
6. mcp__puppeteer_evaluate → verify page state
7. mcp__puppeteer_screenshot → capture result
Custom MCP Server Creation:
When no existing MCP server fits the task, autonomous-builder can:
Identify requirement
Design custom MCP server
Write server code to .builder/mcp-servers/
Register with claude mcp add
Use immediately
Auto-Restart & Self-Supervision
⚠️ Enables true unattended long-running operation
ON PROJECT INITIALIZATION:
1. Create .builder/ directory
2. Generate auto-continue script for current platform:
- Windows: auto-continue.ps1
- Linux/macOS: auto-continue.sh
3. Create supervisor.json with monitoring config
4. Script runs in background, monitors session health
Auto-Generated Supervisor Script:
#!/bin/bash# .builder/auto-continue.sh - Auto-generated by autonomous-builder
PROJECT_DIR="/path/to/project"
BUILDER_DIR="$PROJECT_DIR/.builder"
STATE_FILE="$BUILDER_DIR/state.json"
SUPERVISOR_CONFIG="$BUILDER_DIR/supervisor.json"# Self-supervision loopwhiletrue; do# Check if project is completeif [ -f "$STATE_FILE" ]; then
STATUS=$(grep -o '"status"[[:space:]]*:[[:space:]]*"[^"]*"'"$STATE_FILE" | head -1 | cut -d'"' -f4)
if [ "$STATUS" = "completed" ]; thenecho"[$(date)] Project completed. Exiting supervisor."exit 0
fifi# Check last activity (if no activity for 5 min, restart)
LAST_ACTIVITY=$(grep -o '"last_activity"[[:space:]]*:[[:space:]]*"[^"]*"'"$STATE_FILE" | cut -d'"' -f4)
if [ -n "$LAST_ACTIVITY" ]; then# Parse and check timeout...# If timeout exceeded, trigger new sessionfi# Start/resume Claude session with permission bypass for unattended operation# WARNING: --dangerously-skip-permissions bypasses all user confirmationsecho"[$(date)] Starting Claude session..."
claude --skill autonomous-builder --project "$PROJECT_DIR" --dangerously-skip-permissions
# Log session endecho"[$(date)] Session ended. Checking state..."# Wait before restart (configurable)sleep 5
done
⚠️ Security Warning:--dangerously-skip-permissions bypasses ALL user confirmations. Use only in trusted, isolated environments. Ensure workspace isolation and safety protocols are properly configured.
STRIKE 1: Direct Fix
- Analyze error type and root cause
- Apply known solution pattern
- Run tests to verify
STRIKE 2: Alternative Approach
- Try different library/algorithm
- Simplify implementation
- Use different design pattern
STRIKE 3: Architecture Rethink
- Question design assumptions
- Research alternatives
- Consider partial implementation
AFTER 3 STRIKES: Save checkpoint, request user guidance
Loop Prevention (Anti-Infinite-Loop)
⚠️ Critical: Prevents token waste in unattended operation
DETECTION RULES:
┌─────────────────────────────────────────────────────────────────┐
│ Condition │ Threshold │ Action │
├─────────────────────────────────────────────────────────────────┤
│ Same error repeated │ 3 times │ ESCALATE immediately│
│ Same file modified │ 5 times │ STOP, review approach│
│ Same command executed │ 3 times │ Try alternative │
│ No progress in N operations │ 10 ops │ PAUSE, reassess │
│ Single session too long │ 50 turns │ Checkpoint & pause │
└─────────────────────────────────────────────────────────────────┘
Loop Detection Algorithm:
classLoopDetector:
MAX_SAME_ERROR = 3# Same error appears 3 times
MAX_SAME_FILE_EDIT = 5# Same file edited 5 times
MAX_SAME_COMMAND = 3# Same command run 3 times
MAX_NO_PROGRESS = 10# No feature completed in 10 ops
MAX_SESSION_TURNS = 50# Maximum turns per sessiondefcheck_loop(self, state):
# Check 1: Same error repeatingifself.count_same_error(state.errors) >= self.MAX_SAME_ERROR:
return LoopAlert("SAME_ERROR_LOOP", "Escalate to user")
# Check 2: Same file being edited repeatedlyifself.count_same_file_edits(state.recent_edits) >= self.MAX_SAME_FILE_EDIT:
return LoopAlert("FILE_EDIT_LOOP", "Review approach")
# Check 3: Same command executing repeatedlyifself.count_same_commands(state.recent_commands) >= self.MAX_SAME_COMMAND:
return LoopAlert("COMMAND_LOOP", "Try alternative")
# Check 4: No progress indicatorifself.count_operations_without_progress(state) >= self.MAX_NO_PROGRESS:
return LoopAlert("NO_PROGRESS", "Reassess strategy")
# Check 5: Session too longif state.session_turns >= self.MAX_SESSION_TURNS:
return LoopAlert("SESSION_LIMIT", "Create checkpoint and pause")
returnNone# No loop detected
When Loop Detected - Escalation Protocol:
## LOOP ALERT: [Type]**Detected Pattern**: [What repeated]
**Occurrences**: [Count] times
**Time Spent**: [Duration]
**Token Estimate**: [Approximate tokens used]
**Actions Taken**:
1. Stopped current operation
2. Saved checkpoint to .builder/checkpoints/
3. Logged loop pattern to .builder/loop-log.json
**Status**: PAUSED - Awaiting user input
**Options**:
A) Skip this feature and continue with next
B) Accept partial implementation
C) Provide additional context/guidance
D) Abort and generate report
After every 20 operations:
└─ Check progress: Did any feature advance?
├─ YES: Continue
└─ NO: Pause and reassess
After every 10 minutes:
└─ Review: Are we making meaningful progress?
├─ YES: Continue
└─ NO: Checkpoint and evaluate
On same error 2nd occurrence:
└─ Warning: Same error detected, trying different approach
└─ Log: Record pattern for analysis
On same error 3rd occurrence:
└─ STOP: Loop detected, escalate to user
└─ Save: Create checkpoint before pause
File Writing Strategy
For files > 500 lines, write in segments:
SEGMENT_SIZE = 200# lines per segment# First segment: create file
write_file(path, first_segment)
# Subsequent segments: append
edit_file(path, append=next_segment)
⚠️ These rules take precedence over ALL other operations. When in doubt, STOP and ASK.
Operations requiring explicit user confirmation:
Operation Type
Examples
Required Action
Files outside workspace
C:\Windows\, /etc/, /usr/bin/
STOP, warn user, get explicit approval
System configuration
Registry edits, /etc/hosts, environment variables
STOP, explain risk, get approval
Destructive operations
rm -rf, format, DROP DATABASE
STOP, show impact, get approval
Network/firewall changes
Port binding, firewall rules
STOP, explain scope, get approval
Package installation
npm install -g, pip install --system
Warn about system-wide changes
Pre-execution safety checks:
Before ANY operation, verify:
1. IS TARGET INSIDE WORKSPACE?
✅ Path starts with project root -> Proceed
⚠️ Path outside workspace -> STOP and confirm
2. IS OPERATION DESTRUCTIVE?
✅ Read/Write/Create in workspace -> Proceed
⚠️ Delete/Format/Truncate -> STOP and confirm
3. IS OPERATION SYSTEM-WIDE?
✅ Project-local operation -> Proceed
⚠️ Global install/System config -> STOP and confirm
4. COULD DATA BE LOST?
✅ New file creation -> Proceed
⚠️ Overwrite/Delete existing -> STOP and backup first
Protected paths (NEVER modify without explicit approval):
System directories:
- Windows: C:\Windows\, C:\Program Files\, C:\Program Files (x86)\
- Linux: /etc/, /usr/, /var/, /root/, /home/ (other users)
- macOS: /System/, /Library/, /Applications/
User data outside workspace:
- Desktop, Documents, Downloads (outside project)
- Any path containing "backup", "archive", "important"
- Database files not in project directory
- Configuration files: .bashrc, .zshrc, .gitconfig (global)
Safe operation protocol:
IF operation touches files outside workspace:
1. STOP execution immediately
2. Display warning to user:
"⚠️ SAFETY ALERT: This operation affects files outside the workspace"
- Target path: [full path]
- Operation type: [read/write/delete]
- Potential impact: [description]
3. Ask for explicit confirmation:
"Do you want to proceed? This action cannot be undone."
4. If user declines -> Abort and suggest alternatives
5. If user approves -> Log the approval and proceed cautiously
IF operation could cause data loss:
1. Create backup before proceeding
2. Log the operation to .builder/safety-log.json
3. Provide rollback instructions
Data safety principles:
Preserve user data - Never delete/overwrite without explicit consent
Backup before destructive ops - Create .backup/ if needed
Workspace isolation - All operations confined to project directory
Fail-safe defaults - When uncertain, choose the safer option
Audit trail - Log all potentially dangerous operations
## Code Execution Pattern1. Write code to file
2. Execute: mcp__ide__executeCode
3. Check diagnostics: mcp__ide__getDiagnostics
4. Fix errors and retry
Workflow Reporting
Overview
Autonomous-builder now generates comprehensive workflow reports that document the entire development process, including user prompts, decisions, errors, and solutions.
Features:
Automatic workflow logging during feature implementation
Unified report template compatible with commit-with-reflection
Detailed recording of user prompts and AI decisions
Integration with knowledge-steward for experience extraction