{
  "markdown": "# Wallaby skills\n\nAgent skills for creating, running, investigating, and improving JavaScript, TypeScript, and Python tests with [Wallaby](https://wallabyjs.com). These skills give coding agents workflows for using live test results, coverage, execution traces, and runtime values while working on a codebase.\n\nWallaby runs a project's existing tests through their test framework and automatically reruns affected tests as files change. The skills explain how to use that feedback to diagnose failures, verify changes, and add tests that protect observable behavior.\n\n## wallaby\n\n`wallaby` is a router for predefined workflows invoked through explicit subcommands. Each workflow defines its scope, execution steps, and verification criteria. The skill depends on [`wallaby-cli`](skills/wallaby-cli/SKILL.md) for test execution, runtime evidence, and verification.\n\nInvoke it as `$wallaby <subcommand> [instructions]`.\n\n### improve\n\nUse this workflow to find meaningful gaps in a test suite and strengthen its assertions. It reviews uncovered branches, weak assertions, boundary behavior, failure paths, and other cases where tests may miss a defect.\n\nWithout an explicit scope or signal, it considers repository source files with coverage at or below 95% and uses change risk to prioritize them. You can specify a file, directory, Git change set, or signal. With an explicit scope and no signal, it reviews every meaningful source file in that scope regardless of coverage. You can also request a test-quality review without using coverage, complexity, or change risk to select candidates.\n\nExample requests:\n\n```text\n$wallaby improve\n$wallaby improve src/accounts.ts\n$wallaby improve the files changed in this branch\n$wallaby improve src/ with coverage below 90%\n$wallaby improve tests/ without using coverage, complexity, or CRAP as discovery signals\n```\n\nThe workflow prefers test-only changes. When a test demonstrates a product defect, it can make a source fix backed by the intended behavior and a regression test. Any applicable coverage threshold is a review bar; completion depends on protecting meaningful behavior and explaining any remaining gaps.\n\nSee [SKILL.md](skills/wallaby/SKILL.md) for subcommand routing and dependencies, and the [improve workflow](skills/wallaby/references/improve.md) for discovery, verification, and reporting details.\n\n### write\n\nUse this workflow to write new tests one at a time. Before writing each test, the agent states its expected behavior and predicts which source regions it will cover or leave untouched. It then checks the result against that test's Wallaby coverage, investigates mismatches, and reviews assertion quality before moving on.\n\nSpecify a source file, test file, directory, change set, or behavior. Without an explicit target, the workflow uses the current task context and asks for a target when none is available. It covers meaningful scenarios, boundaries, and failure paths within that scope, with no default coverage percentage.\n\nExample requests:\n\n```text\n$wallaby write src/accounts.ts\n$wallaby write tests/accounts.spec.ts\n$wallaby write tests for the account suspension behavior we discussed\n$wallaby write tests for the files changed in this branch\n```\n\nEvery accepted test needs verified execution and assertions that would catch a plausible defect. Mutation checks are optional when that evidence leaves doubt. The workflow prefers test-only changes but can fix a proven source defect with a regression test. It reports predictions and results as brief live updates and finishes with verification and any unresolved gaps.\n\nSee the [write workflow](skills/wallaby/references/write.md) for the per-test process and quality criteria.\n\n## wallaby-cli\n\n`wallaby-cli` gives coding agents a CLI interface to Wallaby. Through this skill, an agent can use Wallaby's test execution, coverage analysis, execution traces, runtime inspection, and snapshot management while creating tests, implementing features, fixing bugs, or reviewing code.\n\nThis skill is model-invocable: the agent can select it automatically when relevant to the task. You can ask in plain language without typing `$wallaby-cli`, and the agent chooses the commands and runtime evidence it needs.\n\nThe skill can connect to an existing Wallaby session or start one in the background. Wallaby keeps results current as files change, so the agent can establish a baseline, check affected tests while editing, and verify the full project when needed. It starts with concise reports and opens details for a specific file, test, or source location as the investigation requires.\n\nThe agent can find which tests reach a line or expression, inspect uncovered branches, follow one test's execution across files, and capture runtime values without editing source code. Test timings, complexity, and change risk help it decide where to investigate further. These capabilities are available throughout a coding task and can also support workflows defined by other skills.\n\nThe examples below illustrate tasks the agent can carry out with `wallaby-cli`. They may come from a direct user request, instructions in another skill, or the agent's own reasoning about what to investigate or verify next.\n\n### Plan changes and establish a baseline\n\n```text\nBefore changing src/accounts.ts, establish a baseline of project-wide test results and coverage, and identify the tests that cover the file.\n```\n\n```text\nEstablish a baseline for the account changes by running only tests/accounts.spec.ts and tests/contracts.spec.ts. Report failures and coverage for that scope.\n```\n\n```text\nWhich tests reach the validation expression on line 42 of src/accounts.ts, and which outcomes remain uncovered?\n```\n\n### Write tests for new behavior and bug reports\n\n```text\nWrite tests for the new account suspension behavior described in the requirements. Verify that they exercise the intended paths, assert the expected state changes, and keep coverage above 95% for the affected source files.\n```\n\n```text\nReproduce the expired-coupon bug in a regression test. Use its execution trace and runtime values to confirm that it fails for the reported reason.\n```\n\n### Investigate and fix tests\n\n```text\nFix failing tests.\n```\n\n```text\nTrace \"coupon / rejects an expired coupon\" in tests/coupon.spec.ts across setup and source files to explain its failure, fix the cause, and verify the result.\n```\n\n```text\nThe test \"coupon / accepts a valid coupon\" passes unexpectedly. Trace its execution and check whether it reaches the validation logic.\n```\n\n```text\nInvestigate the incorrect checkout total. Inspect discount and total in src/checkout.ts and taxRate in src/tax.ts, then focus on values from the failing test to find the cause.\n```\n\n```text\nUpdate snapshots in tests/receipt.spec.ts and tests/invoice.spec.ts to reflect the intended formatting changes, then verify the affected tests.\n```\n\n### Review results and compare reports\n\n```text\nRead the saved baseline reports and compare them with the current full-project results. Show new or resolved failures and coverage changes for each affected source file and the project overall.\n```\n\n```text\nList the tests in tests/accounts.spec.ts with their status, timing, errors, logs, and the source files they cover.\n```\n\n```text\nCompare coverage gaps across src/accounts.ts, src/contracts.ts, and src/checkout.ts in one report, including uncovered lines and partially covered expressions.\n```\n\n```text\nShow the top 10 slowest tests in the project, sorted by execution time, with their names, locations, and timings.\n```\n\n```text\nShow the top 5 source files with the lowest test coverage, sorted from lowest to highest, with their coverage percentages.\n```\n\n### Project instructions\n\nAdd project-specific instructions to `AGENTS.md` to tell the agent which Wallaby configuration to use and when to use Wallaby instead of invoking Jest or Vitest directly. For example:\n\n```markdown\nUse the wallaby-cli skill to run, investigate, and verify unit tests for the project.\nUse `./wallaby.unit.js` as the configuration file.\nUse Wallaby for this test work instead of running Jest or Vitest directly, unless the user explicitly requests a direct run.\n```\n\nSee [SKILL.md](skills/wallaby-cli/SKILL.md) for environment requirements, package-manager-specific invocation commands, and report documentation.\n",
  "bytes": 8337,
  "sha": "47c2136d471322bbbbbc675b67fbf623d942d5d093661da5e6c44b56c993c360",
  "repo_slug": "wallabyjs/skills",
  "fonte": "repo",
  "truncated": false,
  "api": "https://api.agentalog.com/api/listings/skl_wallabyjs_skills_wallaby_cli_5c64569a/readme"
}