trace

Generate vertical traces and RED contract tests from feature specs.

36|3|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/2lab-ai/oh-my-claude --skill trace-2lab-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trace
Source: https://github.com/2lab-ai/oh-my-claude/tree/main/plugins/stv/skills/trace
Command: npx skills add https://github.com/2lab-ai/oh-my-claude --skill trace-2lab-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of comprehensive vertical traces and RED contract tests from feature specs, eliminating manual, error-prone mapping between API requests and persisted state so teams can detect transformation bugs early.

Core Features & Use Cases

  • Extracts scenario lists from spec.md and explores the codebase to locate relevant handlers, services, and repositories.
  • Produces 7-section vertical traces that document API entry, input validation, per-layer parameter transformation arrows, side effects, error paths, output, and observability.
  • Derives RED contract tests (happy/sad/side-effect/contract) that purposely fail until implementation matches the trace, and maintains a Delta Protocol changelog for trace evolution.
  • Use case: convert a feature spec into docs/feature/trace.md plus failing tests to drive development and ensure end-to-end parameter mapping from Request fields to DB columns.

Quick Start

Use the trace skill to read docs/my-feature/spec.md, generate docs/my-feature/trace.md, and scaffold RED contract tests for each scenario.

Frequently Asked Questions about trace

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

FAQPage Schema
How do I generate failing contract tests from API specs?

To generate failing contract tests from API specs, apply a spec-driven trace skill to your spec.md file. It extracts endpoint scenarios and outputs RED contract tests that purposely fail until your implementation matches the documented request-to-database parameter transformations.

What is vertical tracing for API scenarios?

Vertical tracing for API scenarios is documenting the end-to-end parameter transformation chain from API request fields to database columns. It maps input validation, per-layer transformations, side effects, error paths, and observability across handlers, services, and repositories into a structured trace.md file.

How do I map request parameters to database columns in my codebase?

Map request parameters to database columns by analyzing your feature spec and codebase to locate relevant handlers and repositories. This produces a vertical trace documenting transformation arrows across each layer, ensuring end-to-end parameter mapping from Request fields to persisted DB columns.

Can I track changes to API parameter transformations over time?

Track changes to API parameter transformations using a Delta Protocol changelog. When your feature spec evolves, the vertical trace and corresponding contract tests are updated while maintaining a Delta Protocol changelog to support continuous trace evolution and change tracking.

Do I need a spec.md file to generate API contract tests?

Yes, you need a spec.md file listing endpoints and user stories to generate API contract tests. The skill reads this feature spec to derive scenario lists, parameter transformation arrows, side effects, and error paths required to scaffold the RED tests and vertical trace documentation.

What types of contract tests are generated for API scenarios?

The contract tests generated for API scenarios include happy, sad, side-effect, and contract test types. These failing tests verify end-to-end parameter transformation chains, validating input validation, side effects, and error paths until your implementation matches the derived vertical trace.