agentleFS
MicrosoftKnown publishermicrosoft/durabletask-js/.github/skills/js-fact-checking/SKILL.md

js-fact-checking

Skill14 starsChanged 3 months agoMITView on GitHub

Use this skill whenever you are about to commit a claim about JavaScript, TypeScript, or Node.js runtime behavior into code, documentation, PR comments, or copilot instructions. This includes: Trigger conditions: - You are writing or reviewing JS/TS code that relies on specific runtime behavior - You are adding a lesson to copilot-instructions.md about a Node.js pitfall - You are explaining why code works a certain way in a PR description or comment - You are making a claim in the…

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill whenever you are about to commit a claim about JavaScript, TypeScript, or Node.js runtime behavior into code, documentation, …

    line 5
  2. Distinctive:

    Search the following authoritative sources in priority order:

    line 35
  3. Very specific:

    Use runTerminal with curl to retrieve the relevant API page

    line 38
  4. Distinctive:

    Look for the specific section about the API in question

    line 39
  5. Distinctive:

    Use for ambiguous cases not clearly documented elsewhere

    line 52
  6. Distinctive:

    Do NOT hallucinate documentation quotes: If you cannot find the relevant docs, say so and escalate to the simulation skill.

    line 128

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Skill: JS/TS/Node.js Fact-Checking

When to Use

Use this skill whenever you are about to commit a claim about JavaScript, TypeScript, or Node.js runtime behavior into code, documentation, PR comments, or copilot instructions. This includes:

  • Assertions about how a Node.js API works (EventEmitter, Streams, Timers, etc.)
  • Claims about TypeScript type system behavior
  • Statements about ECMAScript specification semantics
  • Performance characteristics of specific patterns
  • Module system behavior (CommonJS vs ESM)
  • Async/await, Promise, and event loop semantics

Trigger conditions:

  • You are writing or reviewing JS/TS code that relies on specific runtime behavior
  • You are adding a lesson to copilot-instructions.md about a Node.js pitfall
  • You are explaining why code works a certain way in a PR description or comment
  • You are making a claim in the node-js-pitfall or bug-pattern category
  • You are uncertain about how a specific API behaves in edge cases

How to Execute

Step 1: Identify the Claim

Clearly state the specific behavioral claim you need to verify. Examples:

  • "EventEmitter.emit() discards the return value of async listeners"
  • "Promise.all() rejects on the first rejection and ignores remaining results"
  • "setTimeout with 0ms delay defers to the next event loop tick, not immediately"
  • "Generators cannot be restarted after returning"

Step 2: Search Official Documentation

Search the following authoritative sources in priority order:

  1. Node.js Official Docs — https://nodejs.org/api/
    • Use runTerminal with curl to retrieve the relevant API page
    • Look for the specific section about the API in question
    • Pay attention to "Stability" markers and version-specific behavior
  2. MDN Web Docs — https://developer.mozilla.org/en-US/docs/Web/JavaScript/
    • Authoritative for ECMAScript-level behavior (Promises, generators, etc.)
    • Includes browser + Node.js compatibility info
  3. TypeScript Handbook — https://www.typescriptlang.org/docs/handbook/
    • For TypeScript-specific type system questions
    • Especially generics, conditional types, module resolution
  4. ECMAScript Specification — https://tc39.es/ecma262/
    • Last resort for spec-level semantics
    • Use for ambiguous cases not clearly documented elsewhere

Step 3: Extract Evidence

From the documentation, extract:

  1. Direct quote that confirms or denies the claim
  2. URL of the specific documentation page
  3. Relevant version info (is this behavior Node.js version-specific?)
  4. Edge cases or caveats mentioned in the docs

Step 4: Render Verdict

Produce a structured verdict:

## Fact-Check: <claim summary>

**Verdict:** ✅ CONFIRMED / ❌ REFUTED / ⚠️ PARTIALLY CORRECT / ❓ INCONCLUSIVE

**Source:** <URL to official documentation>

**Evidence:**
> <Direct quote from documentation>

**Caveats:**
- <Any edge cases or version-specific behavior>

**Confidence:** HIGH / MEDIUM / LOW

Step 5: Act on the Verdict

  • CONFIRMED (HIGH confidence): Proceed with the code change or documentation update.
  • REFUTED: Correct the claim before proceeding. Document the correct behavior.
  • PARTIALLY CORRECT: Refine the claim to be precise. Add caveats.
  • INCONCLUSIVE or LOW confidence: Escalate to the simulation skill (.github/skills/simulation/SKILL.md) to empirically verify the behavior by writing and running a minimal reproduction script.

Examples

Example 1: Checking EventEmitter async behavior

Claim: "EventEmitter.emit() ignores the return value of listeners, so async listeners cause unhandled promise rejections."

Search: Fetch https://nodejs.org/api/events.html

Evidence found:

"The EventEmitter calls all listeners synchronously in the order in which they were registered." "Using async functions with event handlers is problematic, because it can lead to an unhandled rejection in case of a thrown exception."

Verdict: ✅ CONFIRMED (HIGH confidence)

Example 2: Checking generator restart behavior

Claim: "A generator function can be called again after it returns done: true to restart from the beginning."

Search: Fetch MDN Generator documentation

Evidence found:

"Calling the next() method with an argument will resume the generator function execution..." but the generator object itself cannot be reset. Calling the generator function again creates a new generator object.

Verdict: ⚠️ PARTIALLY CORRECT — The generator function can be called again to get a new iterator, but the existing generator object cannot be restarted.

Important Notes

  • Do NOT rely on Stack Overflow or blog posts as primary sources. Only use official documentation.
  • Do NOT hallucinate documentation quotes. If you cannot find the relevant docs, say so and escalate to the simulation skill.
  • Version matters. This SDK targets Node.js >= 22. Some APIs behave differently in older versions.
  • CommonJS vs ESM matters. This SDK currently uses CommonJS output. Behavior differences between module systems are relevant.

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.

Reviews can't be read right now.

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.