← Back to list
List Workflows (
List Workflow Runs (
View a Workflow Run (
Cancel a Run (
Trigger a Workflow (
Monitor a Run (

gh-workflows
by MHolmes91
A collection of agents, sub-agents, commands, and skills (using openskills) to enhance an opencode agent's ability to work with GitHub
⭐ 3🍴 0📅 Dec 26, 2025
SKILL.md
name: gh-workflows description: Manage GitHub Actions workflows with the gh CLI (list, run, cancel, monitor).
When to Use
Use this skill whenever you need to inspect, trigger, or stop GitHub Actions workflows. It wraps gh workflow and gh run commands so you can keep CI pipelines healthy without leaving the terminal.
Prerequisites
ghCLI authenticated withgh auth login --scopes repo,workflow. Confirm viagh auth status.jqavailable to pretty-print JSON results.- Environment:
GITHUB_REPOSITORY(owner/name). Ask for it if missing.GITHUB_TOKEN(gh uses it automatically once authenticated).DEFAULT_BRANCH(fallback for manual dispatches; default tomain).
Common Parameters
--repo "$GITHUB_REPOSITORY"is required for every command.--json ... --jq '.'returns machine-friendly payloads.- When scripts provide
workflownames, accept either filename (deploy.yml) or workflow ID.
Procedures
List Workflows (/workflows-list)
- Run:
gh workflow list --repo "$GITHUB_REPOSITORY" --limit ${LIMIT:-20} --json id,name,path,state. - Use
jqto format the response. - Summarize key fields: name, path, state, and id so downstream commands can use them.
List Workflow Runs (/workflows-runs)
- Require a workflow identifier.
- Optional filters:
- Branch:
--branch ${BRANCH}(omit if empty). - Status:
--status ${STATUS:-all}.
- Branch:
- Command:
gh run list --repo "$GITHUB_REPOSITORY" \ --workflow "$WORKFLOW" \ ${BRANCH:+--branch "$BRANCH"} \ --status ${STATUS:-all} \ --limit ${LIMIT:-20} \ --json databaseId,workflowName,displayTitle,headBranch,status,conclusion,createdAt - Pipe to
jq '.'and surface the most recent run id for convenience.
View a Workflow Run (/workflows-view)
- Accept a
run_id(numeric or URL) and optional--logflag. - Command:
gh run view "$RUN_ID" --repo "$GITHUB_REPOSITORY" \ --json databaseId,workflowName,displayTitle,event,headBranch,status,conclusion,logsUrl,htmlUrl - Share the JSON and hyperlink to
logsUrl/htmlUrlfor quick navigation.
Cancel a Run (/workflows-cancel)
- Confirm the run is in
in_progressorqueuedstate (usegh run view). - Command sequence:
gh run cancel "$RUN_ID" --repo "$GITHUB_REPOSITORY" gh run watch "$RUN_ID" --repo "$GITHUB_REPOSITORY" --exit-status || true - Report the final status (cancelled/completed). If already finished, note that cancellation was skipped.
Trigger a Workflow (/workflows-trigger)
- Require workflow file/ID plus ref/branch.
- Compose inputs:
EXTRA_INPUTS=${INPUTS_JSON:+--inputs "$INPUTS_JSON"} gh workflow run "$WORKFLOW" --repo "$GITHUB_REPOSITORY" --ref "${REF:-${BRANCH:-$DEFAULT_BRANCH}}" $EXTRA_INPUTS - Capture the run id from gh output and share it for monitoring.
Monitor a Run (/workflows-monitor)
- Command:
gh run watch "$RUN_ID" --repo "$GITHUB_REPOSITORY" --exit-status. - Stream output back. At completion, annotate whether the run concluded with success, failure, or cancellation.
Safety Checks
- Never cancel or rerun workflows outside the configured repo.
- If a command fails due to missing repo/ref, prompt the user for the missing data before retrying.
- Treat manual dispatch inputs carefully—validate JSON before passing
--inputs.
Score
Total Score
65/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
3ヶ月以内に更新
+5
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon

