Help us improve
Share bugs, ideas, or general feedback.
From theo-calvin-testing
Differential testing with Theodore Calvin's framework (tc). Use when writing tc tests, reasoning about test scenarios, creating input/expected JSON pairs, or debugging test failures.
npx claudepluginhub a3lem/my-claude-plugins --plugin theo-calvin-testingHow this skill is triggered — by the user, by Claude, or both
Slash command
/theo-calvin-testing:theo-calvin-testingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> "In the AI age, specifications and tests are permanent while implementations are disposable."
Provides test design patterns, coverage strategies (80-100% targets), types (unit/integration/E2E), organization, and best practices for comprehensive test suites. Use for new suites, coverage improvement, or test design.
Writes comprehensive tests for new or changed code using git diff to detect changes. Covers happy paths, edge cases, errors, concurrency, UI components, APIs, and database ops.
Share bugs, ideas, or general feedback.
"In the AI age, specifications and tests are permanent while implementations are disposable."
Differential testing compares actual output against expected output. No assertions, no matchers, no framework magic - just a diff.
Tests are nothing more than a script that takes input.json and produces output.json, which is then diffed against expected.json. This simple model:
input.json → run → output.json ←→ diff ←→ expected.json
input.json from stdinexpected.json{"a":1,"b":2} equals {"b":2,"a":1}[1,2,3] does NOT equal [3,2,1]tests/
└── my-test-suite/
├── run # Executable (any language)
└── data/
└── scenario-name/
├── input.json # Test input
└── expected.json # Expected output
run ExecutableThe run file is any executable that:
Example (bash):
#!/usr/bin/env bash
jq '.value * 2'
Example (python):
#!/usr/bin/env python3
import json, sys
data = json.load(sys.stdin)
print(json.dumps({"result": data["value"] * 2}))
For dynamic values, use patterns in expected.json:
| Pattern | Matches |
|---|---|
<uuid> | UUID v4 format |
<timestamp> | ISO 8601 datetime |
<number> | Any number |
<string> | Any string |
<boolean> | true/false |
<any> | Any value |
<null> | null |
Example expected.json:
{
"id": "<uuid>",
"created_at": "<timestamp>",
"count": "<number>"
}
tc # Run all tests in current directory
tc run path/to/suite # Run specific suite
tc new path/to/suite # Create new test suite scaffold
tc list # List available test suites
tc tags # Show available tags
tc explain suite # Describe what a test does
tc --parallel # Run tests in parallel
tc --tags=unit # Filter by tag
tc new tests/user-creation
This creates:
tests/user-creation/
├── run
└── data/
└── basic/
├── input.json
└── expected.json
run tests one thingdata/ subdirectories for variationsdata/empty-input/, data/unicode-handling/run minimal - just wire input to your code and format output