Post Work Checks
Testing & Qualitypost-work-checksPost Work Checks is an Agent Skill for testing & quality published in the software-mansion/react-native-audio-api repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Ordered quality gate checklist to run after every code change in react-native-audio-api. Covers formatting, linting, type checking, C++ tests, JS tests, and enum sync validation. Documents what lefthook pre-commit hooks run automatically vs what must be run manually. Use at the end of any implementation task before opening a PR. Trigger phrases: "post-work", "before PR", "before commit", "check quality", "run linter", "run tests", "format code", "lefthook", "pre-commit", "yarn test", "yarn lint".
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/software-mansion/react-native-audio-api/blob/HEAD/.claude/skills/post-work-checks/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/post-work-checks, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Skill: Post-Work Checks
Run these checks after any code change and before opening a PR.
Quick Reference
yarn format # auto-fix all formatting
yarn lint # lint all workspaces
yarn typecheck # TypeScript type checking
yarn test # C++ Google Tests
yarn check-audio-enum-sync # only if AudioEvent enum touched
What lefthook Runs Automatically
lefthook runs pre-commit hooks on every git commit — these run automatically:
| Hook | Command |
|---|---|
| Format | yarn format (JS via Prettier, C++ via clang-format, Kotlin via ktlint) |
| Lint | yarn lint (JS/TS + C++ + Kotlin) |
| Type check | yarn typecheck |
| Commit message | commitlint |
If a hook fails, the commit is aborted. Fix the issue and re-commit — do NOT use --no-verify.
What Must Be Run Manually
These are NOT run by lefthook:
C++ tests
yarn test # from monorepo root
Runs packages/react-native-audio-api/common/cpp/test/RunTests.sh via CMake + Google Test.
When: after any change to common/cpp/audioapi/core/, dsp/, or utils/ C++ files.
Android C++ compile check
cd apps/fabric-example/android && ./gradlew :react-native-audio-api:assembleDebug
When: after any change to android/src/main/cpp/ — these files are NOT covered by yarn test (which only builds common/cpp/). The gradle project resolves through the node_modules/react-native-audio-api workspace symlink, so local edits in packages/react-native-audio-api/ are picked up. Takes ~3-4 minutes.
AudioEvent enum sync check
yarn check-audio-enum-sync
When: only when you modify the AudioEvent enum or any file that maps event names across C++/Kotlin/TypeScript.
Per-Language Commands
When you need to target a specific language:
# TypeScript/JavaScript
yarn lint:js # ESLint
yarn format:js # Prettier
# Shared C++
yarn format:common # clang-format for common/cpp/
yarn lint:cpp # cpplint
# Android
yarn format:android:cpp # clang-format for android/src/main/cpp/
yarn format:android:kotlin # KtLint
yarn lint:kotlin # Kotlin linter
# iOS
yarn format:ios # clang-format for ios/
yarn lint:ios # iOS Objective-C++ format checks
Recommended Order
Later steps may surface issues caused by earlier ones — run in this order:
yarn format— fix formatting first (removes noise from lint)yarn lint— catch remaining code issuesyarn typecheck— catch TypeScript errorsyarn test— catch C++ regressions (when C++ changed)yarn check-audio-enum-sync— whenAudioEventenum was touched
Maintenance: see maintenance.md.