Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add personamanagmentlayer/pcl --skill jest-expertgit clone --depth 1 https://github.com/personamanagmentlayer/pclWrote 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.
[](https://agentmods.dev/skills/personamanagmentlayer/pcl/jest-expert)<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/jest-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/jest-expert/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.
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/jest-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/jest-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.01161 |
| Opus 5 | $0.00032 | $0.00580 |
| Sonnet 5 | $0.00013 | $0.00232 |
| Haiku 4.5 | $0.00006 | $0.00116 |
Grade A, and why
jest-expert 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Jest Expert
Core Concepts
Jest Framework
- Zero Config - Works out of the box
- Snapshot Testing - UI component testing
- Mocking - Functions, modules, and timers
- Code Coverage - Built-in coverage reports
- Watch Mode - Interactive test runner
- Parallel Testing - Fast test execution
Test Structure
- describe/it - Test organization
- Matchers - Assertion library
- Setup/Teardown - beforeEach, afterEach, beforeAll, afterAll
- Mock Functions - jest.fn(), jest.spyOn()
- Async Testing - Promises, async/await
- Test Lifecycle - Hooks and execution order
Advanced Features
- Custom Matchers - Extend expect
- Module Mocking - Mock entire modules
- Timer Mocks - Control time in tests
- Manual Mocks - mocks directory
- Configuration - jest.config.js
- Transformers - Babel, TypeScript support
Best Practices
Test Organization
- One test file per source file
- Group related tests with describe
- Use descriptive test names
- Follow AAA pattern (Arrange, Act, Assert)
- Keep tests simple and focused
- Test behavior, not implementation
Mocking
- Mock external dependencies
- Use jest.fn() for function mocks
- Clear mocks between tests
- Mock at the right level
- Avoid over-mocking
- Document mock behavior
Assertions
- Use specific matchers
- One assertion per test when possible
- Test edge cases
- Verify error conditions
- Use snapshots judiciously
- Provide clear failure messages
Coverage
- Aim for high coverage (80%+)
- Don't chase 100% coverage
- Focus on critical paths
- Test edge cases and errors
- Exclude generated code
- Review coverage reports
Anti-Patterns
Common Mistakes
- Testing implementation details
- Too many assertions in one test
- Sharing state between tests
- Not cleaning up after tests
- Ignoring async/await
- Hard-coding test data
Mocking Issues
- Over-mocking everything
- Not resetting mocks
- Mocking too deep
- Inconsistent mock data
- Forgetting to restore mocks
- Mocking what you don't need
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 168 lines · 65 tokens per session scan A a1a66d5a46f6
jest-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (40 stars, last pushed 3d ago), licensed Apache-2.0. It adds 65 tokens to every session and 1,161 once invoked, about $0.0003 per session on Opus 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-09-05.
Other skills, from other repositories
JavaScript Testing Patterns
Modern JavaScript testing strategies with Jest, Mocha, and testing best practices covering unit testing, integration testing, mocking, async patterns, and DOM testing.
Jest Mocking Patterns
Teaches the agent the right way to mock in Jest — jest.fn, mockImplementation, mockResolvedValue, jest.mock factories, spyOn with restore, and isolating modules like axios.
typescript-testing
TypeScript testing patterns with Jest/Vitest including unit tests, integration tests, mocking strategies, and coverage. Use when writing TypeScript tests.
Unit Test Scaffold (TypeScript)
Generate TypeScript unit test skeletons (Jest/Vitest) from specifications.
vitest
Vitest unit testing — Vite-powered, Jest-compatible. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
migrate-to-shoehorn
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.