# Write Focused Behavior Tests

Teams often add brittle tests that mirror implementation details instead of user behavior. This skill guides Claude, Codex, and Claude Code to write focused tests for critical workflows.

## Install

```bash
npx skillstore add eis-its/testing-test-writing
```

## Metadata

- Status: approved
- Slug: eis-its-testing-test-writing
- Skillstore revision: r1
- Version status: missing
- Tree hash: 0a16cb36671cf3f5a1429c36dfe0bc7cee3b5bde021f98e96ac6ae046c59c5d3
- Author: EIS-ITS
- GitHub username: EIS-ITS
- License: MIT
- Repository: https://github.com/EIS-ITS/vss-cli/tree/main/.claude/skills/testing-test-writing
- Ref: 26421118b848d9f1efc0aa169d8a7a9e7e0a877e
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: filesystem
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/eis-its-testing-test-writing
- Manifest: https://skillstore.pages.dev/api/skills/eis-its-testing-test-writing/manifest

## Capabilities

- Identifies core user flows and critical business paths that need tests.
- Promotes clear test names that describe expected behavior.
- Supports unit and integration test planning for Jest, Mocha, RSpec, pytest, and JUnit.
- Guides dependency mocking for APIs, databases, and file systems.
- Encourages fast tests that avoid implementation details.

## Use Cases

- Add Feature Tests: Add focused tests after building a new workflow, with names that describe the user-visible behavior.
- Translate Acceptance Criteria: Turn acceptance criteria into concise unit and integration tests for business-critical paths.
- Guide Test Reviews: Set consistent testing expectations during reviews and refactors without requiring broad test rewrites.

## Prompt Templates

### Create a Basic Unit Test

```
Use this skill to write a minimal unit test for [function or component]. Focus on the main behavior and mock external dependencies.
```

### Cover a User Flow

```
Use this skill to plan tests for [workflow]. Identify the critical path, choose coverage type, and avoid implementation details.
```

### Refactor Brittle Tests

```
Use this skill to review existing tests for [feature]. Suggest behavior-based names, reduce brittle assertions, and keep useful coverage.
```

### Design Critical Coverage

```
Use this skill to design focused coverage for [feature]. Separate primary workflows, failure handling, mocks, fixtures, and out-of-scope tests.
```

## Limitations

- Does not provide runnable framework adapters or helper libraries.
- Depends on the assistant understanding the project code and test framework.
- May not cover exhaustive edge cases or formal coverage targets.
- Referenced detailed standards may need to be available in the repository.

## Best Practices

- Start with the primary user outcome before adding edge cases.
- Mock only dependencies that make tests slow, unstable, or external.
- Use test names that describe behavior in plain language.

## Anti Patterns

- Testing private implementation details instead of observable behavior.
- Adding broad edge-case suites before the core path is protected.
- Using excessive mocks that hide real integration problems.

## Security Audit

- Audited at: 2026-07-09T14:27:08.754\+00:00
- Summary: The only static finding is a hardcoded Markdown link in SKILL.md that uses parent-directory segments to reference a testing standards document. I did not find prompt injection, exfiltration intent, or executable behavior in the scanned file.

## Stats

- Views: 223
- Downloads: 14
- Favorites: 0
- Popularity score: 0
