write-tests

Generate automated test suites with harness detection and runner selection.

121|2|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/AgentSystemLabs/core --skill write-tests-agentsystemlabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-tests
Source: https://github.com/AgentSystemLabs/core/tree/main/plugins/agentsystem-core/skills/write-tests
Command: npx skills add https://github.com/AgentSystemLabs/core --skill write-tests-agentsystemlabs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you reliably expand or add automated tests so code changes don’t ship without coverage, while choosing the right test harness and writing assertions that validate externally observable behavior.

Core Features & Use Cases

  • Phased test-creation workflow: scopes what to test, detects an existing test harness, and only then generates the suite.
  • Harness detection + safe runner proposal: detects Vitest/Jest/Playwright/pytest/go test/cargo test/RSpec/JUnit via config, lockfiles, and scripts, and proposes the smallest runner when missing.
  • Smoke-test hard gate: writes one trivial “green” test first, then expands to the full suite.
  • Convention inheritance: matches existing test location, naming, assertion style, and mocking/DB policy.
  • Behavior-first assertions: focuses on contracts (return values, DB rows, responses, events) instead of mirroring implementation details.

Quick Start

Ask your agent to write tests for the selected feature or module and confirm the detected (or proposed) test runner so it generates a smoke test and a complete behavioral test suite.

Frequently Asked Questions about write-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add automated tests to an existing module without a configured test runner?

To add automated tests without a configured runner, this Skill proposes the smallest appropriate test runner for your stack and generates a complete behavioral test suite after passing an initial smoke test gate.

Can I generate integration tests for both Python and Go projects using the same workflow?

Yes, you can generate integration tests across Python/pytest and Go/go test, as the workflow detects existing test harnesses across multiple stacks and applies convention inheritance to match your project's specific assertion style.

What's the best way to ensure new unit tests validate behavior instead of mirroring implementation details?

The best way to ensure behavioral unit tests is to assert externally observable contracts like return values, database rows, and API responses, avoiding tautological assertions while using mocks strictly at third-party API boundaries.

Does test generation work if my project uses a real test database instead of mocking everything?

Yes, test generation supports a real test database by applying mocks only at third-party API boundaries, ensuring your integration tests validate actual data persistence behavior rather than completely mocked interactions.

Why does the test-writing process require a passing smoke test before generating the full suite?

A passing smoke test is required as a hard gate to verify the detected or proposed test runner is correctly configured, ensuring the subsequent expansion to the full behavioral suite executes reliably.

How do I expand test coverage for a modified feature without breaking existing test conventions?

To expand coverage for modified features, the workflow detects your existing test location, naming, and assertion style, then generates additional tests that adhere to those conventions while validating the realigned behavior.