بنقرة واحدة
delegate-grok
Helper for delegating coding work or read-only analysis to the Grok CLI (grok-4.5).
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Helper for delegating coding work or read-only analysis to the Grok CLI (grok-4.5).
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Run a bounded multi-provider review and local repair workflow for a pull request, branch, or local diff, using fresh Codex exec threads for fixes and requiring separate authorization for every repository or PR publication action.
Clone and explore external codebases using the btx CLI. Use this skill when: - User wants to explore a GitHub repository (e.g., "explore anthropics/claude-code") - User asks how a library/framework works and you need to read its source - User wants to understand implementation details of an external project - User provides a repo URL or owner/repo and wants you to examine it - You need GitHub repository metadata (ownership, archived, last push) without curl
Address actionable GitHub pull request review feedback. Use when the user wants to inspect unresolved review threads, requested changes, or inline review comments on a PR, then implement selected fixes. Use the GitHub app for PR metadata and patch context and the thread-aware prc CLI for review state and inline comments.
Read-only triage and routing for GitHub repositories, pull requests, issues, patches, and review comments through the connected GitHub app and local git. Use for general GitHub orientation or summaries before choosing a mutation, review-fix, CI, or publishing workflow.
Fetch and analyze GitHub PR conversations, review submissions, and thread-aware code feedback using the prc CLI. Use for PR comment summaries, unresolved or outdated thread inspection, requested changes, and code-linked review context. Accepts PR numbers, PR URLs, or owner/repo format.
Create or revise a guarded, auditable implementation spec for Codex or another agent. Use only when the user explicitly invokes $goal-ready-spec or specifically asks to make a spec goal-ready.
| name | delegate-grok |
| description | Helper for delegating coding work or read-only analysis to the Grok CLI (grok-4.5). |
| disable-model-invocation | true |
Delegate the requested work to the Grok CLI with grok-4.5.
Create a per-run evidence directory:
scratch="_scratch/delegate-grok/$(date +%Y%m%d-%H%M%S)"
mkdir -p "$scratch/prompts" "$scratch/raw" "$scratch/repository"
Record the repository baseline before invoking Grok:
git status --short > "$scratch/repository/baseline-status.txt"
git diff --no-ext-diff --binary > "$scratch/repository/baseline-diff.patch"
git diff --cached --no-ext-diff --binary > "$scratch/repository/baseline-cached-diff.patch"
git ls-files --others --exclude-standard -z |
while IFS= read -r -d '' path; do
shasum -a 256 -- "$path"
done > "$scratch/repository/baseline-untracked-sha256.txt"
Choose read-only planning, read-only review, or implementation from the user's explicit request. Do not silently upgrade read-only work to implementation. Write $scratch/prompts/task.md using this complete contract:
You are handling a delegated task in the current repository.
User request:
<paste the user's request verbatim>
Mode:
<read-only planning|read-only review|implementation>
Objective:
<one concrete outcome>
Authority:
<state whether the delegate may only inspect, or may edit files within Owned scope>
Owned scope:
<exact files, directories, or responsibility the delegate owns>
Excluded scope:
<files, systems, external state, and unrelated changes that must not be modified>
Evidence:
<repository files, logs, diffs, commands, or other artifacts to inspect>
Verification:
<specific checks to run, or "read-only analysis; no verification command required">
Success condition:
<observable conditions that mean the objective is complete>
Stop conditions:
<conditions requiring the delegate to stop without expanding authority, such as missing access, ambiguous destructive action, scope conflict, or required external-state change>
Operating rules:
- Read and obey applicable AGENTS.md files before acting.
- Inspect the supplied evidence and relevant repository context before concluding.
- Preserve pre-existing and concurrent changes; never revert work you do not own.
- In read-only mode, do not edit repository files.
- In implementation mode, edit only the Owned scope and run the specified verification.
- Do not commit, stage, push, open or modify pull requests, post comments, or change external state.
- Do not expand the scope or substitute a different model. Stop and report when a stop condition applies.
Final report:
- State the result against the Success condition.
- List changed files, or state that none changed.
- Report verification commands and outcomes.
- Report blockers, residual risks, and any scope conflict.
Make every field concrete. Preserve user constraints verbatim where possible. For implementation, grant edit authority only to the minimum owned scope; do not use phrases such as "edit anything needed."
Use plan permissions for either read-only mode:
grok \
--prompt-file "$scratch/prompts/task.md" \
--cwd "$PWD" \
--permission-mode plan \
--output-format json \
-m grok-4.5 \
> "$scratch/raw/stdout.json" \
2> "$scratch/raw/stderr.txt"
exit_status=$?
printf '%s\n' "$exit_status" > "$scratch/raw/exit-status.txt"
Use edit-accepting permissions for implementation:
grok \
--prompt-file "$scratch/prompts/task.md" \
--cwd "$PWD" \
--permission-mode acceptEdits \
--output-format json \
-m grok-4.5 \
> "$scratch/raw/stdout.json" \
2> "$scratch/raw/stderr.txt"
exit_status=$?
printf '%s\n' "$exit_status" > "$scratch/raw/exit-status.txt"
Do not relax the selected permission mode. Before substituting another model, ask the user.
Always record postflight state, including when Grok exits unsuccessfully:
git status --short > "$scratch/repository/postflight-status.txt"
git diff --no-ext-diff --binary > "$scratch/repository/postflight-diff.patch"
git diff --cached --no-ext-diff --binary > "$scratch/repository/postflight-cached-diff.patch"
git ls-files --others --exclude-standard -z |
while IFS= read -r -d '' path; do
shasum -a 256 -- "$path"
done > "$scratch/repository/postflight-untracked-sha256.txt"
Inspect stdout, stderr, exit status, and every baseline/postflight status, diff, and untracked-file manifest. In read-only mode, treat any repository change as a failure and report it. In implementation mode, confirm every new change is within the owned scope and independently assess the requested verification before reporting completion. Do not claim success from the delegate's report alone.