fact-check
Verify technical accuracy of JavaScript concept pages by checking code examples, MDN/ECMAScript compliance, and external resources to prevent misinformation
What this skill does
# 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:**
```bash
# 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
| Check | How to Verify |
|-------|---------------|
| `console.log` outputs match comments | Run code or trace mentally |
| Variables are correctly named/used | Read through logic |
| Functions return expected values | Trace execution |
| Async code resolves in stated order | Understand event loop |
| Error examples actually throw | Test in try/catch |
| Array/object methods return correct types | Check MDN |
| `typeof` results are accurate | Test common cases |
| Strict mode behavior noted if relevant | Check if example depends on it |
#### Common Output Mistakes to Catch
```javascript
// 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 Type | MDN URL Pattern |
|--------------|-----------------|
| Web APIs | `https://developer.mozilla.org/en-US/docs/Web/API/{APIName}` |
| Global Objects | `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/{Object}` |
| Statements | `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/{Statement}` |
| Operators | `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/{Operator}` |
| HTTP | `https://developer.mozilla.org/en-US/docs/Web/HTTP` |
#### What to Verify Against MDN
| Claim Type | What to Check |
|------------|---------------|
| Method signature | Parameters, optional params, return type |
| Return value | Exact type and possible values |
| Side effects | Does it mutate? What does it affect? |
| Exceptions | What errors can it throw? |
| Browser support | Compatibility tables |
| Deprecation status | Any 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/
| Concept | Spec Section |
|---------|--------------|
| Type coercion | Abstract Operations (7.1) |
| Equality | Abstract Equality Comparison (7.2.14), Strict Equality (7.2.15) |
| typeof | The typeof Operator (13.5.3) |
| Objects | Ordinary and Exotic Objects' Behaviours (10) |
| Functions | ECMAScript Function Objects (10.2) |
| this binding | ResolveThisBinding (9.4.4) |
| Promises | Promise Objects (27.2) |
| Iteration | Iteration (27.1) |
#### Spec Verification Examples
```javascript
// 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
| Check | Pass Criteria |
|-------|---------------|
| Link works | Returns 200, content loads |
| Not paywalled | Free to access (or clearly marked) |
| JavaScript-focused | Not primarily about other languages |
| Not outdated | Post-2015 for modern JS topics |
| Accurate description | Our description matches actual content |
| No anti-patterns | Doesn't teach bad practices |
| Reputable source | From known/trusted creators |
#### Red Flags in External Resources
- Uses `vRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.