

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456789# Claude Code Subagent Rules1011## Basic Spawning12```bash13# Simple execution14claude -p "Your prompt here"1516# With JSON output for parsing17claude -p "Build feature" --output-format json1819# With streaming for long tasks20claude -p "Complex task" --output-format stream-json --verbose21```2223## Session Management24```bash25# Capture session ID26SESSION_ID=$(claude -p "Start task" --output-format json | jq -r '.session_id')2728# Continue session29claude -p --resume "$SESSION_ID" "Next step"3031# Continue most recent32claude -p --continue "Add more features"33```3435## Essential Options36```bash37# Limit turns to control cost38claude -p "Task" --max-turns 33940# Custom system prompt41claude -p "Task" --system-prompt "You are an expert in X"4243# Allow/disallow specific tools44claude -p "Task" --allowedTools "Read,Write,Bash"45claude -p "Task" --disallowedTools "Bash(rm)"4647# Permission modes for autonomous operation48claude -p "Task" --permission-mode acceptEdits # Auto-accept file edits49claude -p "Task" --permission-mode bypassPermissions # Skip all permission prompts50claude -p "Task" --permission-mode plan # Plan mode only51```52## Autonomous Subagents53```bash54# Fully autonomous - bypasses ALL permission prompts55claude -p "Build complete app" --permission-mode bypassPermissions --max-turns 105657# Auto-accept edits but prompt for dangerous operations58claude -p "Refactor codebase" --permission-mode acceptEdits --max-turns 55960# Combine with tool restrictions for safety61claude -p "Safe autonomous task" \62 --permission-mode bypassPermissions \63 --disallowedTools "Bash(rm),Bash(git push)" \64 --max-turns 365```6667## Monitoring & Error Handling68```bash69# Check success and extract data70if RESULT=$(claude -p "$prompt" --output-format json); then71 COST=$(echo "$RESULT" | jq -r '.total_cost_usd')72 echo "Success! Cost: $COST USD"73else74 echo "Failed with exit code $?"75fi7677# Timeout for long tasks78timeout 300 claude -p "$prompt" || echo "Timed out"79```8081## Advanced Pattern: Parallel Agentic Workflows8283This pattern, inspired by "Midjourney for Code," involves spawning multiple agents in isolated environments to generate diverse solutions to a single problem. This is useful for prototyping, A/B testing features, or exploring different implementations.8485### Core Principle: Keep It Simple8687The claude CLI is already well-designed for autonomous operation. Don't over-engineer with complex monitoring or JSON parsing unless you specifically need it.8889### Pattern 1: Simple Parallel Variations9091The most effective pattern for generating multiple variations:9293```bash94#!/bin/bash95# spawn_variations.sh - Dead simple parallel execution9697# Define your variations98for i in {1..5}; do99 mkdir -p "variant-$i"100 (101 cd "variant-$i" && \102 claude -p "Build [YOUR TASK] - Variation $i: [specific approach/style]" \103 --permission-mode bypassPermissions \104 --max-turns 15105 ) &106done107108wait109echo "✅ All variations complete. Check variant-*/ directories"110```111112That's it. The claude CLI handles progress display, error reporting, and retries automatically.113114### Pattern 2: Parallel Features on Existing Codebase115116For working on an existing project with git:117118```bash119#!/bin/bash120# spawn_features.sh - Parallel feature development121122FEATURE="implement dark mode"123BASE_BRANCH=$(git branch --show-current)124125for approach in "css-variables" "theme-provider" "tailwind-classes"; do126 git checkout -b "feature-$approach" "$BASE_BRANCH"127128 (129 claude -p "Add $FEATURE using $approach approach" \130 --permission-mode bypassPermissions \131 --max-turns 20132 ) &133done134135wait136echo "✅ Features ready on branches: feature-*"137```138139### Pattern 3: Quick A/B Testing140141For comparing different implementations:142143```bash144#!/bin/bash145# ab_test.sh - Compare two approaches146147mkdir -p option-a option-b148149# Option A150(cd option-a && claude -p "Build a todo app using vanilla JavaScript" --permission-mode bypassPermissions) &151152# Option B153(cd option-b && claude -p "Build a todo app using React" --permission-mode bypassPermissions) &154155wait156echo "✅ Both options ready for comparison"157```158159### When to Add Complexity160161Only add monitoring/logging when you need:162- **Automated selection** - Parsing results to pick best variant163- **CI/CD integration** - Running in non-interactive environments164- **Cost tracking** - Analyzing spend across many runs165- **Bulk operations** - Managing 10+ parallel agents166167For interactive development, the simple patterns above are optimal.168169### Monitoring (When Needed)170171If you need to monitor progress:172173```bash174# In another terminal175watch -n 2 'find . -name "*.html" -o -name "*.js" | wc -l'176177# Or check completion178ls -d variant-*/index.html 2>/dev/null | wc -l179```180181### Cost Awareness182183```bash184# Set turn limits based on task complexity185SIMPLE_TASK_TURNS=5186MEDIUM_TASK_TURNS=10187COMPLEX_TASK_TURNS=20188189claude -p "Simple task" --max-turns $SIMPLE_TASK_TURNS190```191192## Key Tips193- **Keep it simple** - Basic bash patterns work best194- **Trust the tool** - Claude CLI already handles errors, retries, and progress195- **Set `--max-turns`** to control costs196- **Use `--permission-mode bypassPermissions`** for fully autonomous operation197- **Don't capture output you won't use** - Let the CLI display progress naturally198
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| cline/prompts.clinerules/ai-dlc-adaptive-workflow.md · 1.2k | Cline rules | agent-behaviour | 54/100 | today | |
| cline/prompts.clinerules/audio-plugin-developer.md · 1.2k | Cline rules | styleperformancedo-notagent-behaviour | 57/100 | today | |
| cline/prompts.clinerules/ba.md · 1.2k | Cline rules | archgitagent-behaviour | 50/100 | today | |
| cline/prompts.clinerules/baby-steps.md · 1.2k | Cline rules | do-notagent-behaviour | 50/100 | today | |
| cline/prompts.clinerules/c#-guide.md · 1.2k | Cline rules | style | 27/100 | today | |
| cline/prompts.clinerules/cline-architecture.md · 1.2k | Cline rules | archtypesapi | 54/100 | today | |
| cline/prompts.clinerules/cline-continuous-improvement-protocol.md · 1.2k | Cline rules | testgitperformance | 58/100 | today | |
| cline/prompts.clinerules/cline-for-research.md · 1.2k | Cline rules | agent-behaviour | 34/100 | today | |
| cline/prompts.clinerules/cline-for-slides.md · 1.2k | Cline rules | setupbuildstylearch+1 | 86/100 | today | |
| cline/prompts.clinerules/cline-for-webdev-ui.md · 1.2k | Cline rules | archagent-behaviour | 58/100 | today | |
| cline/prompts.clinerules/code-review.md · 1.2k | Cline rules | lint-formatgitsecurityperformance | 48/100 | today | |
| cline/prompts.clinerules/codebase-onboarding.md · 1.2k | Cline rules | lint-formatstylearchdependencies | 56/100 | today | |
| cline/prompts.clinerules/comprehensive-slide-dev-guide.md · 1.2k | Cline rules | buildarchtypesui | 62/100 | today | |
| cline/prompts.clinerules/create-documentation.md · 1.2k | Cline rules | apidocs | 44/100 | today | |
| cline/prompts.clinerules/gemini-comprehensive-software-engineering-guide.md · 1.2k | Cline rules | buildstyletesting-strategysecurity+4 | 36/100 | today | |
| cline/prompts.clinerules/general-development-rules.md · 1.2k | Cline rules | stylegitdeploymentdo-not | 73/100 | today | |
| cline/prompts.clinerules/google-apps-script-developer.md · 1.2k | Cline rules | setupstylegitsecurity+3 | 66/100 | today | |
| cline/prompts.clinerules/helm-chart-developer.md · 1.2k | Cline rules | setuplint-formatstylearch+6 | 81/100 | today | |
| cline/prompts.clinerules/mcp-development-protocol.md · 1.2k | Cline rules | setupteststyle | 73/100 | today | |
| cline/prompts.clinerules/mcp_env_configuration.md · 1.2k | Cline rules | setupstylearchsecurity+1 | 77/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/cline-prompts-clinerules-claude-code-subagents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.