rcode-source-truthlisted
Install: claude install-skill hanzlahabib/rcode
@.rcode/references/karpathy-guidelines.md
## Overview
Training data goes stale. APIs change between major versions. This skill forces a doc-fetch step before any code that uses a third-party API, so the recommendation is grounded in the version actually installed in this project, not in what was true two years ago.
## Workflow
1. **Detect the version** of the relevant library from `package.json`, `pyproject.toml`, `Cargo.toml`, or a similar manifest.
2. **Fetch the doc page** for the API in question — preference order:
1. Local `node_modules/<lib>/README.md` and `.d.ts` typings (most authoritative for what's installed)
2. Upstream docs site for the matching version (e.g. `https://nextjs.org/docs/16/...`)
3. The library's GitHub release notes for the major version
3. **Quote the version-specific shape** in the output. Include the source URL or file path.
4. **Compare to project usage.** If the project is using a deprecated pattern, flag it but don't auto-rewrite — call it out and let the user decide.
5. **Write code** referencing only what the doc shows. No "I think this method is called X" without confirmation.
6. **Note the doc source in the commit message** when the implementation depends on a specific API version (e.g. `feat(api): use Next.js 16 unstable_after — see https://...`).
## Hard-listed sources for the rcode-default stack
| Layer | Authoritative source |
|---|---|
| Next.js | `https://nextjs.org/docs/<version>/` |
| React | `https://react.dev/refer