Agent skill
long-running-agent
Framework for building AI agents that work effectively across multiple context windows on complex, long-running tasks. Use when building agents for multi-hour/multi-day projects, implementing persistent coding workflows, creating systems that need state management across sessions, or when an agent needs to make incremental progress on large codebases. Provides initializer and coding agent patterns, progress tracking, feature management, and session handoff strategies.
Install this agent skill to your Project
npx add-skill https://github.com/refly-ai/skill-to-workflow/tree/main/skills-source/zijiebijiben/long-running-agent
SKILL.md
Long-Running Agent Framework
Framework for enabling AI agents to work effectively across many context windows on complex tasks.
Core Problem
Long-running agents must work in discrete sessions where each new session begins with no memory of previous work. Without proper scaffolding, agents tend to:
- One-shot attempts - Try to complete everything at once, running out of context mid-implementation
- Premature completion - See partial progress and declare the job done
- Undocumented states - Leave code in broken or undocumented states between sessions
Two-Agent Solution
1. Initializer Agent (First Session Only)
Sets up the environment with all context future agents need:
- Create
init.shscript for environment setup - Generate comprehensive
feature_list.jsonwith all requirements - Initialize
claude-progress.txtfor session logging - Make initial git commit
See references/initializer-prompt.md for the full prompt template.
2. Coding Agent (Every Subsequent Session)
Makes incremental progress while maintaining clean state:
- Read progress files and git logs to get bearings
- Run basic tests to verify working state
- Work on ONE feature at a time
- Test end-to-end before marking complete
- Commit progress with descriptive messages
- Update progress file
See references/coding-prompt.md for the full prompt template.
Session Startup Sequence
Every coding agent session should begin:
1. pwd # Understand working directory
2. cat claude-progress.txt # Read recent progress
3. cat feature_list.json # Check feature status
4. git log --oneline -20 # Review recent commits
5. ./init.sh # Start dev environment
6. <run basic test> # Verify app works
7. <select next feature> # Choose one failing feature
Key Files
feature_list.json
Comprehensive list of all features with pass/fail status. Use JSON format to prevent inappropriate edits.
{
"features": [
{
"category": "functional",
"description": "User can create new chat",
"steps": ["Navigate to main", "Click New Chat", "Verify creation"],
"passes": false
}
]
}
Template: assets/feature_list_template.json
claude-progress.txt
Session-by-session log of work completed. Each entry includes:
- Session timestamp
- Features worked on
- Changes made
- Current state
- Next steps
Template: assets/progress_template.md
init.sh
Environment setup script that:
- Installs dependencies
- Starts development servers
- Sets up any required services
Critical Rules
For Feature List
- Never remove or edit test descriptions
- Only change
passesfield status - Mark as passing ONLY after end-to-end verification
For Progress Tracking
- Always commit before session end
- Write descriptive commit messages
- Update progress file with summary
- Leave environment in mergeable state
For Testing
- Use browser automation for web apps (Puppeteer MCP)
- Test as a human user would
- Verify end-to-end, not just unit tests
- Document any known limitations
Common Failure Modes & Solutions
| Problem | Solution |
|---|---|
| Agent one-shots entire project | Create detailed feature list, work one at a time |
| Declares victory too early | Check feature_list.json for failing tests |
| Leaves broken state | Run basic test at session start, fix first |
| Marks features done prematurely | Require end-to-end browser testing |
| Wastes time figuring out setup | Read init.sh, use established patterns |
Adapting to Other Domains
This framework generalizes beyond web development. Key principles:
- Comprehensive task decomposition - Break work into testable units
- Progress persistence - Maintain state across sessions
- Incremental verification - Test after each change
- Clean handoffs - Leave work in resumable state
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
distinctive-frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
agent-md-generator
交互式生成 GitHub Copilot agents.md 文件的工作流。当用户请求创建代理、构建自定义 Copilot 代理、生成 agents.md 或需要帮助配置 GitHub Copilot 自定义代理时使用。触发短语包括"创建代理"、"生成 agent.md"、"做一个文档代理"、"生成测试代理"等涉及 GitHub Copilot 代理配置的请求。
httpie-api-test
API 接口测试工作流,使用 HTTPie 作为核心工具。当用户需要测试 API 接口、执行接口调用、生成测试报告、管理接口依赖关系、或在项目中建立标准化的接口测试流程时使用此 skill。适用于 RESTful API 测试、接口联调、回归测试等场景。
sdd-development
Specification-Driven Development (SDD) methodology for building software where specifications are executable and drive code generation. Use when users want to: (1) Create feature specifications with /speckit.specify, (2) Generate implementation plans with /speckit.plan, (3) Create executable tasks with /speckit.tasks, (4) Follow test-first, library-first development, or (5) Implement constitutional architecture principles. Essential for structured AI-assisted development workflows.
notebooklm
Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.
github-actions-ssh-deploy
交互式配置 GitHub Actions 通过 SSH 密钥连接 VPS 的向导。当用户需要设置 GitHub Actions 部署到 VPS、配置 CI/CD SSH 连接、生成部署 workflow 时使用此 skill。通过问答方式收集必要信息后生成完整配置。
Didn't find tool you were looking for?