node-compat-gap
Skill32 starsChanged 44 days agoMITView on GitHub
Close a Node 22 API gap in pi-js, the QuickJS runtime that runs pi extensions. Use when an extension needs a Node API that throws ERR_PI_UNSUPPORTED or behaves differently, or when working on entries in crates/pi-js/src/unsupported.rs.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/ci-release.mdcCursor rule
- .cursor/rules/parity.mdcCursor rule
- .cursor/rules/pi-js-node.mdcCursor rule
- .cursor/rules/pi-rust.mdcCursor rule
- ci-triageSkill
- parity-checkSkill
- port-upstream-commitSkill
- ship-releaseSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 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.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Read how Node 22 behaves. Write a small script and run it under real Node 22 to get the exact output and error codes.
- Very specific: line 13
Update the unsupported.rs entry in the same change.
- Very specific: line 14
Add a test in crates/pi-js/tests/ that compares with the Node output.
- Very specific: line 15
Run the checks listed at the end of docs/agents/node-compat.md, including the Windows and armv7 cross-builds.
- Very specific: line 17
Ask before adding a crate.
≈ “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
Close a Node API gap
Full playbook: docs/agents/node-compat.md. Rules for the crate: crates/pi-js/AGENTS.md.
- Find the entry in
crates/pi-js/src/unsupported.rs(UNSUPPORTED_APISorDIFFERENCES). - Read how Node 22 behaves. Write a small script and run it under real Node 22 to get the exact output and error codes.
- Implement it in
crates/pi-js/src/node/<module>.rsandcrates/pi-js/src/js/<module>.js, following a module that already works. - Update the
unsupported.rsentry in the same change. - Add a test in
crates/pi-js/tests/that compares with the Node output. Userun_cjs_withinfor anything that can hang. - Run the checks listed at the end of
docs/agents/node-compat.md, including the Windows and armv7 cross-builds.
Ask before adding a crate. A crate already in Cargo.lock, or a feature of an existing dependency, is fine when it builds for every release target.
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.

