agentleFS
yannelliyannelli/pi-rust/.claude/skills/node-compat-gap/SKILL.md

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.

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
  1. Distinctive:

    Read how Node 22 behaves. Write a small script and run it under real Node 22 to get the exact output and error codes.

    line 11
  2. Very specific:

    Update the unsupported.rs entry in the same change.

    line 13
  3. Very specific:

    Add a test in crates/pi-js/tests/ that compares with the Node output.

    line 14
  4. Very specific:

    Run the checks listed at the end of docs/agents/node-compat.md, including the Windows and armv7 cross-builds.

    line 15
  5. Very specific:

    Ask before adding a crate.

    line 17

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Close a Node API gap

Full playbook: docs/agents/node-compat.md. Rules for the crate: crates/pi-js/AGENTS.md.

  1. Find the entry in crates/pi-js/src/unsupported.rs (UNSUPPORTED_APIS or DIFFERENCES).
  2. Read how Node 22 behaves. Write a small script and run it under real Node 22 to get the exact output and error codes.
  3. Implement it in crates/pi-js/src/node/<module>.rs and crates/pi-js/src/js/<module>.js, following a module that already works.
  4. Update the unsupported.rs entry in the same change.
  5. Add a test in crates/pi-js/tests/ that compares with the Node output. Use run_cjs_within for anything that can hang.
  6. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.