test-us

Generate and run real-infrastructure pytest tests from User Story acceptance criteria.

Updated May 1, 2026
One-click install
npx skills add https://github.com/ricardoo022/4dill --skill test-us-ricardoo022
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-us
Source: https://github.com/ricardoo022/4dill/tree/main/.gemini/skills/test-us
Command: npx skills add https://github.com/ricardoo022/4dill --skill test-us-ricardoo022

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing tests that actually prove a User Story works is hard: teams often settle for mocked unit tests that pass while real database, Docker, or HTTP behavior stays unverified. This Skill reads acceptance criteria from docs/USER-STORIES.md, selects the deepest testable layer (integration > agent > unit, E2E only for full scan flows), and generates pytest tests that run against real PostgreSQL, real Docker, and real HTTP. ## Core Features & Use Cases - Layer-aware test planning: Classifies each User Story by the infrastructure it touches (database, Docker, LangChain tools, Graphiti/Neo4j, agent graphs) and targets the correct test directory with the right pytest marker. - Round-trip proof tests: Enforces insert → retrieve → assert → cleanup cycles against real services, with realistic domain data (CVEs, nmap output, real model names) instead of toy fixtures. - Approval-gated workflow: Presents a structured test plan for approval before writing any files, then implements, runs, and reports pass/fail results without ever weakening a failing test. - Use Case: After implementing US-013 (flow persistence), invoke the Skill to get an integration test that creates a flow via the real code path, reads it back from a testcontainers PostgreSQL instance, asserts exact field values, and verifies cascade deletion. ## Quick Start Ask the assistant to run /test-us US-013 to generate and execute real-infrastructure tests for that User Story.

Frequently Asked Questions about test-us

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

FAQPage Schema
How do I generate pytest tests from user story acceptance criteria?▼

Invoke the Skill with a User Story ID such as /test-us US-013. It reads docs/USER-STORIES.md, extracts the acceptance criteria and required tests, presents a test plan for approval, then writes and runs the tests.

How do I choose between integration, agent, and unit test layers in pytest?▼

Classify the story by the infrastructure it touches: database, Docker, tools, or Graphiti go to integration; agent graph routing goes to agent; pure Pydantic validation goes to unit. The priority rule is integration over agent over unit, with E2E reserved for full scan flows.

Can I test multiple user stories in one run?▼

Yes, pass multiple IDs such as /test-us US-008 US-009 and they are processed sequentially, one test plan per story. Running without an ID prompts you to provide one.

Does this approach use mocks for database and Docker tests?▼

No. When real infrastructure is available it must be used: testcontainers spins up real PostgreSQL with pgvector, and a real Docker daemon runs containers. Only the LLM is mocked in agent-layer tests, using realistic tool call sequences.

What happens when a generated test fails?▼

Failures are reported with error summaries and concrete next steps, and the Skill never edits a failing test just to make it pass. If the failure reveals missing implementation, it reports the tests as defining required behavior so the production code gets fixed.