33-js-concepts: Skill for Claude Code

.claude/skills/test-writer/SKILL.md

test-writer is a skill for Claude Code from leonardomso/33-js-concepts. It costs 26 tokens per session (5,390 once invoked), scanned A, original, MIT.

A guide for generating Vitest tests for JavaScript examples in concept documentation. Vitest is a JavaScript testing tool used to run automated checks.

In plain words
What is it for?
Use it after writing or editing a concept page to extract its examples, test runnable and DOM-based code, check expected errors, and document snippets that cannot be tested.
Why use it?
It helps catch examples whose output, errors, browser behavior, or documented claims do not match what the code actually does.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is leonardomso/33-js-concepts's own configuration. It tells Claude Code how to work on 33-js-concepts itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything 33-js-concepts configures →

not rated 67krepo +6 16d ago A scan Socket: passSnyk: passSkillSpector: pass 26 tokens original MIT
About the project

33 JavaScript Concepts is a learning guide that explains core JavaScript ideas through practical examples and selected resources. It helps developers understand topics such as primitive values, objects, coercion, equality, scope, closures, and the call stack. The catalogue add-ons provide skills related to studying or working with the guide.

leonardomso/33-js-concepts · 66,529 stars · on GitHub · 33jsconcepts.com

Reuse

Borrowing it

Nothing to install: this file belongs to leonardomso/33-js-concepts. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/leonardomso/33-js-concepts/master/.claude/skills/test-writer/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/leonardomso/33-js-concepts

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/leonardomso/33-js-concepts/test-writer/github.svg)](https://agentmods.dev/skills/leonardomso/33-js-concepts/test-writer)
Your own site
<a href="https://agentmods.dev/skills/leonardomso/33-js-concepts/test-writer"><img src="https://agentmods.dev/badge/skills/leonardomso/33-js-concepts/test-writer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-writer

Your own site · 80×15
<a href="https://agentmods.dev/skills/leonardomso/33-js-concepts/test-writer"><img src="https://agentmods.dev/badge/skills/leonardomso/33-js-concepts/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,390 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 15 Feb 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.05390
Opus 5.5 $0.00010 $0.02156
Sonnet 5.5 $0.00005 $0.01078
Haiku 4.5 $0.00003 $0.00539

Measured 2mo ago against content hash 76dda6fa2dd6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/test-writer/SKILL.md · 941 lines

How it starts

The opening of the file, as written. The whole thing — 941 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: Test Writer for Concept Pages

Use this skill to generate comprehensive Vitest tests for all code examples in a concept documentation page. Tests verify that code examples in the documentation are accurate and work as described.

When to Use

  • After writing a new concept page
  • When adding new code examples to existing pages
  • When updating existing code examples
  • To verify documentation accuracy through automated tests
  • Before publishing to ensure all examples work correctly

Test Writing Methodology

Follow these four phases to create comprehensive tests for a concept page.

Phase 1: Code Example Extraction

Scan the concept page for all code examples and categorize them:

Category Characteristics Action
Testable Has console.log with output comments, returns values Write tests
DOM-specific Uses document, window, DOM APIs, event handlers Write DOM tests (separate file)
Error examples Intentionally throws errors, demonstrates failures Write tests with toThrow
Conceptual ASCII diagrams, pseudo-code, incomplete snippets Skip (document why)
Browser-only Uses browser APIs not available in jsdom Skip or mock

Phase 2: Determine Test File Structure

tests/
├── fundamentals/              # Concepts 1-6
├── functions-execution/       # Concepts 7-8
├── web-platform/             # Concepts 9-10
├── object-oriented/          # Concepts 11-15
├── functional-programming/   # Concepts 16-19
├── async-javascript/         # Concepts 20-22
├── advanced-topics/          # Concepts 23-31
└── beyond/                   # Extended concepts
    └── {subcategory}/

File naming:

  • Standard tests: {concept-name}.test.js
  • DOM tests: {concept-name}.dom.test.js

Phase 3: Convert Examples to Tests

For each testable code example:

  1. Identify the expected output (from console.log comments or documented behavior)
  2. Convert to expect assertions
  3. Add source line reference in comments
  4. Group related tests in describe blocks matching documentation sections

Read the full file on GitHub · 941 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 941 lines · 26 tokens per session scan A 76dda6fa2dd6

Subscribe to this mod's changes

test-writer is a skill published in the GitHub repository leonardomso/33-js-concepts (66,529 stars, last pushed 16d ago), licensed MIT. It adds 26 tokens to every session and 5,390 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

test-writer compared with skills from other repositories

test-writer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-writerleonardomso/33-js-conceptsSkill67k16d agoMITA26Claude Code
image-studio-ui-testsAutomattic/wp-calypsoSkill13ktodayGPL-2.0A52Claude Code, Codex
authoring-data-quality-checksPostHog/posthogSkill41ktodaynoneA174Claude Code, Codex
authoring-benchmarksNVIDIA/elementsSkill113todayApache-2.0A105Claude Code, Codex
chart-defaultsag-grid/ag-chartsSkill489todaynoneA60Claude Code, Codex
compiler-commitreact/reactSkill252kyesterdayMITA42Claude Code
compiler-portreact/reactSkill252kyesterdayMITA35Claude Code