gsd-headless
Orchestrate GSD (Git Ship Done) projects programmatically via headless CLI. Use when an agent…
Generate or run tests. Auto-detects test framework, generates comprehensive tests for source files, or runs existing test suites with failure analysis.
$ npx -y skills add open-gsd/gsd-pi --skill test --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/testContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate or run tests. Auto-detects test framework, generates comprehensive tests for source files, or runs existing test suites with failure analysis.
name: test description: Generate or run tests. Auto-detects test framework, generates comprehensive tests for source files, or runs existing test suites with failure analysis.
<objective> Generate or run tests for the current project. This skill auto-detects the test framework in use, generates comprehensive tests for source files, or runs existing test suites and analyzes failures.
Accepts optional arguments:
</objective>
<context> This skill handles test generation and execution across multiple languages and frameworks. It adapts to whatever testing conventions the project already uses rather than imposing new ones. </context>
<quick_start>
<step_1_detect_framework>
**Detect the test framework and conventions before doing anything else.**
Check these sources in order:
1. **package.json** (Node/JS/TS projects):
2. **Config files**:
3. **Existing test files**:
4. **Record your findings**:
</step_1_detect_framework>
<step_2_handle_arguments>
**Route based on the argument provided.**
</step_2_handle_arguments>
<generate_tests>
**Generate tests for the specified source file.**
**A. Read and analyze the source file:**
**B. Read existing test files in the project (1-2 files minimum):**
**C. Generate tests covering:**
1. **Happy paths**: Normal expected inputs produce correct outputs 2. **Edge cases**:
3. **Error handling**:
4. **Async behavior** (if the function is async):
5. **Dependencies**:
**D. Place the test file correctly:**
**E. Run the generated tests immediately to verify they pass.**
</generate_tests>
<run_tests>
**Run the existing test suite and analyze results.**
**A. Determine the test command:**
**B. Run the tests:**
**C. Analyze results:**
**D. Present a summary:**
Test Results: X passed, Y failed, Z skipped Failures: 1. [test name] - [brief diagnosis] Fix: [specific suggestion] 2. [test name] - [brief diagnosis] Fix: [specific suggestion]
</run_tests>
<suggest_tests>
**Suggest what to test when no arguments are given.**
**A. Check recent changes:**
> **Working directory check:** if your dispatch context specifies a working directory and `pwd` does not match it, prefix the git commands below with `-C <that path>` (e.g. `git -C /path/to/worktree diff --name-only HEAD~5`).
**B. Check test coverage gaps:**
**C. Present suggestions:**
Suggested files to test (based on recent changes and coverage gaps): 1. [file path] - modified recently, no test file exists 2. [file path] - modified recently, tests exist but may need updating 3. [file path] - no test coverage found Run `/test <file path>` to generate tests for any o
GSD Pi is a local-first coding agent for planning, implementing, verifying, and tracking project work from the command line.
Repo: open-gsd/gsd-pi
Orchestrate GSD (Git Ship Done) projects programmatically via headless CLI. Use when an agent…
Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve…
Browser automation CLI for AI agents. Use when interacting with websites — navigating pages,…
Design or review an HTTP/REST/GraphQL API for versioning, pagination, error shapes,…
Apply modern web development best practices for security, compatibility, and code quality.…
Ask a quick side question about your current work without derailing the main task. Answers…