mindcockpit-ai/cognitive-core/test-scaffold
Claude Code and agent skill by mindcockpit-ai/cognitive-core
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Generate test file scaffolds for project modules. Language-agnostic; reads CC_TEST_COMMAND and CC_TEST_PATTERN from config.
Install
npx vskill@latest install mindcockpit-ai/cognitive-core/test-scaffoldSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as mindcockpit-ai/cognitive-core/test-scaffold.
Test Scaffold — Test File Generator
Generates correctly structured test files based on the project's language, architecture, and testing conventions. Reads configuration from cognitive-core.conf and conventions from CLAUDE.md.
Arguments
$ARGUMENTS-- source module path to generate tests for--type=<type>-- override auto-detected test type
Configuration Reference
From cognitive-core.conf:
CC_LANGUAGE-- determines test file format and runnerCC_TEST_COMMAND-- test runner command (e.g.,pytest,jest,prove -l)CC_TEST_PATTERN-- test file glob (e.g.,tests/**/*.py,t/**/*.t)CC_TEST_ROOT-- test directory (e.g.,tests,t,__tests__)CC_ARCHITECTURE-- determines layer detection and mock strategyCC_SRC_ROOT-- source root for path mapping
Instructions
Step 1: Analyze the Source Module
Read the module at the given path. Extract:
- Module/class/function name
- Public interface (methods, functions, exports)
- Dependencies (imports, injections)
- Whether it uses database or external services
Step 2: Determine Test Location
Map source path to test path using CC_SRC_ROOT and CC_TEST_ROOT:
Respect language conventions for test file naming:
- Python:
test_module.py - JavaScript:
module.test.jsormodule.spec.js - Perl:
module.t - Go:
module_test.go - Java:
ModuleTest.java - Rust: inline
#[cfg(test)]ortests/module.rs
Step 3: Detect Architectural Layer
Based on CC_ARCHITECTURE and file path, determine the layer:
- Domain/Model -- pure unit tests, no mocks needed
- Repository/Data -- mock database, verify queries
- Service/Use-case -- mock dependencies, test orchestration
- Controller/Handler -- integration or HTTP tests
- Mapper/DTO -- transformation tests with edge cases
Step 4: Generate Test File
Include in every generated test:
- Language-appropriate test framework imports
- Source module import
- Setup and teardown if needed
- One test group per public method/function
- Both positive and negative test cases
- Comments marked
# FILL:where manual input is needed
Step 5: Report
See Also
/code-review-- Review generated test code/pre-commit-- Lint check before committing tests/fitness --gate=test-- Verify test fitness
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugin/skills/test-scaffold/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mindcockpit-ai/cognitive-core/test-scaffold)