GitHub Workflow Automation
Install and maintain a complete issue-to-merge workflow for any GitHub repository. Maps GitHub webhook events and cron schedules into automated missions for planning, implementation, review, CI fixing, staging validation, and post-merge learning.
Workflow
- Gather project parameters from
projects/<owner>-<repo>/project.md or ask the user.
- Verify runtime prerequisites.
- Install or update mission set from templates.
- Run a dry test with
event_emit.
- Monitor outcomes and tune prompts/filters.
Parameters
Read these from the project file in workspace, or collect from the user:
repository: owner/repo (required)
maintainers: GitHub handles allowed to trigger implement/replan actions
staging_branch: default staging (or null if no staging workflow)
main_branch: default main
batch_interval_hours: default 8
Prerequisites
Before installing missions, verify:
- GitHub skill authenticated (for issue/PR/comment/status operations).
- GitHub webhook delivery configured to
POST /webhook/tools/github.
- Webhook HMAC secret configured in the secrets store as
github_webhook_secret.
- Events can also be emitted via
event_emit tool for testing.
Install Procedure
- Open
workflow-routines.md.
- For each template block:
- Replace placeholders (
{{repository}}, {{maintainers}}, branch names)
- Namespace mission names with the repo slug (e.g.
wf-issue-plan-nearai-ironclaw)
- Call
mission_create with name, goal (the prompt), and cadence (cron expression or event:<pattern>)
- If a mission already exists (check
mission_list), update rather than duplicate.
- If
staging_branch is null, skip wf-staging-batch-review.
- Write installation status to
projects/<owner>-<repo>/project.md.
- Confirm install with
mission_list.
Mission Set
Install these missions per repository:
wf-issue-plan-<slug>: on issue.opened or issue.reopened, generate implementation plan comment.
wf-maintainer-gate-<slug>: on maintainer comments, decide update-plan vs start implementation.
wf-pr-monitor-<slug>: on PR open/sync/review-comment/review, address feedback and refresh branch.
wf-ci-fix-<slug>: on CI status/check failures, apply fixes and push updates.
wf-staging-review-<slug>: every N hours, review ready PRs, merge into staging, run batch correctness analysis, fix findings, then merge staging to main.
wf-learning-<slug>: on merged PRs, extract mistakes/lessons and write to shared memory.
Event Filters
Use top-level filters for stability:
repository_name (e.g., owner/repo)
sender_login, comment_author
issue_number, pr_number
ci_status, ci_conclusion
review_state, pr_merged
Operating Rules
- All implementation work on non-main branches.
- PR loop must resolve both human and AI review comments.
- On conflicts with origin/main, refresh branch before continuing.
- Staging-batch is the only path for bulk correctness verification before mainline merge.
- Memory update runs only after successful merge.
Validation
After install, run:
event_emit with a synthetic issue.opened payload for the target repo.
- Confirm at least one mission fired.
- Check corresponding mission status.
- Confirm no unrelated missions fired.
1---
2name: github-workflow
3version: 0.1.0
4description: Install and operate a full GitHub issue-to-merge workflow for any repository using event-driven and cron missions. Handles issue planning, PR monitoring, CI fixing, staging review, and post-merge learning.
5activation:
6 keywords:
7 - github workflow
8 - CI automation
9 - PR automation
10 - automate repo
11 - issue to merge
12 - workflow setup
13 - github automation
14 patterns:
15 - "(?i)(set ?up|install|enable).*(workflow|automation) for .+/.+"
16 - "(?i)automate (this |my )?(repo|repository|PRs|CI)"
17 - "(?i)github (workflow|automation|pipeline)"
18 tags:
19 - developer
20 - github
21 - automation
22 - workflow
23 max_context_tokens: 2000
24requires:
25 skills:
26 - github
27metadata:
28 source: https://skillmd.com/skills/suyoumo/github-workflow
29---
30
31# GitHub Workflow Automation
32
33Install and maintain a complete issue-to-merge workflow for any GitHub repository. Maps GitHub webhook events and cron schedules into automated missions for planning, implementation, review, CI fixing, staging validation, and post-merge learning.
34
35## Workflow
36
371. Gather project parameters from `projects/<owner>-<repo>/project.md` or ask the user.
382. Verify runtime prerequisites.
393. Install or update mission set from templates.
404. Run a dry test with `event_emit`.
415. Monitor outcomes and tune prompts/filters.
42
43## Parameters
44
45Read these from the project file in workspace, or collect from the user:
46- `repository`: `owner/repo` (required)
47- `maintainers`: GitHub handles allowed to trigger implement/replan actions
48- `staging_branch`: default `staging` (or null if no staging workflow)
49- `main_branch`: default `main`
50- `batch_interval_hours`: default `8`
51
52## Prerequisites
53
54Before installing missions, verify:
55- GitHub skill authenticated (for issue/PR/comment/status operations).
56- GitHub webhook delivery configured to `POST /webhook/tools/github`.
57- Webhook HMAC secret configured in the secrets store as `github_webhook_secret`.
58- Events can also be emitted via `event_emit` tool for testing.
59
60## Install Procedure
61
621. Open [`workflow-routines.md`](references/workflow-routines.md).
632. For each template block:
64 - Replace placeholders (`{{repository}}`, `{{maintainers}}`, branch names)
65 - Namespace mission names with the repo slug (e.g. `wf-issue-plan-nearai-ironclaw`)
66 - Call `mission_create` with `name`, `goal` (the prompt), and `cadence` (cron expression or `event:<pattern>`)
673. If a mission already exists (check `mission_list`), update rather than duplicate.
684. If `staging_branch` is null, skip `wf-staging-batch-review`.
695. Write installation status to `projects/<owner>-<repo>/project.md`.
706. Confirm install with `mission_list`.
71
72## Mission Set
73
74Install these missions per repository:
75- `wf-issue-plan-<slug>`: on `issue.opened` or `issue.reopened`, generate implementation plan comment.
76- `wf-maintainer-gate-<slug>`: on maintainer comments, decide update-plan vs start implementation.
77- `wf-pr-monitor-<slug>`: on PR open/sync/review-comment/review, address feedback and refresh branch.
78- `wf-ci-fix-<slug>`: on CI status/check failures, apply fixes and push updates.
79- `wf-staging-review-<slug>`: every N hours, review ready PRs, merge into staging, run batch correctness analysis, fix findings, then merge staging to main.
80- `wf-learning-<slug>`: on merged PRs, extract mistakes/lessons and write to shared memory.
81
82## Event Filters
83
84Use top-level filters for stability:
85- `repository_name` (e.g., `owner/repo`)
86- `sender_login`, `comment_author`
87- `issue_number`, `pr_number`
88- `ci_status`, `ci_conclusion`
89- `review_state`, `pr_merged`
90
91## Operating Rules
92
93- All implementation work on non-main branches.
94- PR loop must resolve both human and AI review comments.
95- On conflicts with origin/main, refresh branch before continuing.
96- Staging-batch is the only path for bulk correctness verification before mainline merge.
97- Memory update runs only after successful merge.
98
99## Validation
100
101After install, run:
1021. `event_emit` with a synthetic `issue.opened` payload for the target repo.
1032. Confirm at least one mission fired.
1043. Check corresponding mission status.
1054. Confirm no unrelated missions fired.