clerk/audit-expo-skill
Audits the bundled `clerk-expo` skill against the @clerk/expo SDK source and clerk-docs, then proposes or applies updates. Use when the user says "audit the expo skill", "update the clerk-expo skill", "check clerk-expo against the SDK", "resync clerk-expo skill", "run audit-expo-skill", or after @clerk/expo ships a minor or major release.
npx skills add https://github.com/clerk/skills --skill audit-expo-skill
Cross-check skills/mobile/clerk-expo/ in this repository against the actual @clerk/expo SDK source and the clerk-docs content it cites. The SDK source is the source of truth for API shape; clerk-docs is the source of truth for recommended patterns; the skill must track both. When the two conflict on a factual claim (an API exists, a signature, a default, a version floor), SDK source wins — always. Docs win only on prescriptive questions source cannot answer (which flow to recommend, prop placement in examples, dashboard prerequisites).
The skill intentionally hardcodes verified code snippets (see its freshness gate). This audit is the maintenance half of that contract: it runs after SDK releases so the snippets stay verified rather than becoming folklore.
clerk/javascript checkout containing packages/expo/ (and packages/shared/src/types/ for the sign-in/sign-up resource types).clerk/clerk-docs checkout containing docs/getting-started/quickstart.expo.mdx, docs/guides/development/custom-flows/authentication/*.mdx, and docs/reference/expo/**.skills/mobile/clerk-expo/SKILL.md, references/*.md, and evals/evals.json.clerk/clerk-expo-quickstart checkout (three example apps exercising the current API).Resolve each checkout in this order:
--sdk <path> / --docs <path> when supplied. The SDK path must contain packages/expo/package.json; the docs path must contain docs/getting-started/quickstart.expo.mdx.../javascript and ../clerk-docs (the standard Clerk projects layout), and ../clerk-expo-quickstart for corroboration.CLERK_JAVASCRIPT_REPO / CLERK_DOCS_REPO are set, use those paths..context/:mkdir -p .context && cd .context
git clone --depth 1 https://github.com/clerk/javascript.git
git clone --depth 1 https://github.com/clerk/clerk-docs.git
If neither is available, stop and ask the user for paths. Do not audit from memory or from an installed node_modules copy alone; the audit exists precisely because memory drifts.
SKILL.md frontmatter (compatibility:) and its freshness-gate text.packages/expo/package.json plus peerDependencies (Expo SDK range, React Native floor, React range) and bundled native SDK versions (clerk-ios, clerk-android in dependencies).packages/expo/CHANGELOG.md entries between the stamped version and current. This is the primary work queue: every changelog entry either affects the skill or is explicitly irrelevant.If the stamped version equals the current version and the changelog shows nothing new, report "no drift" and stop.
Build a structured inventory from source (prefer src/ over dist/):
packages/expo/package.json exports — every subpath (/native, /web, /token-cache, /resource-cache, /secure-store, /local-credentials, /passkeys, /google, /apple, /legacy, /experimental, …), noting additions and removals.src/hooks/index.ts and the Expo-specific hooks (useSSO, useAuth extensions, useSignInWithGoogle, useSignInWithApple, useLocalCredentials). Capture signatures, return shapes, and @deprecated tags.SignInFutureResource / SignUpFutureResource method surface in packages/shared/src/types/signInFuture.ts and signUpFuture.ts (method names, param shapes, status enums). The skill's custom-flows reference mirrors this surface.src/native/index.ts exports and each component's props types (AuthView.types.ts, UserProfileView, UserButton). Flag any prop the skill names that no longer exists, and any new public prop.src/plugin/withClerkExpo.ts — required env vars, theme option schema, platform side effects (deployment targets, URL schemes).src/provider/ClerkProvider.tsx props, especially experimental ones (__experimental_passkeys, __experimental_resourceCache) and any newly stabilized names.@deprecated, console.warn, and package-migration notices (e.g. the @clerk/expo-google-signin split). These become "coming changes" notes in the skill.For every canonical docs URL cited in the skill's references:
.mdx file still exists in clerk-docs at that route (URL path → docs/ path). Broken citations are drift.drift even if it still compiles.Read SKILL.md, every references/*.md, and evals/evals.json. Extract each concrete claim:
useSSO vs useOAuth, resourceCache vs secureStore, captcha mount point, treatPendingAsSignedOut placement).Produce a structured diff with four buckets:
.d.ts cover better; propose shrinkage where it reduces drift risk.Cite source file and line for every bucket-1/2/3 entry, plus the target skill location.
Emit a review-ready proposal grouped by target file. For each change include severity (drift, gap, or polish), the source citation, the target location, and a unified diff or concise before/after. Always include, when any change is applied:
compatibility: stamp and freshness-gate version in SKILL.md updated to the audited SDK version.Do not rewrite accurate neighboring sections. Skill shrinkage is a valid proposal.
Default: present the proposal and stop for review.
With --apply: apply drift and gap edits, update the version stamps, list polish for review, then validate — JSON files parse, every relative reference path in SKILL.md resolves, and every canonical docs URL maps to an existing clerk-docs file.
prepareFirstFactor/setActive for new code) may only be relaxed if the SDK itself re-legitimizes the legacy surface — treat any such change as a major finding, not a routine edit.node_modules copy as authority; it reflects whatever the last install pulled, not the release being audited.# clerk-expo skill audit - <YYYY-MM-DD>
## Summary
<stamped vs current version, changelog entries reviewed, counts per bucket, largest drift>
## skills/mobile/clerk-expo/SKILL.md
### <section>
- [drift|gap|polish] <one-line description>
- source: packages/expo/src/<...>:<line> (or docs/<...>.mdx:<line>)
- target: skills/mobile/clerk-expo/SKILL.md:<line>
- change: <diff or concise before/after>
## skills/mobile/clerk-expo/references/<file>.md
...
## skills/mobile/clerk-expo/evals/evals.json
...
## Open questions
...
Keep the result skimmable so a maintainer can approve, reject, or apply each entry independently.
Take clerk/audit-expo-skill from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.