Compare commits

...

1 Commits

Author SHA1 Message Date
Otto
9430d18179 feat(skills): add dynamic !command injection to Claude Code skills
Add `!command` blocks to pr-address, pr-review, and worktree skills
so Claude Code injects runtime context (current branch, PR info, CI
status, existing worktrees) directly into the prompt at invocation
time.

This eliminates redundant tool calls for context gathering — the model
sees the output inline before it starts working.

Skills updated:
- pr-address: branch, PR number/URL, CI check count
- pr-review: branch, PR number/URL
- worktree: existing worktree list

Commands use fallback patterns (`2>/dev/null || echo ...`) so skills
degrade gracefully if a command fails (e.g. detached HEAD, no PR).
2026-03-19 20:49:13 +00:00
3 changed files with 22 additions and 0 deletions

View File

@@ -10,6 +10,14 @@ metadata:
# PR Address
## Current State
- **Branch:** `!git branch --show-current`
- **PR:** `!gh pr list --head $(git branch --show-current) --repo Significant-Gravitas/AutoGPT --json number,url,title -q '.[0] | "\(.number) \(.url) \(.title)"' 2>/dev/null || echo "no PR found for current branch"`
- **CI:** `!gh pr checks $(gh pr list --head $(git branch --show-current) --repo Significant-Gravitas/AutoGPT -q '.[0].number' 2>/dev/null) --repo Significant-Gravitas/AutoGPT --json bucket,name -q '[.[] | select(.bucket != "pass" and .bucket != "skipping")] | length | tostring + " failing/pending checks"' 2>/dev/null || echo "unknown"`
Use the context above to skip the "Find the PR" step if a PR number is already shown.
## Find the PR
```bash

View File

@@ -10,6 +10,13 @@ metadata:
# PR Review
## Current State
- **Branch:** `!git branch --show-current`
- **PR:** `!gh pr list --head $(git branch --show-current) --repo Significant-Gravitas/AutoGPT --json number,url,title -q '.[0] | "\(.number) \(.url) \(.title)"' 2>/dev/null || echo "no PR found for current branch"`
Use the context above to skip the "Find the PR" step if a PR number is already shown.
## Find the PR
```bash

View File

@@ -10,6 +10,13 @@ metadata:
# Worktree Setup
## Current State
- **Existing worktrees:**
`!git worktree list 2>/dev/null || echo "not in a git repo"`
Use the list above to pick the next available `AutoGPT<N>` name and avoid conflicts.
## Create the worktree
Derive paths from the git toplevel. If a name is provided as argument, use it. Otherwise, check `git worktree list` and pick the next `AutoGPT<N>`.