auto_task.execute_remotely_with_single_pr
Execute a sequence of tasks by dispatching them to Claude on GitHub
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- model
- haiku
- description
- Execute a sequence of tasks by dispatching them to Claude on GitHub
03 SKILL.md 正文
Goal
- Execute a well-specified task
<FILE>by delegating it to Claude running remotely on GitHub (theclaude-code-actionGitHub Action), instead of implementing it in this session - The task becomes its own GitHub issue, branch, and draft PR, so the remote run is independent and proceed asynchronously, without a local checkout doing the work
- A task's whole spec lands in a single PR: Claude on GitHub may push multiple commits for different parts of the spec, but must never open a second PR for the same task
- Follow
.claude/skills/auto_task.rules.mdfor how tasks are queued, specified, and named before they reach this skill
Inputs
<FILE>or a GitHub issue already filed (e.g., #580 or https://github.com/gpsaggese/gpsaggese.github.io/issues/580)
When to Use This Skill
- Use it when tasks are specified clearly enough to hand to an unattended agent and do not need local interactivity, a local Docker container, or hands-on debugging
- Prefer
.claude/skills/auto_task.execute_interactively/SKILL.mdwhen tasks are exploratory or need a tight local feedback loop between runs - Prefer
.claude/skills/auto_task.execute_with_stacked_prs/SKILL.mdwhen tasks form a real dependency chain and must be branched from each other, not run independently - Follow
.claude/skills/auto_task.rules.mdsection "Ask for Clarification Before Executing an Unclear Plan" when a task's spec is unclear or incomplete: do not let a remote run build on top of a guess
Conventions
- Follow
.claude/skills/auto_task.rules.mdfor queue, spec, naming, and coding/testing conventions: they apply to whatever code Claude on GitHub writes, even though it runs remotely and not in this session - Claude on GitHub only starts on an explicit
@claudemention in an issue's title or body, or in a comment on an issue or PR, perhelpers_root/.github/workflows/claude.yml- Assigning the GH issue (
--gh_assignee) does not by itself trigger a run
- Assigning the GH issue (
Constraints
- Do not implement a task's code yourself: dispatch it to Claude on GitHub, then only monitor and report on the resulting run and PR
- Do not commit, push, or amend the branch created for a task: that branch is Claude on GitHub's to push to, and merging it is the user's decision
- Keep one PR per task: multiple commits on that PR's branch are fine when the spec has several parts, but never open a second issue/branch/PR for a task already dispatched
Workflow
Create Issue, if Needed
- If the GitHub issue has not been filed, then create it
Confirm the Task List
-
Read
<FILE>, wrapped around the task list like# Title <TITLE> # Goal <High level goal> # Workflow ### [ ] <Goal of first task> - <Change 1> - <Change 2> ### [ ] <Goal of second task> - <Change 1> - <Change 2> -
Follow
.claude/skills/auto_task.rules.mdsection "Confirm the Task List Before Executing" for the task list format and the problem/solution check -
Keep
<FILE>updated per that file's section "Track Task Status":[.]means dispatched with the remote run not finished,[x]means the PR is ready for human review
Create the Issue, Branch, and Draft PR
-
On the local checkout create the issue and a draft PR for the task, named per
.claude/skills/auto_task.rules.md> git_create_issue_and_branch.py \ --gh_issue_title "<TITLE>" \ --gh_issue_body_file <FILE>- By default this only opens a branch/PR in the outer repo; pass
--submoduleswhen the task also touches a submodule, per.claude/skills/auto_task.rules.md - With
--submodules, once a PR exists in more than one repo this call also refreshes the issue's## Companion PRssection automatically: no separate--update_pr_linksstep is needed here since the PR is created immediately, not deferred
- By default this only opens a branch/PR in the outer repo; pass
-
Return to
masteronce the branch and draft PR exist: the implementation happens on GitHub, not in this checkout> git checkout master
Trigger Claude on GitHub
-
Post the task's spec as a PR comment with an explicit
@claudemention, sohelpers_root/.github/workflows/claude.ymlpicks it up> gh pr comment <PR_NUM> --body "Assigned to @claude"
Monitor Each Remote Run
-
Find the
claude.ymlrun that the comment triggered> gh run list --workflow=claude.yml --branch <BRANCH> --limit 1 -
Watch it to completion
> gh run watch <RUN_ID> -
If a run fails, read its log and decide whether the fix belongs in a follow-up
@claudecomment or needs the user's input, and report which
Verify Each Resulting PR
-
Once a run succeeds, confirm the PR actually changed, not just replied in a comment
> gh pr view <PR_NUM> --json commits,additions,deletions- Multiple commits on this one PR are fine, e.g. one per part of a multi-part spec
- If a follow-up
@claudecomment ever produces a second PR for the same task, close the extra PR and keep the original: one PR per task, no exceptions
-
Get the PR's CI to pass following
.claude/skills/github.get_pr_to_pass_ci_tests/SKILL.md -
Mark the task
[x]in<FILE>only once its PR is ready for human review
Report the Queue
- Report one list back to the user: task, issue, PR link, and run status, for every
task in
<FILE>, so the whole batch can be reviewed at once
Verification
- [ ] Every dispatched task has its own GH issue, branch, and exactly one PR
- [ ] No task ended up with more than one PR (multiple commits on the same PR are fine)
- [ ] Every dispatch comment contains an explicit
@claudemention - [ ] No task's code was implemented locally in this session
- [ ] Every task's status in
<FILE>reflects its actual remote progress ([ ],[.], or[x]) - [ ] The final report lists every task with its issue, PR link, and run status
04 同仓库更多 Skills
tutorial_in_60_mins.propagate_docker_changes
Sync tutorial and class-project Docker files to match project_template
tutorial_in_60_mins.merge_markdown
Merge the content of a markdown file into a Jupyter notebook
tutorial_in_60_mins.format
Format a directory to follow the "Learn X in 60 Minutes" tutorial conventions
tutorial_in_60_mins.create
Create a tutorial directory for the Learn X in 60 Minutes conventions
todo.reorg_in_progress
Reorganize ai_task_queue.md so in-progress tasks, not-started tasks, and mislabeled topic headers sit under the right H1 stage
todo.reorg_headers
Reorganize ai_task_queue.md .md so every H2 topic matches ALL TOPICS and every H3 task sits under the right topic, keeping its H1 stage