React Native Firebase TS/JS Validation
Scope
Use this skill to validate changes in the React Native Firebase monorepo before handoff, commit, or push.
It runs the same static-analysis and compile/test commands CI uses for the Lint, TypeScript, Jest, docs, and compare-types jobs — not a narrowed JS-only subset.
Triggers
Use this skill when the user asks for:
- testing TS or JS changes
- validating TypeScript or JavaScript edits before commit or handoff
- running the standard validation pass for RNFB
- checking whether package changes compile and pass Jest
- formatting and linting before push
- CI-equivalent validation before publication
Out-of-scope boundaries
Do not use this skill for:
- release validation that requires the full platform, emulator, Detox, or packaging matrix (see validation checklist § e2e)
- migrating a package from JavaScript to TypeScript; use the TypeScript refactor or migration skills instead
Defaults
- Default tool or method: run the canonical command sequence below from the repository root
- Fallback when default fails: stop, inspect the failure, fix issues in the current change set when authorized, then rerun the failed command and any later commands
- Why this default exists: the sequence mirrors CI Lint + TypeScript + Jest + docs + compare-types gates
Command sequence
Run these root package.json scripts in order. Canonical checklist: validation-checklist.md. Agent allowlist (no improvisation): agent-command-policy.md. OKF bundle wins if this skill disagrees.
yarn lerna:prepare
yarn tsc:compile
yarn tsc:compile:consumer
yarn reference:api
yarn lint — CI Lint job (lint:js + lint:android + lint:ios:check). When lint:android reformats Java, commit the formatter output and rerun until exit 0.
- When
docs/** changed: yarn lint:markdown then yarn lint:spellcheck — CI docs job
yarn lint:js --fix then yarn lint:js when step 5 reported ESLint issues only (optional shortcut before re-running full yarn lint)
yarn tests:jest
yarn format:js — inspect diff; rerun yarn lint if formatting touched files
yarn compare:types
Gotchas
- Forbidden:
yarn workspace … prepare, cd packages/<pkg> && yarn prepare/build, yarn jet, npx jet — see agent command policy. On failure, fix product code and re-run the same canonical command.
yarn lint is not optional when native Java or iOS sources are in the diff — lint:js alone does not match CI.
yarn lint:spellcheck is not optional when docs/** is in the diff — lint:markdown alone does not match CI.
yarn format:js writes changes across packages/**/*.{js,ts,tsx}. Check the diff after formatting and do not revert user changes.
- Run commands from the repository root so workspace resolution, root
tsconfig.json, and Jest configuration are consistent.
yarn lerna:prepare may rebuild or refresh package artifacts needed before TypeScript or tests run.
yarn compare:types installs dependencies under .github/scripts/compare-types before running the type parity comparison. Keep it last.
- If validation is slow, keep the command running rather than replacing it with a narrower command unless the user explicitly narrows validation.
Workflow
- Confirm the task scope and note changed packages, native paths, or docs.
- Check whether the worktree has unrelated dirty files if the current task includes code edits or commit preparation.
- Run the command sequence from the repository root.
- If
yarn lint:android or yarn format:js changes files, include those changes and rerun yarn lint before continuing.
- If a command fails:
- stop before running later commands
- identify whether the failure belongs to the current changes, pre-existing repo state, or missing local setup
- fix current-change failures when authorized, then rerun the failed command and continue the remaining sequence
- Return a concise result with the commands run, pass/fail status, and any remaining blockers.
Validation loop
- Run the command sequence.
- If validation fails because of current changes and fixing is in scope, fix the issue and rerun the failed command plus all later commands.
- If validation fails for unrelated or environment-specific reasons, stop and report the blocker with the command that failed and the shortest useful error summary.
- Only report success when every applicable command in the sequence completes successfully.
Output format
Use this template:
# TS/JS Validation
## Summary
- passed | failed | blocked
- one-sentence validation verdict
## Commands
- `yarn lerna:prepare`: passed | failed | not run
- `yarn tsc:compile`: passed | failed | not run
- `yarn tsc:compile:consumer`: passed | failed | not run
- `yarn reference:api`: passed | failed | not run
- `yarn lint`: passed | failed | not run
- `yarn lint:markdown`: passed | failed | not run | n/a
- `yarn lint:spellcheck`: passed | failed | not run | n/a
- `yarn tests:jest`: passed | failed | not run
- `yarn format:js`: passed | failed | changed files
- `yarn compare:types`: passed | failed | not run
## Findings
- failing suite, compiler error, or setup blocker if any
## Next actions
1. next required action, only if validation did not fully pass
Constraints
- Keep responses factual and grounded in command output.
- Do not skip
yarn lint or docs lint rows when the diff requires them.
- Do not claim validation passed unless
compare:types ran after any formatting changes.
- Do not revert unrelated local changes.
- Avoid broad refactors while fixing validation failures.
Additional resources
Load files only when needed:
okf-bundle/testing/validation-checklist.md — full validation command list including e2e, coverage, and CI job mapping
- Read
package.json if command names or script definitions need to be confirmed.
- Read affected package
type-test.ts or nearby __tests__/ files only when a failure needs package-specific diagnosis.
1---2name: ts-js-validation3description: Validate React Native Firebase changes by running the CI-equivalent prepare, TypeScript, lint, Jest, formatting, and compare-types scripts. Use before handoff, commit, or push when package sources, native bridge code, or docs changed.4---56# React Native Firebase TS/JS Validation78## Scope910Use this skill to validate changes in the React Native Firebase monorepo before handoff, commit, or push.1112It runs the same static-analysis and compile/test commands CI uses for the Lint, TypeScript, Jest, docs, and compare-types jobs — not a narrowed JS-only subset.1314## Triggers1516Use this skill when the user asks for:1718- testing TS or JS changes19- validating TypeScript or JavaScript edits before commit or handoff20- running the standard validation pass for RNFB21- checking whether package changes compile and pass Jest22- formatting and linting before push23- CI-equivalent validation before publication2425## Out-of-scope boundaries2627Do not use this skill for:2829- release validation that requires the full platform, emulator, Detox, or packaging matrix (see [validation checklist § e2e](../../../okf-bundle/testing/validation-checklist.md))30- migrating a package from JavaScript to TypeScript; use the TypeScript refactor or migration skills instead3132## Defaults3334- Default tool or method: run the canonical command sequence below from the repository root35- Fallback when default fails: stop, inspect the failure, fix issues in the current change set when authorized, then rerun the failed command and any later commands36- Why this default exists: the sequence mirrors CI Lint + TypeScript + Jest + docs + compare-types gates3738## Command sequence3940Run these root `package.json` scripts in order. **Canonical checklist:** [validation-checklist.md](../../../okf-bundle/testing/validation-checklist.md). **Agent allowlist (no improvisation):** [agent-command-policy.md](../../../okf-bundle/testing/agent-command-policy.md). OKF bundle wins if this skill disagrees.41421. `yarn lerna:prepare`432. `yarn tsc:compile`443. `yarn tsc:compile:consumer`454. `yarn reference:api`465. `yarn lint` — **CI Lint job** (`lint:js` + `lint:android` + `lint:ios:check`). When `lint:android` reformats Java, commit the formatter output and rerun until exit 0.476. When `docs/**` changed: `yarn lint:markdown` then `yarn lint:spellcheck` — **CI docs job**487. `yarn lint:js --fix` then `yarn lint:js` when step 5 reported ESLint issues only (optional shortcut before re-running full `yarn lint`)498. `yarn tests:jest`509. `yarn format:js` — inspect diff; rerun `yarn lint` if formatting touched files5110. `yarn compare:types`5253## Gotchas5455- **Forbidden:** `yarn workspace … prepare`, `cd packages/<pkg> && yarn prepare/build`, `yarn jet`, `npx jet` — see [agent command policy](../../../okf-bundle/testing/agent-command-policy.md). On failure, fix product code and re-run the **same** canonical command.56- **`yarn lint` is not optional** when native Java or iOS sources are in the diff — `lint:js` alone does not match CI.57- **`yarn lint:spellcheck` is not optional** when `docs/**` is in the diff — `lint:markdown` alone does not match CI.58- `yarn format:js` writes changes across `packages/**/*.{js,ts,tsx}`. Check the diff after formatting and do not revert user changes.59- Run commands from the repository root so workspace resolution, root `tsconfig.json`, and Jest configuration are consistent.60- `yarn lerna:prepare` may rebuild or refresh package artifacts needed before TypeScript or tests run.61- `yarn compare:types` installs dependencies under `.github/scripts/compare-types` before running the type parity comparison. Keep it last.62- If validation is slow, keep the command running rather than replacing it with a narrower command unless the user explicitly narrows validation.6364## Workflow65661. Confirm the task scope and note changed packages, native paths, or docs.672. Check whether the worktree has unrelated dirty files if the current task includes code edits or commit preparation.683. Run the command sequence from the repository root.694. If `yarn lint:android` or `yarn format:js` changes files, include those changes and rerun `yarn lint` before continuing.705. If a command fails:71 - stop before running later commands72 - identify whether the failure belongs to the current changes, pre-existing repo state, or missing local setup73 - fix current-change failures when authorized, then rerun the failed command and continue the remaining sequence746. Return a concise result with the commands run, pass/fail status, and any remaining blockers.7576## Validation loop77781. Run the command sequence.792. If validation fails because of current changes and fixing is in scope, fix the issue and rerun the failed command plus all later commands.803. If validation fails for unrelated or environment-specific reasons, stop and report the blocker with the command that failed and the shortest useful error summary.814. Only report success when every applicable command in the sequence completes successfully.8283## Output format8485Use this template:8687```markdown88# TS/JS Validation8990## Summary91- passed | failed | blocked92- one-sentence validation verdict9394## Commands95- `yarn lerna:prepare`: passed | failed | not run96- `yarn tsc:compile`: passed | failed | not run97- `yarn tsc:compile:consumer`: passed | failed | not run98- `yarn reference:api`: passed | failed | not run99- `yarn lint`: passed | failed | not run100- `yarn lint:markdown`: passed | failed | not run | n/a101- `yarn lint:spellcheck`: passed | failed | not run | n/a102- `yarn tests:jest`: passed | failed | not run103- `yarn format:js`: passed | failed | changed files104- `yarn compare:types`: passed | failed | not run105106## Findings107- failing suite, compiler error, or setup blocker if any108109## Next actions1101. next required action, only if validation did not fully pass111```112113## Constraints114115- Keep responses factual and grounded in command output.116- Do not skip `yarn lint` or docs lint rows when the diff requires them.117- Do not claim validation passed unless `compare:types` ran after any formatting changes.118- Do not revert unrelated local changes.119- Avoid broad refactors while fixing validation failures.120121## Additional resources122123Load files only when needed:124125- **`okf-bundle/testing/validation-checklist.md`** — full validation command list including e2e, coverage, and CI job mapping126- Read `package.json` if command names or script definitions need to be confirmed.127- Read affected package `type-test.ts` or nearby `__tests__/` files only when a failure needs package-specific diagnosis.