long-running-agent
Skill1 starsChanged 50 days agoMITView on GitHub
This skill should be used when developing complex projects that span multiple sessions or context windows. It implements the Long-Running Agent Protocol based on Anthropic's recommended practices for maintaining progress across sessions using SubAgents with isolated context windows, progress tracking files, and incremental feature development.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- jaakjuu1/claude-skillstheir own version, first seen Oct 13, 2026
- mikeOnBreeze/cc-crossbeamtheir own version, first seen Oct 8, 2026
- pbc-os/smb-starter-kittheir own version, first seen Apr 8, 2026
- madeinlowcode/skills-claude-codeword for word, first seen Apr 3, 2026
- Throokie/claude-code-skillstheir own version, first seen Mar 24, 2026
- bowen31337/autonomous-agent-frameworktheir own version, first seen Jan 19, 2026
Other versions6 projects use a version of this.
Word for word · 1
- madeinlowcode/skills-claude-code★ 7100% same
Edited · 0
None found.
Wrote their own version · 5
- mikeOnBreeze/cc-crossbeam★ 297same name
- pbc-os/smb-starter-kit★ 10same name
- Throokie/claude-code-skills★ 1same name
- bowen31337/autonomous-agent-framework★ 0same name
- jaakjuu1/claude-skills★ 0same 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 repository24 other files it gives its agents.
- copywritingSkill
- design-principlesSkill
- haos-auditoria-masterSkill
- haos-claim-verificationSkill
- haos-deep-researchSkill
- haos-execution-wavesSkill
- haos-handoff-artefatoSkill
- haos-memory-provenanceSkill
- haos-memory-tripleSkill
- haos-model-routerSkill
- haos-multi-agent-reviewSkill
- haos-project-sanitationSkill
- haos-quality-gatesSkill
- haos-query-expansionSkill
- haos-research-report-writerSkill
- haos-source-quality-auditorSkill
- haos-structural-refactorSkill
- servidor-compartilhadoSkill
- session-handoffSkill
- skill-creatorSkill
- software-architectureSkill
- software-engineerSkill
- token-optimizerSkill
- unit-economicsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. 0 are common, 20 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
20
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
When delegating tasks to SubAgents for isolated execution
- Distinctive: line 15
When previous sessions lost context or progress
- Very specific: line 30
All progress is tracked in the .claude/ directory:
- Distinctive: line 44
Before any development work, execute this orientation sequence:
- Very specific: line 51
If
.claude/exists: Read progress files - Very specific: line 52
Read .claude/progress.md to understand session history
- Very specific: line 53
Read .claude/features.xml to see pending features
- Distinctive: line 54
Check git log --oneline -10 for recent commits
- Very specific: line 57
Run scripts/init_project.py or manually create structure
- Distinctive: line 59
Create initial progress.md with session #1
- Distinctive: line 62
Run development server if applicable
- Distinctive: line 64
If bugs found, fix BEFORE starting new work
- Distinctive: line 72
Before delegating to SubAgent, prepare the task file:
- Distinctive: line 123
When SubAgent responds with completion status:
- Very specific: line 126
Update .claude/features.xml - change status to "complete"
- Very specific: line 127
Update .claude/progress.md - log the completion
- Distinctive: line 135
Update task and retry OR select different feature
- Distinctive: line 139
Before ending any session:
- Distinctive: line 141
Ensure code compiles and runs
- Very specific: line 143
Update .claude/progress.md with session summary
- Distinctive: line 144
Document next steps clearly
- Distinctive: line 145
Leave environment in clean state
- Distinctive: line 175
Remove or edit feature descriptions
- Distinctive: line 179
Read progress files before any work
- Distinctive: line 181
Test thoroughly before marking complete
- Distinctive: line 182
Commit after each completed feature
- Distinctive: line 183
Update progress files after each task
- Distinctive: line 184
Leave code in functional state
“Common” is measured: kept by at least 6 in 10 of the 4 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
Long-Running Agent Protocol
This skill provides a systematic approach for developing complex projects across multiple Claude sessions, preventing context loss and maintaining consistent progress.
When to Use This Skill
- Projects expected to take multiple sessions to complete
- Complex applications with many features (50+ features)
- When delegating tasks to SubAgents for isolated execution
- When previous sessions lost context or progress
- Full-stack applications, CLI tools, or any multi-component project
Core Concepts
Master Agent vs SubAgent Architecture
The protocol uses two agent roles:
Master Agent (You): Orchestrates the project, maintains progress files, delegates tasks, and consolidates results.
SubAgents: Execute isolated tasks with their own context window, preventing hallucination. Each SubAgent receives a specific task and returns completion status.
Progress Tracking Files
All progress is tracked in the .claude/ directory:
project/
├── .claude/
│ ├── progress.md # Session history and status
│ ├── features.xml # Feature list with status
│ ├── current-task.md # Task for SubAgent execution
│ └── session-log.md # Current session activity logProtocol Workflow
Phase 1: Session Initialization (Always Execute First)
Before any development work, execute this orientation sequence:
- Check for existing progress structure
ls -la .claude/- If
.claude/exists: Read progress files- Read
.claude/progress.mdto understand session history - Read
.claude/features.xmlto see pending features - Check
git log --oneline -10for recent commits
- Read
- If
.claude/does not exist: Initialize project- Run
scripts/init_project.pyor manually create structure - Generate comprehensive feature list (minimum 50 features)
- Create initial progress.md with session #1
- Run
- Validate environment
- Run development server if applicable
- Execute basic smoke test
- If bugs found, fix BEFORE starting new work
- Select next task
- Choose ONE feature with
status="pending"from features.xml - Prioritize by
priorityattribute (high → medium → low)
- Choose ONE feature with
Phase 2: Task Preparation
Before delegating to SubAgent, prepare the task file:
- Write
.claude/current-task.mdwith:- Feature ID and description
- Acceptance criteria (checkboxes)
- Files to modify
- Technical context
- Completion signal phrase
- Example task file format:
# Current Task
## Feature: FEAT-XXX
**Description**: [Clear description]
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3
## Files to Modify
- path/to/file1.ts
- path/to/file2.ts
## Technical Context
[Relevant technical details]
## Completion Signal
When all criteria are met, respond: **TASK_COMPLETE**
If blocked, respond: **TASK_BLOCKED: [reason]**Phase 3: SubAgent Execution
Delegate the task to a SubAgent with this prompt pattern:
You are a Development SubAgent. Read .claude/current-task.md and execute the described task.
Rules:
- Work incrementally, testing each change
- Do not modify files outside the specified list
- Do not mark criteria complete until verified
- Respond TASK_COMPLETE when all criteria pass
- Respond TASK_BLOCKED: [reason] if you cannot proceedThe SubAgent works in isolation with its own context window, preventing hallucination from accumulated context.
Phase 4: Consolidation (After SubAgent Returns)
When SubAgent responds with completion status:
If TASK_COMPLETE:
- Update
.claude/features.xml- change status to "complete" - Update
.claude/progress.md- log the completion - Commit changes:
git add -A && git commit -m "Feature: FEAT-XXX - [description]" - Update
.claude/session-log.md - Return to Phase 2 for next feature OR end session
If TASK_BLOCKED:
- Log the blocker in
.claude/session-log.md - Decide: break down task further, skip, or request user input
- Update task and retry OR select different feature
Phase 5: Session End
Before ending any session:
- Ensure code compiles and runs
- Make final git commit if pending changes
- Update
.claude/progress.mdwith session summary - Document next steps clearly
- Leave environment in clean state
File Formats
progress.md Format
Reference references/progress-template.md for the complete template. Key sections:
- Current session number and date
- Features completed count
- Session history summaries
- Known issues
- Next priorities
features.xml Format
Reference references/features-template.xml for the complete template. Key attributes:
id: Unique feature identifier (FEAT-XXX)status: pending | in-progress | complete | blockedpriority: high | medium | lowsession: Session number when completed
Critical Rules
NEVER DO:
- Implement multiple features simultaneously
- Mark features complete without testing
- Skip the orientation phase
- Ignore existing bugs to add new features
- Remove or edit feature descriptions
- End session with broken code
ALWAYS DO:
- Read progress files before any work
- Work on ONE feature at a time
- Test thoroughly before marking complete
- Commit after each completed feature
- Update progress files after each task
- Leave code in functional state
Integrating with CLAUDE.md
To make this protocol permanent for a project, append the contents of assets/claude-md-append.md to the project's CLAUDE.md file. This ensures the protocol is followed in every session automatically.
Initialization
For new projects, run the initialization script:
python scripts/init_project.py --project-name "My Project" --description "Project description"This creates the .claude/ directory structure and generates an initial feature list based on the project description.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

