Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
elastic avatar

Branch Readiness Checks

  • 3 installs
  • 21.2k repo stars
  • Updated August 5, 2026
  • elastic/kibana

branch-readiness-checks skill documents Validate branch readiness before push or PR using base-diff and local-change checks.

About

branch-readiness-checks skill documents Validate branch readiness before push or PR using base-diff and local-change checks.. name: branch-readiness-checks description: "Validate branch readiness before push or PR using base-diff and local-change checks."

  • Validate branch readiness before push or PR using base-diff and local-change checks.
  • Platform-specific setup patterns for branch-readiness-checks.
  • Evidence-backed steps from upstream SKILL.md.
  • When-to-use criteria for branch-readiness-checks versus alternatives.

Branch Readiness Checks by the numbers

  • 3 all-time installs (skills.sh)
  • Ranked #1,759 of 2,203 Security skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

branch-readiness-checks capabilities & compatibility

Capabilities
branch readiness checks quick start · branch readiness checks when to use guidance · branch readiness checks integration patterns
Works with
elasticsearch
Use cases
security audit
From the docs

What branch-readiness-checks says it does

disable-model-invocation: true
SKILL.md
Run focused checks before push/PR.
SKILL.md
npx skills add https://github.com/elastic/kibana --skill branch-readiness-checks

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3
repo stars21.2k
Last updatedAugust 5, 2026
Repositoryelastic/kibana

How do I use branch-readiness-checks correctly?

Validate branch readiness before push or PR using base-diff and local-change checks.

Who is it for?

Teams implementing branch-readiness-checks workflows from the catalog.

Skip if: Skip when requirements clearly match a different specialized stack.

When should I use this skill?

User asks about branch-readiness-checks, validate branch readiness before push or pr using base-diff and local-change checks..

What you get

Working branch-readiness-checks setup with validated configuration and next steps.

Files

SKILL.mdMarkdownGitHub ↗

Branch Readiness

Run focused checks before push/PR.

Command Timing

Use bounded polling rather than agent-specific timeout fields. For each command, set a max_wait_ms, poll every poll_interval_ms, and stop when the command completes or the max wait is reached. If max_wait_ms is exceeded, report a timeout and continue to the next workflow step.

Command typemax_wait_mspoll_interval_ms
git diff, git merge-base150001000
node scripts/check_changes.ts --ref "$BASE"1800002000
node scripts/lint_ts_projects.js, yarn test:type_check --project1200002000
node scripts/generate codeowners, node scripts/regenerate_moon_projects.js600002000
yarn test:jest (per package)3000005000

Workflow

Run these steps sequentially. Continue through all steps even if one fails. At the end, summarize issues that are likely to fail CI.

Step 0: Identify affected packages

Collect changes relative to branch base, including untracked files. Detect the base branch rather than assuming main:

BASE=$(git merge-base HEAD main 2>/dev/null || git merge-base HEAD origin/main)
# Files changed since the branch base (committed + working tree changes).
git diff --name-only "$BASE"
# Untracked files.
git ls-files --others --exclude-standard

Combine and deduplicate results. From the changed file paths, identify:

  • The affected packages — walk up from each changed file to the nearest kibana.jsonc and read its id field for the package ID.
  • The tsconfig.json files for those packages (sibling to kibana.jsonc).

Prerequisite check: verify the TS project map exists by running a quick type check on one package. If it fails with TS Project map missing, stop and ask the user if they'd like you to run yarn kbn bootstrap. Once bootstrap completes (or if the user declines), proceed with the remaining steps.

Step 1: Run check_changes against branch base

Run check_changes using the BASE computed in Step 0:

node scripts/check_changes.ts --ref "$BASE"

Record failures in the final summary, then continue with the remaining steps.

Step 2: Lint TS projects

Validate and auto-fix tsconfig.json files across affected packages.

node scripts/lint_ts_projects.js --fix

This runs repo-wide but is fast. Note files modified by --fix and report any remaining errors.

Step 3: Type check

Run type checking scoped to each affected package's tsconfig.json. Only one --project flag per invocation — run separate commands for each package.

yarn test:type_check --project path/to/tsconfig.json

Also check downstream dependents — find packages whose kbn_references include any affected package ID and type-check those too. This catches cross-package breakage that CI's full tsc -b tsconfig.refs.json would find.

Use rg if available, otherwise fall back to grep:

# Preferred (rg).
rg -l '"@kbn/affected-package-id"' --glob 'tsconfig.json' .
# Fallback (grep).
grep -rl '"@kbn/affected-package-id"' --include='tsconfig.json' .

Deduplicate against already-checked packages. If a package has more than 20 downstream tsconfigs, skip the downstream check and warn the user that a full tsc -b may be needed.

Step 4: Unit tests

Run unit tests per affected package with coverage enabled.

yarn test:jest --coverage path/to/package/src/

If your environment provides a package-scoped unit-test tool, use the equivalent command.

After the run, read the coverage summary output and report overall line/branch/function coverage percentages per package. Flag any package whose line coverage is below 80% and provide recommendations to bring it above that threshold. Use specific uncovered files or line ranges when the coverage output provides them.

Step 5: CODEOWNERS generation

Regenerate the CODEOWNERS file from kibana.jsonc owner fields.

node scripts/generate codeowners

Check git diff .github/CODEOWNERS afterward — if the file changed, note it in the summary.

Step 6: Moon project regeneration

Regenerate moon project configs.

node scripts/regenerate_moon_projects.js --update

Check for unstaged changes afterward — if any moon configs changed, note them in the summary.

Re-runs within the same session

If the user asks to re-run branch-readiness checks after fixes, or if you make changes due to failures, run all steps again.

After all checks have run

Report a summary including:

  • Check changes pass/fail and key failures (if any).
  • TS project lint pass/fail.
  • Type check pass/fail per package (or "skipped" if unchanged).
  • Test results and coverage per package (or "skipped" if unchanged); flag packages below 80% line coverage.
  • Whether CODEOWNERS or moon configs need to be committed.

Offering to Fix Issues

After reporting the summary, offer fixes by risk level:

  • Check changes failures, type errors, and TS project lint errors not resolved by `--fix` — offer to fix automatically when mechanical and low risk.
  • Test failures — ask before touching test code. Test fixes can change intent, so the user should confirm before proceeding.
  • Coverage gaps (below 80%) — offer to add tests for uncovered code, but ask first. Coverage improvements are optional and the user may choose to defer them.

Do not commit or stage automatically — let the user decide.

Related skills

FAQ

What does branch-readiness-checks do?

branch-readiness-checks skill documents Validate branch readiness before push or PR using base-diff and local-change checks.

When should I use branch-readiness-checks?

User asks about branch-readiness-checks, validate branch readiness before push or pr using base-diff and local-change checks..

Is this skill safe to install?

Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.