Test Writing Workflow
iOfficeAI/AionUi
Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.
Repository-specific testing guide. An agent skill from jmfederico/pi-web.
$ npx skills add jmfederico/pi-web --skill testing-guide -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jmfederico/pi-web testing-guide --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/testing-guide .claude/skills/testing-guide && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "testing-guide" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/testing-guide into .claude/skills/testing-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-guide", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jmfederico/pi-web/tree/main/.agents/skills/testing-guideType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jmfederico/pi-web --skill testing-guide -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jmfederico/pi-web testing-guide --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/testing-guide .agents/skills/testing-guide && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "testing-guide" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/testing-guide into .agents/skills/testing-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-guide", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jmfederico/pi-web --skill testing-guide -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jmfederico/pi-web testing-guide --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/testing-guide .cursor/skills/testing-guide && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "testing-guide" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/testing-guide into .cursor/skills/testing-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-guide", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jmfederico/pi-web.git --path .agents/skills/testing-guide--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jmfederico/pi-web --skill testing-guide -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jmfederico/pi-web testing-guide --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/testing-guide .gemini/skills/testing-guide && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "testing-guide" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/testing-guide into .gemini/skills/testing-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-guide", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jmfederico/pi-web testing-guideInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jmfederico/pi-web --skill testing-guide -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/testing-guide .github/skills/testing-guide && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "testing-guide" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/testing-guide into .github/skills/testing-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-guide", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jmfederico/pi-web --skill testing-guide -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jmfederico/pi-web testing-guide --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/testing-guide .opencode/skills/testing-guide && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "testing-guide" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/testing-guide into .opencode/skills/testing-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-guide", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
testing-guideRepository-specific testing guide. An agent skill from jmfederico/pi-web.
Testing Guide is an agent skill from jmfederico/pi-web. Repository-specific testing guide. Use for any test work: planning coverage, writing/fixing/reviewing Vitest tests, test helpers/fakes, failure triage, choosing test layers, and Lit UI tests, including the happy-dom DOM harness and TemplateResult handler extraction rules.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Unit testing. It works with Vitest. The repository describes itself as: Web UI for Pi Coding Agent that keeps sessions alive in real workspaces. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 15c13a4. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmnpxFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm and npx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Testing Guide loads about 2.6k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 1,371 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jmfederico/pi-web at commit 15c13a4, republished under its MIT licence (© jmfederico). 1,371 words, ~2,565 tokens.
.claude/skills/testing-guide/SKILL.md (or your agent's skills folder).Use this skill for test-specific decisions in this repository. The goal is useful regression coverage without letting test helpers, mocks, or component harnesses become a second application that is harder to maintain than the code under test.
For production-code design and testability seams, also use the code-quality-architecture skill. This guide owns test strategy, test helper conventions, and UI test escape hatches.
Use three questions when adding or reviewing a test:
Apply these as a review habit:
Prefer this order unless the behavior requires a higher layer:
npm run verify) when a change is cross-cutting, changes shared helpers/types, or before final merge review.Do not jump to a broad UI or integration test just because it feels more realistic if a lower layer proves the same behavior with less noise and less flake risk.
any unless the test is intentionally modeling an untyped external boundary.Test Lit components through public/component boundaries, choosing the narrowest seam that proves the behavior, in this order:
sessiondPanelNotices or chatQueuedMessageSections) and test that, rather than scraping rendered output.happy-dom is the standard DOM environment for Lit component tests. It is a declared devDependency, opted into per file with a docblock on the first line of the test file:
// @vitest-environment happy-domKeep the opt-in per file; never set a global environment in vitest.config.ts. Pure logic tests stay on the fast default node environment, and only DOM-touching tests pay the harness cost.
Use the harness for what the node environment cannot provide and the extraction escape hatch forbids: rendered shadow-DOM state, real events (click(), dispatchEvent), focus and activeElement, native form semantics (radio/checkbox grouping, checked), and ARIA wiring such as aria-describedby or aria-live. Instantiate the component, set properties per its contract, append it to document.body, and interact with the rendered controls instead of invoking Lit handlers.
happy-dom is not a browser. Do not assert layout, styling, visual state, real scroll geometry, or IntersectionObserver/ResizeObserver behavior with it. Stub missing APIs at the boundary — spy on Element.prototype.scrollIntoView, stub window.matchMedia — and assert the calls, not geometry.
Conventions:
afterEach: document.body.replaceChildren() and localStorage.clear() so DOM and storage state do not leak between tests.element.updateComplete after property changes or events before asserting; await it twice when the component schedules another render from within updated(), so any follow-up render has settled.Lit TemplateResult event-handler extraction means calling render(), inspecting the returned template's strings/values, finding an event handler near a marker, and invoking that handler directly. It is a legacy escape hatch, not the default: with the happy-dom harness available, the "render harness impractical" precondition below rarely holds, so rule out the pure-seam and happy-dom options before reaching for extraction.
Use TemplateResult handler extraction only when all of these are true:
Do not use TemplateResult handler extraction for:
When using this escape hatch:
src/client/src/templateInspection.testSupport.ts; keep any genuinely file-specific lookup small and type-guarded rather than copying new variants.Existing extraction tests are acceptable as-is. Convert them to a pure seam or the happy-dom harness opportunistically when the file is touched for other reasons; do not run a big-bang migration.
Delivery artifact checks are separate from the ordinary suite: run npm run build followed by npm run check:artifacts when changing emitted package contracts. The latter consumes the existing dist output and never refreshes it. See development and delivery checks for check ownership.
Run the narrowest meaningful check first:
npm test -- --run <test-file>.npm run typecheck.npx eslint <changed-file> or npm run lint when broader lint coverage is needed.npm run verify.Record exact commands and results when working under relay/audit workflows or when handing work to another agent.
© jmfederico, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/testing-guide of jmfederico/pi-web.
Open the folder on GitHubat commit 15c13a4
Testing Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Testing Guide this skilljmfederico/pi-web | 861 | — | ~2.6k | Automated safety check: Pass | MIT | |
| Test Writing WorkflowiOfficeAI/AionUi | 33k | 1 repos | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Test GuardamElnagdy/guard-skills | 1.3k | 2 repos | ~2.1k | Automated safety check: Pass | MIT | |
| Adding LLM MCP ToolsTriliumNext/Trilium | 38k | — | ~2.5k | Automated safety check: Pass | AGPL-3.0 | |
| Concept Page Test Writerleonardomso/33-js-concepts | 67k | — | ~5.5k | Automated safety check: Pass | MIT | |
| Archestra Dev Testingarchestra-ai/archestra | 4.3k | — | ~3.2k | Automated safety check: Pass | Custom licence |
iOfficeAI/AionUi
Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.
amElnagdy/guard-skills
Reviews newly written or edited tests against nine rules that cut test bloat, such as mock-heavy checks and near-duplicate cases, before they are committed.
TriliumNext/Trilium
A skill your agent uses when adding, changing, or reviewing an LLM/MCP tool in Trilium (the defineTools definitions under packages/trilium-core/src/services/llm/tools/ —…
leonardomso/33-js-concepts
Generates Vitest tests for every runnable code example on a JavaScript concept documentation page, following a four-phase extraction and conversion process.
archestra-ai/archestra
A skill your agent uses for test selection and quality across backend, frontend, and e2e; load its backend reference for Vitest projects, mocking, DB fixtures, and performance.
pixel-point/animate-text
Vitest testing framework patterns for test setup, async testing, mocking with vi., snapshots, and test performance (formerly test-vitest).
jmfederico/pi-web
A skill your agent uses whenever the user asks about changelogs, Changesets, release notes, conventional commits, commit messages for release notes, or making user-visible project changes that…
jmfederico/pi-web
A skill your agent uses whenever the user asks for a new npm version, npm release, package release, new release, version bump, publishing to npm, cutting a GitHub release, tagging a release, or…
jmfederico/pi-web
Project code quality and architecture expectations for implementation, refactoring, planning, and code review.
jmfederico/pi-web
Repository documentation placement and writing guidance. An agent skill from jmfederico/pi-web.
jmfederico/pi-web
Foundational, tool-agnostic Relay method for carrying long work across a chain of independent agent contexts, one bounded leg at a time.
jmfederico/pi-web
Opinionated full-lifecycle software-delivery profile for Relay chains in Git repositories.
Works with
Categories
Repository-specific testing guide. An agent skill from jmfederico/pi-web. Testing Guide is an agent skill from jmfederico/pi-web. Repository-specific testing guide.
Testing Guide fits situations like: any test work: planning coverage; writing/fixing/reviewing Vitest tests; test helpers/fakes; choosing test layers.
Run `npx skills add jmfederico/pi-web --skill testing-guide -a claude-code`. Or copy the skill folder (.agents/skills/testing-guide in jmfederico/pi-web) into .claude/skills/testing-guide in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jmfederico/pi-web --skill testing-guide -a codex`. Or copy the skill folder (.agents/skills/testing-guide in jmfederico/pi-web) into .agents/skills/testing-guide in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jmfederico/pi-web --skill testing-guide -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/testing-guide, .gemini/skills/testing-guide, .github/skills/testing-guide and .opencode/skills/testing-guide in your project.
Going by SKILL.md and its folder, Testing Guide needs the command-line tools its instructions call (npm and npx). Our summary lists: Node.js.
SKILL.md contains no URLs. Its commands use npm and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Testing Guide is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Testing Guide: Test Writing Workflow (iOfficeAI/AionUi, 33k stars), Test Guard (amElnagdy/guard-skills, 1.3k stars), Adding LLM MCP Tools (TriliumNext/Trilium, 38k stars) and Concept Page Test Writer (leonardomso/33-js-concepts, 67k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jmfederico (a GitHub user) maintains it in jmfederico/pi-web, which has 861 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.
Source: jmfederico/pi-web on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.