post-work-checks
Skill864 starsChanged 7 days agoMITView on GitHub
Ordered quality gate checklist to run after every code change in react-native-audio-api. Covers formatting, linting, type checking, C++ tests, JS tests, enum sync validation, and tiered local validation (validate.sh) for native builds CI does not run. 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", "pnpm test", "pnpm lint", "validate", "validate:fast", "validate:full".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- PaperBackPear3/awesome-agent-toolkitstheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- PaperBackPear3/awesome-agent-toolkits★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- apps/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/expressive-code.mdcCursor rule
- audio-nodesSkill
- build-compilation-dependenciesSkill
- expressive-codeSkill
- flowSkill
- host-objectsSkill
- thread-safety-itcSkill
- turbo-modulesSkill
- utilitiesSkill
- web-audio-apiSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Run these checks after any code change and before opening a PR.
- Very specific: line 119
When: after any change to common/cpp/audioapi/core/, dsp/, or utils/ C++ files.
- Very specific: line 127
When: after any change to C++ files or TypeScript files in src/.
- Very specific: line 144
When: only when you modify one of those enums or any file that maps event names across C++/Kotlin/TypeScript.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Post-Work Checks
Run these checks after any code change and before opening a PR.
Quick Reference — Local Validation Tiers
CI runs each changed package's check and test scripts (ci.yml). The library's test runs Jest and only the C++ suites whose paths your changes touch (run-tests.sh affected: smoke for common/cpp/, graph for graph code); outside pull requests it runs all of them. CI also builds the example app for Android and iOS when native code changes (native-build.yml). Use validate.sh locally for the same checks before pushing:
pnpm validate:fast # CI parity — always run before opening a PR
pnpm validate:cpp # C++ smoke
pnpm validate:cpp-extended # C++ extended (all categories)
pnpm validate:android # Android native build (requires ANDROID_HOME)
pnpm validate:ios # iOS native build (macOS only)
pnpm validate:full # --fast with every C++ suite + --android + --iosEquivalent: ./scripts/validate.sh --fast (etc.)
Which tier to run
| Changed paths | Minimum validation |
src/, types only | --fast |
common/cpp/core/, dsp/, utils/ | --fast |
common/cpp/HostObjects/ | --fast + --android + --ios |
android/src/main/cpp/ or java/ | --fast + --android |
ios/audioapi/ | --fast + --ios |
CMakeLists.txt, build.gradle, podspec | --full |
Graph changes under common/cpp/audioapi/core/utils/graph/ → also run pnpm validate:cpp-extended or pnpm --filter react-native-audio-api test:cpp:extended -- graph.
Quick Reference — Individual Commands
pnpm check # build every package, then its `check`, as CI runs it
pnpm test # every package's `test` (library: Jest + affected C++ suites)
pnpm format # auto-fix all formatting
pnpm lint # lint all workspaces
pnpm typecheck # TypeScript type checking
pnpm --filter react-native-audio-api check:enums # only if a mirrored enum touchedWhat lefthook Runs Automatically
Hooks run when lefthook is installed (lefthook install).
Pre-commit (every git commit)
| Hook | Command |
| Format check | pnpm format:check (JS/TS via oxfmt, C++ via clang-format, Kotlin via ktlint) |
| Lint | pnpm lint (JS/TS via oxlint with type-aware rules, C++, Kotlin) |
| Type check | pnpm typecheck (only when staged files match *.{js,ts,jsx,tsx}) |
| Commit message | commitlint |
If a hook fails, the commit is aborted. Fix the issue and re-commit — do NOT use --no-verify.
pnpm lint runs oxlint from each package directory with that package's own .oxlintrc.json (apps/common-app has one), while editors apply the stricter root .oxlintrc.json (tsdoc/syntax, import/consistent-type-specifier-style as errors). To see what the editor reports, run pnpm exec oxlint -c .oxlintrc.json <path> from the root. oxfmt's jsdoc: true rewraps comments to 80 columns and can split a code span across lines (tsdoc-code-span-missing-delimiter); reword so the span doesn't land on a line break, then re-run oxfmt and check. Vendored files need an ignore in both the root and the package config.
There is no pre-push hook — pnpm validate:fast (and native/C++ extended tiers) are run manually before opening a PR. Native builds (validate:android, validate:ios, validate:full) and extended C++ (validate:cpp-extended) are never run by lefthook.
What Must Be Run Manually
These are not covered by lefthook:
CI-parity gate (before opening a PR)
pnpm validate:fastNative compile checks (when platform code changes)
pnpm validate:android # pnpm --filter … build:android (~3–4 min)
pnpm validate:ios # pnpm --filter … build:ios (macOS only)
pnpm validate:full # --fast with every C++ suite + --android + --iosAutolinking registers workspace packages under their real packages/ path (apps/common-app/scripts/dependencies.js follows the node_modules symlink), so Gradle and CocoaPods build local edits in packages/react-native-audio-api/ directly.
Extended graph (when graph / audio-thread code changes)
pnpm validate:cpp-extended # all extended categories
# or: pnpm --filter react-native-audio-api test:cpp:extended -- graphC++ tests only
pnpm validate:cpp # smoke via validate.sh
pnpm --filter react-native-audio-api test:cpp # smoke
pnpm --filter react-native-audio-api test:cpp:full # smoke + all extendedWhen: after any change to common/cpp/audioapi/core/, dsp/, or utils/ C++ files. Prefer smoke for a fast C++-only loop; see common/cpp/test/TESTING.md. Run pnpm validate:fast before opening a PR.
Library unit tests (JS + C++)
pnpm test # from monorepo root — runs test:js + test:cppWhen: after any change to C++ files or TypeScript files in src/. Prefer this for a quick local test loop covering both TS and C++ logic; run pnpm validate:fast before opening a PR.
Native enum sync check
pnpm --filter react-native-audio-api check:enumsRuns packages/react-native-audio-api/scripts/check-enum-sync.sh, which compares every
enum mirrored from C++: into Kotlin (AudioEvent, RecorderState, crossing JNI) and into
TypeScript (FileFormat, FileDirectory, BitDepth, IOSAudioQuality from
AudioFileProperties.h, crossing JSI). Both cross as plain ints, so entry order and
values are the contract: an entry without an initializer counts as previous + 1, which is
also how a Kotlin ordinal counts. Names are compared ignoring case and underscores, since
the languages name entries differently by convention. An enum the script finds no entries
for fails the check. Add a new pair to the MIRRORED_ENUMS table at the top of the script.
When: only when you modify one of those enums or any file that maps event names across
C++/Kotlin/TypeScript. Skip this step if you already ran validate:fast (it includes enum sync).
Per-Language Commands
These scripts live on the react-native-audio-api workspace. From the monorepo root:
# TypeScript/JavaScript
pnpm --filter react-native-audio-api lint:js
pnpm --filter react-native-audio-api format:js
# Shared C++
pnpm --filter react-native-audio-api format:common
pnpm --filter react-native-audio-api lint:cpp
# Android
pnpm --filter react-native-audio-api format:android:cpp
pnpm --filter react-native-audio-api format:android:kotlin
pnpm --filter react-native-audio-api lint:kotlin
# iOS
pnpm --filter react-native-audio-api format:ios
pnpm --filter react-native-audio-api lint:iosRecommended Order
Later steps may surface issues caused by earlier ones — run in this order:
pnpm format— fix formatting first (removes noise from lint)pnpm lint— catch remaining code issuespnpm typecheck— catch TypeScript errorspnpm validate:fast— full CI-parity gate (orpnpm test/test:cppfor a quick local loop; always run--fastbefore opening a PR)pnpm validate:cpp-extended— when graph / audio-thread code changedpnpm validate:android/pnpm validate:ios/pnpm validate:full— when native code or build files changed (see decision table above)
Maintenance: see maintenance.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

