coderabbit-fix
Installation
SKILL.md
CodeRabbit PR Review Fix
Preconditions
- Node.js 20+ (LTS; native
fetchis available from 18, 20 is the floor). The fetch script has zero npm dependencies. BITBUCKET_EMAIL+BITBUCKET_API_TOKENavailable in the environment (Atlassian API token, NOT an app password — Atlassian deprecated those). If both are missing, the script prints setup instructions on stderr and exits 1; relay them and stop.- bash / zsh:
export BITBUCKET_EMAIL="you@example.com"andexport BITBUCKET_API_TOKEN="ATATT3xFfGF0..." - PowerShell:
$env:BITBUCKET_EMAIL = "you@example.com"and$env:BITBUCKET_API_TOKEN = "ATATT3xFfGF0..." - Generate a token at https://id.atlassian.com/manage-profile/security/api-tokens → "Create API token with scopes" → app = Bitbucket → scopes:
read:pullrequest,write:pullrequest,read:repository. - Fallback (any agent): put
BITBUCKET_EMAIL/BITBUCKET_API_TOKENin a.envfile at the repo root — the script reads it when env vars are absent.
- bash / zsh:
- Bitbucket target (workspace + repo). The script resolves it in this order:
--workspace/--repoflags →BITBUCKET_WORKSPACE/BITBUCKET_REPOenv → parsed from theorigingit remote when it points atbitbucket.org/<ws>/<repo>. There is no hardcoded default (this skill is shared across teams). If none resolve, the script errors with these options — relay them. When the working repo'soriginis its Bitbucket clone, no config is needed. - Working directory is the repo root with clean-ish git state. If uncommitted changes exist on tracked files, warn the user before applying fixes.
- Current git branch maps to an open PR. If not, ask the user for the PR number.
Codex setup
Codex runs scripts in a sandbox that by default (a) blocks network and (b) strips *TOKEN* env vars. Before first use under Codex, add to ~/.codex/config.toml: