# Zoo Test Writing

> Write or update tests that define expected behavior for a Zoo active subtask. Use only when explicitly requested.

- **Type:** Skill
- **Install:** `agentstack add skill-andreyvit-zoo-zoo-test-writing`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [andreyvit](https://agentstack.voostack.com/s/andreyvit)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [andreyvit](https://github.com/andreyvit)
- **Source:** https://github.com/andreyvit/zoo/tree/main/.claude/skills/zoo-test-writing

## Install

```sh
agentstack add skill-andreyvit-zoo-zoo-test-writing
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Zoo Test Writing

Read and follow `.zoo/zoo.md` if it exists.

Use this when writing or updating tests for a Zoo active subtask.

Goal: create robust tests that define expected behavior before implementation.

Read and follow `.zoo/testing.md` if it exists.

## Test Method

- Prefer failing-first tests and verify the failure reason matches intent.
- Keep test scope focused on the active `(next)` subtask.
- Do not write tests that force unapproved scope expansion. If the natural test exposes significant expansion outside the direct ask, use `zoo-refactoring` and the proposal-first route before encoding that broader behavior as current-task acceptance.
- Write one test at a time: make it compile, run it, verify it fails for the intended reason, and only then add another test when needed.
- Choose the correct package before writing.
- Use `zoo-refactoring` when test work exposes a need to change pre-existing code outside the active subtask. It routes consequential cross-cutting changes to proposals, broad mundane refactors to separate subtasks/commits, and small low-pollution edits into the current task.
- If refactoring routes to a proposal, write the proposal when appropriate and mention the path in the test report. If it routes to a separate subtask, write a `Refactoring request` and let the orchestrator update workflow state.
- Use integration tests by default unless algorithmic code justifies unit tests.
- For wiring components, use integration tests with real production objects; isolated algorithm tests are not enough when the risk is incorrect subsystem wiring.
- Make nondeterminism deterministic with fixed clocks, seeds, or controlled inputs when possible, then assert exact values.
- Avoid rewriting requirements in tests; encode observable behavior.
- Keep test code comment-free except for rare WHY comments. Replace explanatory comments and assertion messages with clearer names, helpers, or structure.
- For browser-impact subtasks, define the browser verification intent: impacted flows, expected assertions, and required testability hooks/selectors.
- For dropdown/popover/disclosure/select behavior, cover open, dismiss, select, submit, and persist as applicable.
- Report testability gaps in the spec or plan immediately.

## Report Handoff

Include `Final-state validation` in the test report:

- commands run after your last file change in this step
- result on the exact state you left: `passed`, `failed`, `expected failing-first failure`, or `not run`
- whether any file changed after those commands
- if not passed on the state you left, the exact command the implementer or orchestrator should run later

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [andreyvit](https://github.com/andreyvit)
- **Source:** [andreyvit/zoo](https://github.com/andreyvit/zoo)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-andreyvit-zoo-zoo-test-writing
- Seller: https://agentstack.voostack.com/s/andreyvit
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
