Marketplace test-scaffolding
Generate test file scaffolds from source analysis with language-appropriate templates.
install
source · Clone the upstream repo
git clone https://github.com/aiskillstore/marketplace
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/aiskillstore/marketplace "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/consiliency/test-scaffolding" ~/.claude/skills/aiskillstore-marketplace-test-scaffolding && rm -rf "$T"
manifest:
skills/consiliency/test-scaffolding/SKILL.mdsource content
Test Scaffolding Skill
Generate test file scaffolds for source files, enabling TDD workflows. Scaffolds contain TODO stubs that the test-engineer agent fills during lane execution.
Variables
| Variable | Default | Description |
|---|---|---|
| SOURCE_FILES | [] | List of source files to scaffold tests for |
| TEST_FRAMEWORK | auto | Framework to use (auto-detects from manifest) |
| OUTPUT_DIR | tests/ | Where to place generated test files |
| NAMING_CONVENTION | language-default | Test file naming pattern |
| INCLUDE_FIXTURES | true | Generate fixture stubs |
| STUB_STYLE | todo | (TODO comments) or (skip markers) |
Workflow (Mandatory)
- Detect stack: Read package manifest (
,pyproject.toml
,package.json
,go.mod
)Cargo.toml - Identify framework: Match test dependencies (pytest, vitest, jest, testing, cargo test)
- Analyze sources: Extract public functions, classes, methods from each source file
- Map to tests: Apply naming convention to determine test file paths
- Generate scaffolds: Use language template, insert TODO stubs for each testable unit
- Return manifest: JSON with generated files, skipped files, and unit counts
Supported Frameworks
| Language | Frameworks | Detection |
|---|---|---|
| Python | pytest, unittest | → or in deps |
| TypeScript | vitest, jest | → or in devDeps |
| JavaScript | vitest, jest | → or in devDeps |
| Go | testing | → built-in testing package |
| Rust | cargo test | → built-in test harness |
| Dart | flutter_test, test | → or in dev_deps |
Naming Conventions
| Language | Source | Test File |
|---|---|---|
| Python | | |
| TypeScript | | or |
| Go | | |
| Rust | | inline module |
| Dart | | |
Source Analysis Heuristics
Python
- Detect
where name doesn't start withdef function_name(_ - Detect
for public classesclass ClassName: - Extract method signatures within classes
- Skip
,__init__
, etc. (dunder methods)__str__
TypeScript/JavaScript
- Detect
,export function
,export constexport class - Detect
export default function/class - Parse JSDoc/TSDoc for parameter types
Go
- Detect exported functions (capitalized names)
- Detect exported methods on structs
- Detect exported types
Rust
- Detect
,pub fn
,pub structpub enum - Detect
blocks with public methodsimpl
Output Schema
{ "format": "scaffold-manifest/v1", "generated_at": "<ISO-8601 UTC>", "framework": "pytest", "generated": [ { "source": "src/auth/login.py", "test": "tests/auth/test_login.py", "units": ["login", "logout", "refresh_token"], "unit_count": 3 } ], "skipped": [ { "source": "src/auth/utils.py", "reason": "test file exists" } ], "total_units": 12 }
Red Flags (Stop & Verify)
- No package manifest found → prompt user for framework
- Source file has no public functions → skip with warning
- Test file already exists → skip unless
specified--force - Unable to parse source file → log warning, continue with others
Integration Points
With /ai-dev-kit:plan-phase
/ai-dev-kit:plan-phase- Called to auto-populate
columnTests Owned Files - Uses
from impl tasks as source filesOwned Artifacts
With /ai-dev-kit:execute-lane
/ai-dev-kit:execute-lane- Called before test-engineer agent runs
- Scaffolds committed with
chore(P{n}-{lane}): scaffold test files
With test-engineer
agent
test-engineer- Agent detects TODO markers in scaffolds
- Fills in test implementations
- Removes TODO markers when complete
Provider Notes
- Use this skill when
is invoked/ai-dev-kit:scaffold-tests - Prefer TODO-style stubs over skip markers for visibility
- Preserve source file structure in test organization
- Include proper imports based on detected framework