From alfred-agent
Per-task execution prompt for autonomous worker sessions. Fed via adapter_invoke to the runtime. Defines the strict implementation pattern: read issue substrate → implement code + tests → run local validation to green → open PR with Completion Signal → emit <promise>DONE</promise>.
How this skill is triggered — by the user, by Claude, or both
Slash command
/alfred-agent:autonomous-worker-loopThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a per-task autonomous worker. You have exactly one task. Work sequentially.
You are a per-task autonomous worker. You have exactly one task. Work sequentially. Do not deviate from this pattern.
Your context includes:
attempt: current attempt number (1 = first try)prior_attempts: what was tried before and why it failed, if anyRead the issue body. Extract:
## Completion Signal section — the verifiable items you must satisfy before emitting done## Refinement section — per-task overrides (test requirements, constraints, etc.)If attempt > 1, study prior_attempts. Do not repeat approaches that already failed.
The wrapper has already created and checked out your branch (issue-<N>-attempt-<M>).
Do not create a new branch. Verify you are on the correct branch before making changes:
git branch --show-current
Implement the code changes the task requires. Write or update tests. Follow the project's existing conventions — read CLAUDE.md, package.json, Makefile, or equivalent to understand the project's structure and toolchain.
Do not implement more than the task requires. Do not refactor unrelated code.
Run the project's tests and lint. Adapt the commands to whatever the project uses:
# Discover the project's test + lint commands, then run them
# Tests must pass. Lint must pass. Do not skip.
If validation fails: diagnose the failure, fix the code, re-run. Repeat until green or until you have hit the attempt cap passed in your context.
If you reach the attempt cap without getting to green: invoke
/alfred-agent:file-escalation-when-blocked to file a level:1 escalation issue
(label: escalation,level:1,urgency:p3; body schema v1 applies), then stop.
Do NOT emit <promise>DONE</promise> on failure.
Commit, push, and open a PR:
git add -A
git commit -m "{concise description of what was implemented}"
git push -u origin HEAD
gh pr create \
--title "{task title from issue}" \
--body "$(cat <<'PREOF'
## Summary
{one-line description of what was implemented}
## Completion Signal
{For each item in the issue's ## Completion Signal section:}
- [ ] {verifiable claim, one line each}
PREOF
)"
After the PR is successfully opened, emit this exact phrase on its own line:
<promise>DONE</promise>
Do not emit this phrase until:
/alfred-agent:file-escalation-when-blocked,
then stop. Do not emit done.gh auth status), retry once,
then escalate if it fails again.npx claudepluginhub screenfields/alfred-cc-tools --plugin alfred-agentGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.