react-native-healthkit
Copilot instructions719 starsChanged 46 days agoMITView on GitHub
This file contains instructions for Copilot to follow when working with code in this repository. IMPORTANT: After making code changes, you MUST: - if you've changed anything in the src/specs directory of either package, run bun codegen to regenerate types. - first run bun typecheck and bun lint to ensure code quality and type safety. Iterate on these until they pass. - finally use xcodebuild to build and verify the project compiles without errors. Build the RNHealthKit scheme (apps/example/ios/RNHealthKit.xcworkspace, created…
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,349 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- expo-deploymentSkill
- expo-dev-clientSkill
- react-native-best-practicesSkill
- react-native-healthkit-contributingSkill
- upgrading-expoSkill
- react-native-healthkitSkill
The file
We split this copilot-instructions.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
if you've changed anything in the src/specs directory of either package, run bun codegen to regenerate types.
- Distinctive: line 36
If there are build or validation errors, fix them before considering the task complete.
≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions 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
copilot-instructions
This file contains instructions for Copilot to follow when working with code in this repository.
Project Overview
This repository is a monorepo centering around the package react-native-healthkit (packages/react-native-healthkit, published as @kingstinct/react-native-healthkit), with a sibling package packages/health-records (published as @react-native-healthkit/health-records) for clinical health records. Both depend on packages/core (published as @react-native-healthkit/core), which holds their shared TypeScript types, Expo config plugin building blocks and the ReactNativeHealthkitCore pod (shared HKHealthStore, queries, predicates, metadata serialization, background delivery). Core has no Nitro specs of its own; the other packages import its types into theirs, so nitrogen generates per-package copies of them. Core must be built (bun run build:core) before the other packages build, codegen or typecheck on their own; bun install does this in postinstall. They expose Apple Healthkit APIs to React Native and use react-native-nitro-modules with nitrogen to generate type-safe types. We use React Native and Expo.
Development Commands
# install dependencies (after adding any packages, can be run on root level)
bun install
# install cocoapods (after adding any packages with native code)
cd apps/example/ios && pod install
# After changes to any Nitro types (in `/packages/react-native-healthkit/src/specs` or `/packages/health-records/src/specs` and types referenced from there, including `/packages/core/src/types`; not necessary when ios/Swift files or unrelated TS-files have changed)
bun codegen # or bun codegen:healthkit / bun codegen:health-records for one package
# start packager
cd apps/example && bun startSkills
Step-by-step workflows live in agent skills (loaded on demand):
.agents/skills/react-native-healthkit-contributing- changing this repo: adding identifiers, adding native (Nitro/Swift) APIs, codegen troubleshooting, verification and releases.skills/react-native-healthkit- using the library from an app (also published vianpx skills add kingstinct/react-native-healthkit). Keep it in sync when public APIs, plugin options or behaviour change.
Build Verification Rule
IMPORTANT: After making code changes, you MUST:
- if you've changed anything in the
src/specsdirectory of either package, runbun codegento regenerate types. - first run
bun typecheckandbun lintto ensure code quality and type safety. Iterate on these until they pass. - finally use xcodebuild to build and verify the project compiles without errors. Build the RNHealthKit scheme (
apps/example/ios/RNHealthKit.xcworkspace, created bybunx expo prebuild --platform ios) for iOS Simulator using specific simulator UUID to avoid conflicts. Note: Using simulatorId instead of simulatorName to avoid conflicts when multiple simulators have the same name. - For any features or bug fixes, add changesets. Easily done by running
bun changesetand following the prompts, follow semver best practices.
If there are build or validation errors, fix them before considering the task complete.
This ensures code changes are syntactically correct and don't break the build.
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.

