con un clic
github-code-mod
Make code modifications in a GitHub repository using the gh CLI.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Make code modifications in a GitHub repository using the gh CLI.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Answer questions from GitHub issue or PR comments using the gh CLI.
Perform code review on a GitHub pull request using the gh CLI.
Guide for authoring and implementing ExecPlans — self-contained execution plans that enable any agent or novice to deliver a working feature. Use when planning complex work, writing design docs, or creating step-by-step implementation guides.
Basado en la clasificación ocupacional SOC
| name | github-code-mod |
| description | Make code modifications in a GitHub repository using the gh CLI. |
| user-invocable | false |
You received a request to modify code in a GitHub repository. Your job is to understand the request fully, make the changes, and submit a PR.
What you CAN do:
What you CANNOT do:
Before executing, verify gh is installed and authenticated:
gh --version
If not installed, tell the user:
ghCLI is required. Install it: https://cli.github.com/
If the message includes a <gh_account> tag, switch to that account first:
gh auth switch --user <account>
The message contains XML-tagged sections:
| Tag | Content |
|---|---|
<event_type> | Event type: pr_comment, issue_comment, etc. |
<trigger_context> | Human-readable description of what triggered this |
<trigger_username> | Who requested the change |
<is_pr> | true if triggered from a PR, false if from an issue |
<repo> | Repository name (owner/repo) |
<gh_account> | GitHub account for gh auth switch (optional) |
<comment_id> | ID of the triggering comment (optional) |
<pr_metadata> | PR summary: number, title, state, stats, branch, URL (if PR) |
<issue_metadata> | Issue summary: number, title, state, labels, URL (if issue) |
<pr_body> | Full PR description (pre-fetched, if PR) |
<issue_body> | Full issue description (pre-fetched, if issue) |
<trigger_comment> | The modification instruction (mention and command stripped) |
<instructions> | Step-by-step instructions and gh command hints |
If <comment_id> is present, run:
gh api repos/<owner>/<repo>/issues/comments/<comment_id>/reactions \
--method POST --field content=eyes
If the reaction fails, continue the task.
Post the final GitHub comment with --body-file. Keep it short and include: status, what changed, validation, and any blocker or next step.
If <comment_id> is present, run after the final GitHub comment is posted:
gh api repos/<owner>/<repo>/issues/comments/<comment_id>/reactions \
--method POST --field content=rocket
If the reaction fails, do not block completion.
You MUST fully understand the request and the codebase before writing any code.
<pr_body> or <issue_body> — the full description, no need to re-fetch<pr_metadata> or <issue_metadata> — summary stats<trigger_comment> — the specific instruction# For issues:
gh issue view <number> --repo <owner/repo> --comments
# For PRs:
gh pr view <number> --repo <owner/repo> --comments
gh pr diff <number> --repo <owner/repo>
gh api repos/<owner>/<repo>/commits/<sha> --jq '{message: .commit.message, files: [.files[] | {filename, status, additions, deletions}]}'
gh issue view <referenced-number> --repo <owner/repo> --comments
ghIf the repository is not already present in your workspace, you MAY and SHOULD fetch it with gh before making changes:
gh repo clone <owner/repo>
cd <repo>
If you already have a local checkout, reuse it instead of cloning again.
If the target directory already exists, clone into a fresh directory name:
gh repo clone <owner/repo> <repo>-tmp
cd <repo>-tmp
README.md — project overview, tech stack, build/test commands, dependenciesCLAUDE.md / AGENTS.md — AI agent conventions, golden rules, coding standards. You MUST follow these if present.docs/ directory — architecture docs, design docs, guidespackage.json / Makefile / Cargo.toml etc. — build commands, test commandscat <file-path>
cat <related-file-path>
grep -r "<function-name>" src/
Understand: how the code is called, naming conventions, import/export patterns, error handling, test patterns.
Run Immediate Feedback if <comment_id> exists
Follow Context Gathering (CRITICAL — Do NOT Skip) before making any changes
Set up your branch — check the <branch_strategy> tag:
checkout_pr: check out the existing PR branch:
gh pr checkout <number> --repo <owner/repo>
new_branch: identify the base branch and create a new one:
git remote show origin | grep 'HEAD branch'
git checkout -b claw/<short-description>
Plan your changes — list the files you'll modify and why
Make the changes — keep them minimal and focused on the request
Verify your changes:
git diff
npm run check 2>/dev/null || npx tsc --noEmit 2>/dev/null || true
npm test 2>/dev/null || make test 2>/dev/null || cargo test 2>/dev/null || true
npm run lint 2>/dev/null || true
Commit and push:
git add <changed-files>
git commit -m "<type>: <description>"
git push -u origin claw/<short-description>
Use conventional commit types: fix:, feat:, refactor:, docs:, test:, chore:
Create a PR:
gh pr create --repo <owner/repo> \
--title "<concise title>" \
--body "$(cat <<'EOF'
## Summary
<What this PR does and why>
## Changes
- <list of changes>
## Related
Closes #<issue-number>
---
Automated by [OpenClaw](https://openclaw.ai)
EOF
)"
Draft exactly one final status comment in Markdown
Post the final comment on the original thread:
<is_pr> is true:
gh pr comment <number> --repo <owner/repo> --body-file /tmp/github-code-mod-comment.md
<is_pr> is false:
gh issue comment <number> --repo <owner/repo> --body-file /tmp/github-code-mod-comment.md
Run Completion Reaction if <comment_id> exists
You MUST always leave one final GitHub comment before finishing. Even if anything fails or is blocked, you still must post the final comment.
.env files or other sensitive configuration