fact-check

46
6
Source

Verify technical accuracy of JavaScript concept pages by checking code examples, MDN/ECMAScript compliance, and external resources to prevent misinformation

Install

mkdir -p .claude/skills/fact-check && curl -L -o skill.zip "https://mcp.directory/api/skills/download/629" && unzip -o skill.zip -d .claude/skills/fact-check && rm skill.zip

Installs to .claude/skills/fact-check

About this skill

Skill: JavaScript Fact Checker

Use this skill to verify the technical accuracy of concept documentation pages for the 33 JavaScript Concepts project. This ensures we're not spreading misinformation about JavaScript.

When to Use

  • Before publishing a new concept page
  • After significant edits to existing content
  • When reviewing community contributions
  • When updating pages with new JavaScript features
  • Periodic accuracy audits of existing content

What We're Protecting Against

  • Incorrect JavaScript behavior claims
  • Outdated information (pre-ES6 patterns presented as current)
  • Code examples that don't produce stated outputs
  • Broken or misleading external resource links
  • Common misconceptions stated as fact
  • Browser-specific behavior presented as universal
  • Inaccurate API descriptions

Fact-Checking Methodology

Follow these five phases in order for a complete fact check.

Phase 1: Code Example Verification

Every code example in the concept page must be verified for accuracy.

