autonomous-skill
Skill1 starsChanged 9 months agoMITView on GitHub
Use when user wants to execute long-running tasks that require multiple sessions to complete. This skill manages task decomposition, progress tracking, and autonomous execution using Claude Code headless mode with auto-continuation. Trigger phrases: "autonomous", "long-running task", "multi-session", "自主执行", "长时任务", "autonomous skill".
We split this skill into the rules it gives an agent
7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
All task data is stored in .autonomous/<task-name>/ under the project root:
- Distinctive: line 53
Check if this is a new task or continuation:
- Very specific: line 83
If task_list.md does NOT exist in the task directory:
- Very specific: line 104
If task_list.md EXISTS in the task directory:
- Distinctive: line 135
After each session completes, check remaining tasks and auto-continue:
- Distinctive: line 178
After execution, display a clear progress report:
- Very specific: line 253
Task List is Sacred: Never delete or modify descriptions, only mark [x]
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Autonomous Skill - Long-Running Task Execution
Execute complex, long-running tasks across multiple sessions using a dual-agent pattern (Initializer + Executor) with automatic session continuation.
Directory Structure
All task data is stored in .autonomous/<task-name>/ under the project root:
project-root/
└── .autonomous/
├── build-rest-api/
│ ├── task_list.md
│ └── progress.md
├── refactor-auth/
│ ├── task_list.md
│ └── progress.md
└── ...This allows multiple autonomous tasks to run in parallel without conflicts.
Workflow Overview
User Request → Generate Task Name → Create .autonomous/<task-name>/ → Execute SessionsStep 1: Initialize Task Directory
Generate a task name from user's description and create the directory:
# Generate task name (lowercase, hyphens, max 30 chars)
# Example: "Build a REST API for todo app" → "build-rest-api-todo"
TASK_NAME=$(echo "$USER_TASK" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | cut -c1-30 | sed 's/-$//')
# Create task directory
TASK_DIR=".autonomous/$TASK_NAME"
mkdir -p "$TASK_DIR"
echo "Task directory: $TASK_DIR"Step 2: Analyze Current State
Check if this is a new task or continuation:
TASK_DIR=".autonomous/$TASK_NAME"
# Look for existing task list
if [ -f "$TASK_DIR/task_list.md" ]; then
echo "=== CONTINUATION MODE ==="
echo "Found existing task at: $TASK_DIR"
# Show progress summary
TOTAL=$(grep -c '^\- \[' "$TASK_DIR/task_list.md" 2>/dev/null || echo "0")
DONE=$(grep -c '^\- \[x\]' "$TASK_DIR/task_list.md" 2>/dev/null || echo "0")
echo "Progress: $DONE/$TOTAL tasks completed"
# Show recent progress notes
echo ""
echo "=== Recent Progress ==="
head -50 "$TASK_DIR/task_list.md"
else
echo "=== NEW TASK MODE ==="
echo "Creating new task at: $TASK_DIR"
mkdir -p "$TASK_DIR"
fiStep 3: Choose Agent Mode
For NEW Tasks (Initializer Mode)
If task_list.md does NOT exist in the task directory:
SKILL_DIR="${CLAUDE_PLUGIN_ROOT}/skills/autonomous-skill"
TASK_DIR=".autonomous/$TASK_NAME"
# Read the initializer prompt template
INITIALIZER_PROMPT=$(cat "$SKILL_DIR/templates/initializer-prompt.md")
# Execute initializer session
claude -p "Task: $USER_TASK_DESCRIPTION
Task Directory: $TASK_DIR
$INITIALIZER_PROMPT" \
--output-format stream-json \
--max-turns 50 \
--append-system-prompt "You are the Initializer Agent. Create task_list.md and progress.md in $TASK_DIR directory."For CONTINUATION (Executor Mode)
If task_list.md EXISTS in the task directory:
SKILL_DIR="${CLAUDE_PLUGIN_ROOT}/skills/autonomous-skill"
TASK_DIR=".autonomous/$TASK_NAME"
# Read the executor prompt template
EXECUTOR_PROMPT=$(cat "$SKILL_DIR/templates/executor-prompt.md")
# Read current state
TASK_LIST=$(cat "$TASK_DIR/task_list.md")
PROGRESS=$(cat "$TASK_DIR/progress.md" 2>/dev/null || echo "No previous progress notes")
# Execute executor session
claude -p "Continue working on the task.
Task Directory: $TASK_DIR
Current task_list.md:
$TASK_LIST
Previous progress notes:
$PROGRESS
$EXECUTOR_PROMPT" \
--output-format stream-json \
--max-turns 100 \
--append-system-prompt "You are the Executor Agent. Complete tasks and update files in $TASK_DIR directory."Step 4: Auto-Continue Loop
After each session completes, check remaining tasks and auto-continue:
#!/bin/bash
TASK_DIR=".autonomous/$TASK_NAME"
AUTO_CONTINUE_DELAY=3
SESSION_NUM=1
while true; do
echo ""
echo "=========================================="
echo " SESSION $SESSION_NUM - Task: $TASK_NAME"
echo "=========================================="
# Run the appropriate agent
# ... execute session ...
# Check completion
if [ -f "$TASK_DIR/task_list.md" ]; then
TOTAL=$(grep -c '^\- \[' "$TASK_DIR/task_list.md" 2>/dev/null || echo "0")
DONE=$(grep -c '^\- \[x\]' "$TASK_DIR/task_list.md" 2>/dev/null || echo "0")
echo ""
echo "=== Progress: $DONE/$TOTAL tasks completed ==="
if [ "$DONE" -eq "$TOTAL" ] && [ "$TOTAL" -gt 0 ]; then
echo ""
echo "All tasks completed! Exiting."
break
fi
fi
# Auto-continue with delay
echo ""
echo "Continuing in $AUTO_CONTINUE_DELAY seconds... (Press Ctrl+C to pause)"
sleep $AUTO_CONTINUE_DELAY
SESSION_NUM=$((SESSION_NUM + 1))
doneStep 5: Report Progress
After execution, display a clear progress report:
==========================================
SESSION COMPLETE - Task: build-rest-api
==========================================
Task Directory: .autonomous/build-rest-api/
Tasks completed this session:
- [x] Task 5: Implement user authentication
- [x] Task 6: Add login form validation
Overall Progress: 18/50 tasks (36%)
Next tasks:
- [ ] Task 7: Create password reset flow
- [ ] Task 8: Add session management
Continuing in 3 seconds... (Press Ctrl+C to pause)Usage Examples
Example 1: Start New Task
User: Please use autonomous skill to build a REST API for a todo app
Response:
1. Generated task name: "build-rest-api-todo"
2. Created directory: .autonomous/build-rest-api-todo/
3. Running Initializer Agent...
4. Created task_list.md with 25 tasks
5. Progress: 3/25 completed
6. Auto-continuing in 3 seconds...Example 2: Continue Existing Task
User: Continue the autonomous task "build-rest-api-todo"
Response:
1. Found task: .autonomous/build-rest-api-todo/
2. Current progress: 15/25 tasks
3. Running Executor Agent...
4. Completed tasks 16-17
5. Progress: 17/25 completed
6. Auto-continuing in 3 seconds...Example 3: List All Tasks
# List all autonomous tasks
ls -la .autonomous/
# Show progress for specific task
cat .autonomous/build-rest-api-todo/task_list.mdKey Files
For each task in .autonomous/<task-name>/:
| File | Purpose |
task_list.md | Master task list with checkbox progress |
progress.md | Session-by-session progress notes |
Important Notes
- Task Isolation: Each task has its own directory, no conflicts
- Task Naming: Auto-generated from description (lowercase, hyphens)
- Task List is Sacred: Never delete or modify descriptions, only mark
[x] - One Task at a Time per Session: Focus on completing tasks thoroughly
- Auto-Continue: Sessions auto-continue with 3s delay; Ctrl+C to pause
Troubleshooting
| Issue | Solution |
| Task not found | Check .autonomous/ for existing tasks |
| Multiple tasks | Specify task name explicitly |
| Session stuck | Check progress.md in task directory |
| Need to restart | Delete task directory and start fresh |
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- myysophia/codex-config★ 19526% same
Wrote their own version · 2
- hansai-art/hans-sleep-yolo-mode★ 18same name
- andrasp/claude-code-flow★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository125 other files it gives its agents.
- skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- skills/vercel-react-native-skills/AGENTS.mdAGENTS.md
- address-sanitizerSkill
- aflppSkill
- algorand-vulnerability-scannerSkill
- algorithmic-artSkill
- ask-questions-if-underspecifiedSkill
- atherisSkill
- audit-context-buildingSkill
- audit-prep-assistantSkill
- aws-skillsSkill
- better-authSkill
- brainstormingSkill
- brand-guidelinesSkill
- burpsuite-project-parserSkill
- cairo-vulnerability-scannerSkill
- canvas-designSkill
- cargo-fuzzSkill
- changelog-generatorSkill
- claude-in-chrome-troubleshootingSkill
- cloudflare-skillsSkill
- code-maturity-assessorSkill
- codeqlSkill
- codex-skillSkill
- constant-time-analysisSkill
- constant-time-testingSkill
- cosmos-vulnerability-scannerSkill
- coverage-analysisSkill
- d3js-visualizationSkill
- db-resetSkill
- deep-researchSkill
- deploySkill
- dev-startSkill
- differential-reviewSkill
- dispatching-parallel-agentsSkill
- doc-coauthoringSkill
- doc-generateSkill
- documentationSkill
- docxSkill
- dwarf-expertSkill
- entry-point-analyzerSkill
- env-checkSkill
- executing-plansSkill
- expo-skillsSkill
- finishing-a-development-branchSkill
- firebase-apk-scannerSkill
- fix-reviewSkill
- frontend-designSkill
- fuzzing-dictionarySkill
- fuzzing-obstaclesSkill
- git-automationSkill
- google-design-mdSkill
- guidelines-advisorSkill
- harness-writingSkill
- health-checkSkill
- huggingface-skillsSkill
- insecure-defaultsSkill
- internal-commsSkill
- interpreting-culture-indexSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

