edge-cases
Analyzes test coverage to identify and suggest missing edge case scenarios.
Install
mkdir -p .claude/skills/edge-cases-sprocketlab && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12504" && unzip -o skill.zip -d .claude/skills/edge-cases-sprocketlab && rm skill.zipInstalls to .claude/skills/edge-cases-sprocketlab
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Analyze checkpoint tests and suggest missing edge cases. Use after writing tests or when reviewing test coverage. Invoke with /edge-cases <problem> <checkpoint>.Key capabilities
- →Analyze checkpoint specifications
- →Identify missing edge cases in tests
- →Implement edge-case tests with assertions
- →Cross-reference spec requirements with existing tests
- →Validate JSON and file references
How it works
This skill analyzes a checkpoint's specification and existing tests to identify gaps and implement missing edge cases, ensuring complete test coverage.
Inputs & outputs
When to use edge-cases
- →Identify missing tests
- →Increase coverage
- →Add edge case assertions
About this skill
Edge Case Analyzer
Analyze a checkpoint's spec and existing tests to identify and add missing edge cases.
Usage: /edge-cases execution_server checkpoint_2
Workflow
- Read the spec - Understand all requirements, constraints, error conditions
- Read existing tests - See what's already covered
- Identify gaps - Find missing edge cases
- Implement edge-case tests - Add fully implemented tests with real assertions
Step 1: Gather Context
Read these files for the specified problem/checkpoint:
problems/{problem}/checkpoint_N.md
problems/{problem}/tests/conftest.py
problems/{problem}/tests/test_checkpoint_N.py
Step 2: Analyze for Gaps
For each requirement in the spec, ask:
- What happens with empty/null input?
- What happens at boundary values (0, -1, max, min)?
- What happens with malformed input?
- What happens with missing required fields?
- What happens with unexpected types?
- Are there race conditions or state edge cases?
- Are there format edge cases (unicode, special chars)?
- Use
\uXXXXescapes to keep source files ASCII when needed.
- Use
Cross-reference with existing tests:
- Which spec requirements have tests?
- Which error conditions are tested?
- Which boundary conditions are tested?
- What did the spec mention that tests don't cover?
See references/edge-case-categories.md for the category checklist and references/patterns.md for problem-type patterns.
Important: Avoid Ambiguous Cases
Only add edge cases where the spec is clear about expected behavior.
If the spec is ambiguous or there are multiple valid interpretations:
- Don't add a test - it's not a valid edge case
- The spec should define the expected behavior, not the tests
- Tests should verify spec compliance, not invent requirements
Good edge case: Spec says "return error for negative values" → test with -1 Bad edge case: Spec doesn't mention negatives → we don't know what should happen
Ask yourself: "Can I point to the spec line that defines this behavior?"
- Yes → Valid edge case
- No → Skip it or note the spec ambiguity
Step 3: Implement Edge Case Tests
Append to test_checkpoint_N.py with fully implemented tests. Do not add
TODOs, pytest.fail, or placeholder assertions. If you cannot implement an
edge case from the spec, skip it or ask for clarification instead of adding
incomplete tests.
Keep tests readable with tiny helper functions for recurring patterns (CLI runs, input setup, HTTP JSON requests). Prefer local helpers in the test module unless the helper is shared across multiple test files. See references/helper-patterns.md for helper ideas and references/example-patterns.md for CLI/HTTP layouts.
Do not leave placeholder docstrings. Either quote the spec line or remove the docstring entirely.
Markers to Use
All edge cases use @pytest.mark.functionality.
Edge cases are additional coverage beyond the core tests - they should not block a passing submission. Core tests cover the main spec requirements; edge cases catch less common scenarios.
After Adding Tests
- ALWAYS Run eval-snapshot to verify:
slop-code --quiet eval-snapshot problems/{problem}/solutions/checkpoint_N \ -p {problem} -o /tmp/eval -c N \ -e configs/environments/docker-python3.12-uv.yaml --json
Reference
- references/edge-case-categories.md
- Common edge-case categories to scan for gaps
- references/helper-patterns.md
- Reusable helpers for normalizing outputs and errors
- references/example-patterns.md
- CLI and HTTP test layouts
- references/patterns.md
- Edge case patterns by problem type
When not to use it
- →When the spec is ambiguous about expected behavior
- →When the goal is to invent new requirements through tests
Limitations
- →Only adds edge cases where the spec is clear
- →Does not add tests for ambiguous spec behavior
- →Requires `pytest.mark.functionality` for all edge cases
How it compares
This workflow systematically identifies and adds edge cases based on explicit spec requirements, unlike ad-hoc test creation.
Compared to similar skills
edge-cases side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| edge-cases (this skill) | 0 | 7mo | Review | Intermediate |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
| chrome-devtools | 41 | 7mo | Review | Intermediate |
| bats | 9 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by SprocketLab
View all by SprocketLab →You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
chrome-devtools
mrgoonie
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.
bats
OleksandrKucherenko
Bash Automated Testing System (BATS) for TDD-style testing of shell scripts. Use when: (1) Writing unit or integration tests for Bash scripts, (2) Testing CLI tools or shell functions, (3) Setting up test infrastructure with setup/teardown hooks, (4) Mocking external commands (curl, git, docker), (5) Generating JUnit reports for CI/CD, (6) Debugging test failures or flaky tests, (7) Implementing test-driven development for shell scripts.
browser-daemon
noiv
Persistent browser automation via Playwright daemon. Keep a browser window open and send it commands (navigate, execute JS, inspect console). Perfect for interactive debugging, development, and testing web applications. Use when you need to interact with a browser repeatedly without opening/closing it.
performance-profiling
davila7
Performance profiling principles. Measurement, analysis, and optimization techniques.
obsidian-local-dev-loop
jeremylongshore
Configure Obsidian plugin development with hot-reload and fast iteration. Use when setting up development workflow, configuring test vaults, or establishing a rapid development cycle. Trigger with phrases like "obsidian dev loop", "obsidian hot reload", "obsidian development workflow", "develop obsidian plugin".