Step-by-Step Process

  1. Identify all code blocks in the document

  2. For each code block:

    • Read the code and any output comments (e.g., // "string")
    • Mentally execute the code or test in a JavaScript environment
    • Verify the output matches what's stated in comments
    • Check that variable names and logic are correct
  3. For "wrong" examples (marked with ❌):

    • Verify they actually produce the wrong/unexpected behavior
    • Confirm the explanation of why it's wrong is accurate
  4. For "correct" examples (marked with ✓):

    • Verify they work as stated
    • Confirm they follow current best practices
  5. Run project tests:

    # Run all tests
    npm test
    
    # Run tests for a specific concept
    npm test -- tests/fundamentals/call-stack/
    npm test -- tests/fundamentals/primitive-types/
    
  6. Check test coverage:

    • Look in /tests/{category}/{concept-name}/
    • Verify tests exist for major code examples
    • Flag examples without test coverage

Code Verification Checklist

CheckHow to Verify
console.log outputs match commentsRun code or trace mentally
Variables are correctly named/usedRead through logic
Functions return expected valuesTrace execution
Async code resolves in stated orderUnderstand event loop
Error examples actually throwTest in try/catch
Array/object methods return correct typesCheck MDN
typeof results are accurateTest common cases
Strict mode behavior noted if relevantCheck if example depends on it

Common Output Mistakes to Catch

// Watch for these common mistakes:

// 1. typeof null
typeof null        // "object" (not "null"!)

// 2. Array methods that return new arrays vs mutate
const arr = [1, 2, 3]
arr.push(4)        // Returns 4 (length), not the array!
arr.map(x => x*2)  // Returns NEW array, doesn't mutate

// 3. Promise resolution order
Promise.resolve().then(() => console.log('micro'))
setTimeout(() => console.log('macro'), 0)
console.log('sync')
// Output: sync, micro, macro (NOT sync, macro, micro)

// 4. Comparison results
[] == false        // true
[] === false       // false
![]                // false (empty array is truthy!)

// 5. this binding
const obj = {
  name: 'Alice',
  greet: () => console.log(this.name)  // undefined! Arrow has no this
}

Phase 2: MDN Documentation Verification

All claims about JavaScript APIs, methods, and behavior should align with MDN documentation.

Step-by-Step Process

  1. Check all MDN links:

    • Click each MDN link in the document
    • Verify the link returns 200 (not 404)
    • Confirm the linked page matches what's being referenced
  2. Verify API descriptions:

    • Compare method signatures with MDN
    • Check parameter names and types
    • Verify return types
    • Confirm edge case behavior
  3. Check for deprecated APIs:

    • Look for deprecation warnings on MDN
    • Flag any deprecated methods being taught as current
  4. Verify browser compatibility claims:

    • Cross-reference with MDN compatibility tables
    • Check Can I Use for broader support data

MDN Link Patterns

Content TypeMDN URL Pattern
Web APIshttps://developer.mozilla.org/en-US/docs/Web/API/{APIName}
Global Objectshttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/{Object}
Statementshttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/{Statement}
Operatorshttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/{Operator}
HTTPhttps://developer.mozilla.org/en-US/docs/Web/HTTP

What to Verify Against MDN

Claim TypeWhat to Check
Method signatureParameters, optional params, return type
Return valueExact type and possible values
Side effectsDoes it mutate? What does it affect?
ExceptionsWhat errors can it throw?
Browser supportCompatibility tables
Deprecation statusAny deprecation warnings?

Phase 3: ECMAScript Specification Compliance

For nuanced JavaScript behavior, verify against the ECMAScript specification.

When to Check the Spec

  • Edge cases and unusual behavior
  • Claims about "how JavaScript works internally"
  • Type coercion rules
  • Operator precedence
  • Execution order guarantees
  • Claims using words like "always", "never", "guaranteed"

How to Navigate the Spec

The ECMAScript specification is at: https://tc39.es/ecma262/

ConceptSpec Section
Type coercionAbstract Operations (7.1)
EqualityAbstract Equality Comparison (7.2.14), Strict Equality (7.2.15)
typeofThe typeof Operator (13.5.3)
ObjectsOrdinary and Exotic Objects' Behaviours (10)
FunctionsECMAScript Function Objects (10.2)
this bindingResolveThisBinding (9.4.4)
PromisesPromise Objects (27.2)
IterationIteration (27.1)

Spec Verification Examples

// Claim: "typeof null returns 'object' due to a bug"
// Spec says: typeof null → "object" (Table 41)
// Historical context: This is a known quirk from JS 1.0
// Verdict: ✓ Correct, though calling it a "bug" is slightly informal

// Claim: "Promises always resolve asynchronously"
// Spec says: Promise reaction jobs are enqueued (27.2.1.3.2)
// Verdict: ✓ Correct - even resolved promises schedule microtasks

// Claim: "=== is faster than =="
// Spec says: Nothing about performance
// Verdict: ⚠️ Needs nuance - this is implementation-dependent

Phase 4: External Resource Verification

All external links (articles, videos, courses) must be verified.

Step-by-Step Process

  1. Check link accessibility:

    • Click each external link
    • Verify it loads (not 404, not paywalled)
    • Note any redirects to different URLs
  2. Verify content accuracy:

    • Skim the resource for obvious errors
    • Check it's JavaScript-focused (not C#, Python, Java)
    • Verify it's not teaching anti-patterns
  3. Check publication date:

    • For time-sensitive topics (async, modules, etc.), prefer recent content
    • Flag resources from before 2015 for ES6+ topics
  4. Verify description accuracy:

    • Does our description match what the resource actually covers?
    • Is the description specific (not generic)?

External Resource Checklist

CheckPass Criteria
Link worksReturns 200, content loads
Not paywalledFree to access (or clearly marked)
JavaScript-focusedNot primarily about other languages
Not outdatedPost-2015 for modern JS topics
Accurate descriptionOur description matches actual content
No anti-patternsDoesn't teach bad practices
Reputable sourceFrom known/trusted creators

Red Flags in External Resources

  • Uses var everywhere for ES6+ topics
  • Uses callbacks for content about Promises/async
  • Teaches jQuery as modern DOM manipulation
  • Contains factual errors about JavaScript
  • Video is >2 hours without timestamp links
  • Content is primarily about another language
  • Uses deprecated APIs without noting deprecation

Phase 5: Technical Claims Audit

Review all prose claims about JavaScript behavior.

Claims That Need Verification

Claim TypeHow to Verify
Performance claimsNeed benchmarks or caveats
Browser behaviorSpecify which browsers, check MDN
Historical claimsVerify dates/versions
"Always" or "never" statementsCheck for exceptions
Comparisons (X vs Y)Verify both sides accurately

Red Flags in Technical Claims

  • "Always" or "never" without exceptions noted
  • Performance claims without benchmarks
  • Browser behavior claims without specifying browsers
  • Comparisons that oversimplify differences
  • Historical claims without dates
  • Claims about "how JavaScript works" without spec reference

Examples of Claims to Verify

❌ "async/await is always better than Promises"
→ Verify: Not always - Promise.all() is better for parallel operations

❌ "JavaScript is an interpreted language"
→ Verify: Modern JS engines use JIT compilation

❌ "Objects are passed by reference"
→ Verify: Technically "passed by sharing" - the reference is passed by value

❌ "=== is faster than =="
→ Verify: Implementation-dependent, not guaranteed by spec

✓ "JavaScript is single-threaded"
→ Verify: Correct for the main thread (Web Workers are separate)

✓ "Promises always resolve asynchronously"
→ Verify: Correct per ECMAScript spec

Common JavaScript Misconceptions

Watch for these misconceptions being stated as fact.

Type System Misconceptions

MisconceptionRealityHow to Verify
typeof null === "object" is intentionalIt's a b

Content truncated.

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

1,5711,369

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

1,1161,191

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

1,4181,109

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

1,194747

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

1,154684

pdf-to-markdown

aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

1,312614

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.