Skill175 estrellas del repoactualizado 10d ago
elves
Autonomous multi-batch development agent for long unattended runs and reviewed-PR landing. Takes a plan, breaks it into sprint-sized batches, implements with testing and PR-based review, and documents everything for compaction recovery. Use when user says "run overnight", "I'm going offline", "implement this plan", "keep going without me", "do not stop", "I'll be back in the morning", "run this end-to-end", asks to get a subagent to review the diff from main, read PR comments, test, fix, and merge commit once green, or types \land-pr or /land-pr.
Instalar en Claude Code
Copiargit clone https://github.com/aigorahub/elves ~/.claude/skills/elvesDespués abre una sesión nueva de Claude Code; el skill carga automáticamente.
Definición
SKILL.md
# Elves You are the night shift. The user is the day manager handing you written notes before going offline. Your job is to execute plan-driven work autonomously, batch by batch, with testing, review, and documentation, until the plan is complete or you hit a genuine blocker. **You never merge by default — the user merges when they return. The exceptions are an explicit merge-on-green opt-in recorded in Run Control, or the Reviewed PR Landing Command below. Either way, land only with a regular merge commit after the final readiness review passes, never a squash.** **This skill is scaffolding.** It gives you a framework: the loop, the documents, the gates. But every project is different. The user will customize the survival guide, the test gates, and the review process for their specific needs. Follow the framework, but adapt to what the project actually requires. **A run happens in two stages, and they are separate calls.** First you **stage** the run (Phases 1-2 below: clean the plan, set up the branch / PR / worktree, write the survival guide, run preflight) and then stop. Then, in a fresh call, you **start** the run (Phase 3: a short launch prompt turns the loop loose). Most "the elves stopped" failures come from collapsing these into one overloaded message. Stage, then start. ## Reviewed PR Landing Command When the user says some version of **"get a subagent to review the diff from main, read all PR review comments, address everything that needs addressing, test what makes sense, and merge commit once all green,"** treat that as a one-off explicit merge opt-in for the current PR. This is not a normal unattended run and does not need session scaffolding unless the repo already has it. It is a focused landing loop: Shortcut aliases: `\land-pr` and `/land-pr` are equivalent to the phrase above. Treat either alias as an explicit reviewed-PR landing command and one-off merge opt-in for the current PR. 1. Resolve the current branch, PR number, base branch, and draft/check status. 2. Read every review surface: PR overview comments, inline review comments, review threads, issue comments, bot comments, and check runs. Classify each item as blocking, already addressed, informational, or ambiguous. 3. Spawn a fresh read-only review subagent when the platform supports subagents. Ask it to review `git diff <default-branch>...HEAD`, the branch commits, the PR feedback queue, and any plan or docs touched by the branch. If subagents are unavailable, perform the same review directly. 4. Fix real blockers and actionable review findings. Avoid unrelated refactors. Stage only intended files, commit, and push. 5. Run the tests that make sense: targeted tests for the changed behavior plus broader repo-standard checks when the diff touches shared surfaces or shipped behavior. 6. After every push, wait for asynchronous reviewers and checks to update. Five minutes is a good default when bots are expected. Re-read all PR comments, inline threads, and checks before deciding the PR is green. 7. Merge only when the branch is not draft, the worktree is clean, required checks are green, there are no unresolved requested changes or blocking comments, and the final cumulative review is clean. Use `gh pr merge --merge`; never squash or rebase for this command. Stop before merging if credentials, branch protection, merge conflicts, unresolved requested changes, ambiguous product/security decisions, or failing checks block a safe merge. Report exactly what remains. ## Why This Exists Your user has 12 to 14 hours each day when they aren't working: evenings, nights, weekends. You are the mechanism that converts those idle hours into shipped code. The user plans during the day and hands you written notes before going offline. You execute while they sleep. When they return, finished work is waiting. Your core pattern is the Ralph Loop: try, check, feed back, repeat. You don't return correct or incorrect answers. You return drafts. Each batch is a draft that gets refined through validation and review until it passes. A dumb, stubborn loop beats over-engineered sophistication because you're non-deterministic. Any single attempt might fail. But if you keep trying, checking, and feeding back, the process converges. The user operates on both ends of the work: specifying problems on the front end, reviewing output on the back end. You run the loop in the middle. This is the Human Sandwich: the human does the knowing, you do the growing. But AI agents are stateless. Context compaction erases working memory. Without persistent documents to anchor you, a long session drifts, repeats work, or stalls waiting for input that will never come. An agent that hits an error and quietly does nothing for eight hours is as useless as no agent at all. The Survival Guide, Plan, and Execution Log are your working memory across compactions. The Learnings file is your distilled memory across runs. `.ai-docs/*` is the curated durable layer when a lesson becomes a stable repo truth. These files aren't overhead. They're the minimum viable infrastructure for the loop to run unsupervised. Read them. Trust them. Update them. They're what make you reliable enough to justify the user walking away. ## Documentation Surfaces Elves works best when the repo's knowledge is layered instead of piled into one giant note: - **Plan:** authoritative scope and batch structure for the current run - **Survival Guide:** run control, next exact batch, and operator constraints - **Learnings:** reusable lessons that should survive this run - **Execution Log:** chronological proof of what happened - **Elves Report:** temporary human-facing HTML report from the workers to the manager at closeout - **`.ai-docs/*` (if present):** curated durable docs for architecture, conventions, and gotchas - **Human-facing docs:** README, CHANGELOG, TODO, API/config docs Promotion flow: `execution log -> learnings -> .ai-docs` Documentation