원클릭으로
work-loop
Autonomous work loop — pick one backlog issue, execute it, close it, exit. Re-invoked by scheduler for the next.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Autonomous work loop — pick one backlog issue, execute it, close it, exit. Re-invoked by scheduler for the next.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | work-loop |
| description | Autonomous work loop — pick one backlog issue, execute it, close it, exit. Re-invoked by scheduler for the next. |
| allowed-tools | Bash, Read, Write, Edit, Glob, Grep, Agent, Skill |
| automation | autonomous |
| schedule | 0 9 * * * |
| user-invocable | true |
| metadata | {"version":"1.3","created":"2026-04-14T00:00:00.000Z","updated":"2026-05-03T00:00:00.000Z","author":"Ability.ai","changelog":["1.3: Add Single-Task Rule — each invocation handles exactly one issue per context window","1.2: Adopt the issue-driven development workflow — picks one backlog issue, executes it, closes it, and exits for the scheduler to re-invoke","1.1: Add error handling and prerequisite checks"]} |
ℹ️ First, set expectations: before anything else, print one short line with this skill's version and its most recent change — the top entry of
metadata.changelogabove — e.g.work-loop vX.Y — recent: <summary>. Then proceed.
Autonomous skill that picks one issue from the backlog, executes it, and exits. The scheduler re-invokes it for the next issue — one issue per context window.
Run on a schedule (or manually) to autonomously advance the agent's task backlog. Each invocation handles exactly one issue, keeping context focused and noise-free. The cron handles iteration; this skill handles execution.
| Source | Location | Read | Write | Description |
|---|---|---|---|---|
| GitHub Issues | Current repo | Yes | Yes | Task backlog |
| GitHub Labels | status:, priority:, skill:* | Yes | Yes | Track status and route by skill |
| Agent Skills | .claude/skills/ | Yes | No | Available capabilities |
| CLAUDE.md | ./CLAUDE.md | Yes | No | Agent identity and guidelines |
gh CLI authenticatedgh issue list --label "status:in-progress" --state open --json number,title,body,labels --limit 1
If an issue is in-progress:
If no in-progress work, proceed to Step 2.
Find highest priority todo:
# P0 first
gh issue list --label "priority:p0" --label "status:todo" --state open --json number,title,body,labels --limit 1
# Then P1
gh issue list --label "priority:p1" --label "status:todo" --state open --json number,title,body,labels --limit 1
# Then P2
gh issue list --label "priority:p2" --label "status:todo" --state open --json number,title,body,labels --limit 1
# Then any todo
gh issue list --label "status:todo" --state open --json number,title,body,labels --limit 1
If no tasks found:
If task found:
gh issue edit $NUMBER --remove-label "status:todo" --add-label "status:in-progress"
gh issue comment $NUMBER --body "Starting work on this issue."
Parse the issue body to understand requirements. The issue should contain:
Determine execution approach:
Check for a skill:* label on the issue first:
skill:* label present: This issue requires modifying or creating a skill file — it needs human input via /sprint. Mark it blocked:
gh issue edit $NUMBER --remove-label "status:in-progress" --add-label "status:blocked"
gh issue comment $NUMBER --body "Blocked: skill development issue — requires human sprint (/sprint #$NUMBER)"
Continue to the next issue.
No skill label (project-level): Determine approach:
Add progress comments as work proceeds:
gh issue comment $NUMBER --body "Progress: $UPDATE"
Handle blockers: If the task cannot be completed:
gh issue edit $NUMBER --remove-label "status:in-progress" --add-label "status:blocked"
gh issue comment $NUMBER --body "Blocked: $REASON"
When task is done:
gh issue comment $NUMBER --body "## Completed
$SUMMARY_OF_WORK_DONE
---
*Completed by agent work-loop*"
gh issue edit $NUMBER --remove-label "status:in-progress" --add-label "status:done"
gh issue close $NUMBER --reason completed
| Error | Recovery |
|---|---|
gh not authenticated | Log error, exit — user must run ! gh auth login |
| Issue update fails | Log error, exit |
| Task execution fails | Mark issue as blocked with error details, exit |
| Network failure | Retry once, then log and exit |
Run a remote Trinity agent task in a sequential, bounded loop — a fixed number of iterations or until a stop signal, with optional response chaining. Fires server-side via run_agent_loop (caller can disconnect), then polls and renders progress. The remote, durable counterpart to Claude Code's local /loop. Add `local` to run the same bounded loop natively in this session instead — inline back-to-back iterations, or a hand-off to the built-in /loop when a cadence is given.
Make any agent a system-aware orchestrator — installs /discover-agents (discover the fleet from live Trinity and/or a repo list into a descriptive fleet/system-map.yaml), /compose-system (turn the map into a Trinity SystemManifest and deploy_system), and /orchestrate (route, fan out, and run ephemeral agents via Trinity MCP). Aligns with Trinity's existing SystemManifest; no parallel standard.
Create a new skill or playbook. Guides through requirements gathering and generates the appropriate template based on complexity.
Create an executive chief of staff agent — asks about your tools, team, and priorities, then scaffolds a Trinity-compatible agent for daily briefings, meeting prep, and decision tracking
Create a personal medical-records agent — bootstraps a profile from your existing health documents, then ingests new files, maintains structured memory, tracks lab trends, prepares doctor visits, and runs an evidence-based nutrition + supplement framework
Create a content writer agent — asks about your brand voice, platforms, and topics, then scaffolds a Trinity-compatible ghostwriter agent that writes in your voice