From eng
Generate or update a tailored .coderabbit.yaml for the current repository. Inspects the repo (languages, monorepo shape, generated/vendored dirs, CLAUDE.md/AGENTS.md conventions) and produces a config with sensible defaults plus repo-specific path_filters and path_instructions. Use when the user says "/eng:coderabbit-config", "coderabbit config", "coderabbit yaml", "set up coderabbit for this repo", "customize coderabbit", "generate .coderabbit.yaml", "tune coderabbit", or otherwise asks to configure CodeRabbit AI code review for a repo. Run from inside the target repo (cwd = repo root). Defaults to inferring from the repo so the user only answers 1-2 questions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/eng:coderabbit-configThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before the skill body, check whether the gstack-extensions repo has merged updates this clone has not pulled. Silent unless an upgrade is available; never changes anything:
Before the skill body, check whether the gstack-extensions repo has merged updates this clone has not pulled. Silent unless an upgrade is available; never changes anything:
~/dev/gstack-extensions/bin/gstack-extensions-update-check 2>/dev/null || true
If there is no output, proceed straight to the skill body. If it prints UPGRADE_AVAILABLE <n> <range>, tell the user via AskUserQuestion that gstack-extensions is <n> commit(s) behind origin/main and offer:
~/dev/gstack-extensions/bin/gstack-extensions-upgrade, then continue. It fast-forwards main and refreshes the installed plugins, and refuses safely (printing why) if the clone is not on a clean main; relay that message and continue without upgrading if so.~/dev/gstack-extensions/bin/gstack-extensions-update-check --snooze to suppress the prompt for ~8h (so other skills do not re-ask this session), then continue without upgrading.Do not upgrade without asking. Ask at most once per session: if you have already prompted (or the user skipped) this session, proceed silently.
Generate a tailored .coderabbit.yaml at the root of the current repo. The interesting work is inferring the right path_filters and path_instructions from what's actually in the repo, then asking the user only the questions that can't be inferred.
The cwd should be the repo root. If it isn't, ask the user to cd first. The skill writes exactly one file (.coderabbit.yaml) at the repo root and does not commit it.
CodeRabbit ships a CLI: coderabbit (Homebrew cask coderabbit, often at /opt/homebrew/bin/coderabbit). When present, use it for validation and snapshot. When absent, the skill still works.
Detect once at the start:
command -v coderabbit >/dev/null && coderabbit doctor 2>&1 | head -5
If installed but not authed: tell the user coderabbit auth login is needed for validation (it opens a browser), and proceed without validation. Do NOT run auth login for the user.
If installed and authed: enable the validation step in §6.
If .coderabbit.yaml already exists at repo root: do NOT overwrite blindly. Read it, then ask the user via AskUserQuestion whether to (a) extend the existing file (preserve their custom keys, only add what's missing), (b) overwrite from scratch, or (c) abort.
Also surface this hint once if no config exists yet: "If you already have CodeRabbit running on this repo, you can comment @coderabbitai configuration on any open PR to get the current effective config dumped as YAML. Want to do that first before I generate?" Don't block on it; if user says no or doesn't have a PR, proceed.
Read references/detection-heuristics.md for the full inference rules. The short version:
git ls-files | head -200 to get a feel for languages and layout.path_filters: node_modules/, dist/, build/, .next/, .nuxt/, vendor/, target/, __pycache__/, *.lock, *.min.js, *.min.css, *.generated.*, coverage/, generated proto/grpc stubs, migrations if they're auto-generated.tools to enable.CLAUDE.md, AGENTS.md, CONTRIBUTING.md, and any .cursorrules if present. Lift project conventions (e.g. "no em-dashes", "prefer functional components", "always validate at boundaries") into path_instructions entries scoped to the relevant paths.packages/, apps/, services/, pnpm-workspace.yaml, lerna.json, nx.json) and add path-scoped instructions per package if obvious.Use AskUserQuestion. Skip a question entirely if the signal is clear.
Q1 - Review profile (chill vs assertive):
chill if: single-author git log, side project, <50 commits, or CLAUDE.md hints at "move fast" style.assertive if: multi-author, has CODEOWNERS, has CI with strict gates, or it's a library/SDK with public API.Q2 - Verbose review extras (sequence diagrams, poem, high-level summary):
Never ask more than 2 questions. If you're tempted to ask a third, pick the better default and move on.
Start from templates/base.coderabbit.yaml. Populate:
language: keep en-US unless CLAUDE.md says otherwise.tone_instructions: lift any tone-relevant convention from CLAUDE.md (e.g. "No em-dashes. Direct, terse feedback."). Keep under 250 chars.reviews.profile: from Q1 or inference.reviews.path_filters: detected skip patterns (negation form with leading !).reviews.path_instructions: array of {path, instructions} entries, one per meaningful convention or per package in a monorepo.reviews.tools: enable the linters that match detected languages (see references/schema-notes.md for the mapping).knowledge_base.code_guidelines.filePatterns: include CLAUDE.md, AGENTS.md, .cursorrules, .github/copilot-instructions.md if any exist.Trim any section that's just defaults. A leaner file is easier to maintain.
Before writing, do a structural sanity check:
python3 -c "import yaml; yaml.safe_load(open('/tmp/coderabbit-draft.yaml'))" on a temp file).reviews.profile is one of chill / assertive.path_filters entries are strings; exclusions start with !.path_instructions entries each have path and instructions.tone_instructions ≤ 250 chars.If you want a deeper check, fetch https://coderabbit.ai/integrations/schema.v2.json and validate with jsonschema (Python). This is optional, the structural checks above catch the common mistakes.
Write .coderabbit.yaml at the repo root.
Live validation (only if coderabbit CLI is installed and authed):
The CLI doesn't have a "validate config" command, but it loads .coderabbit.yaml when reviewing. Use that as the validation signal. Pick the cheapest review the repo allows:
# If there are uncommitted changes, this is fast and free of side effects:
coderabbit review --plain --type uncommitted 2>&1 | tail -20
# If clean tree, skip live validation (CR has nothing to review). Just run:
coderabbit doctor
What to look for:
.coderabbit.yaml" error → schema is valid.Heads-up to the user: CLI review on the free tier is 3/hour. Don't burn it; the validation run counts.
Summary (always print):
coderabbit review before any push to dry-run the same review."Do not commit. The user commits.
templates/base.coderabbit.yaml: starting template with the keys worth setting and inline comments explaining tradeoffs.references/schema-notes.md: which fields actually matter, which are noise, language-to-tool mapping, common gotchas.references/detection-heuristics.md: how to infer profile, path_filters, path_instructions from repo signals.Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub mujtaba3b/gstack-extensions --plugin eng