reclassify-tests
БесплатноБез исполняемых скриптовНе проверенReclassify tests by adding @pytest.mark.functionality to tests not explicitly shown in the spec. Invoke with /reclassify-tests <problem> <checkpoint>.
Об этом скилле
Reclassify Tests
Analyze a checkpoint's spec and test file to identify tests that are NOT explicitly demonstrated in the spec examples, and add @pytest.mark.functionality markers to them.
Usage: /reclassify-tests file_backup checkpoint_1
Purpose
Core tests (unmarked) should only cover behaviors that are explicitly demonstrated in spec examples. Tests that verify implicit requirements, edge cases, or inferred behaviors should be marked as @pytest.mark.functionality.
This skill helps ensure fair evaluation by:
- Keeping core tests limited to explicit spec examples
- Moving implicit/inferred behaviors to functionality tests
- Making test classification consistent and justifiable
Step 1: Gather Context
Read these files for the specified problem/checkpoint:
problems/{problem}/checkpoint_N.md # Spec with examples
problems/{problem}/tests/test_checkpoint_N.py # Test file to reclassify
problems/{problem}/tests/conftest.py # Fixtures context
problems/{problem}/tests/data/checkpoint_N/ # Test case data (if present)
Step 2: Extract Explicit Spec Behaviors
From the spec, identify behaviors that are explicitly demonstrated:
What Counts as "Explicit"
- Direct Examples: Code blocks showing exact input → output
- Explicit Statements: "MUST", "SHALL", specific values defined
- Example Output: JSON/text showing exact expected format
- Stated Requirements: Numbered/bulleted requirements with specific behavior
What Does NOT Count as "Explicit"
- Implied Behavior: Reasonable inferences not shown in examples
- Edge Cases: Boundary conditions not demonstrated
- Error Handling: Unless specific errors are shown in examples
- Format Details: Exact formatting beyond what examples show
- Ordering: Unless explicitly stated or shown in all examples
Create a Checklist
For each spec example, note:
- What input is shown?
- What output is shown?
- What behavior is demonstrated?
Step 3: Analyze Each Test
For each test function or parametrized test case:
A. Identify What the Test Verifies
- What specific behavior does this test check?
- What input does it use?
- What output does it expect?
B. Find Spec Support
Ask: "Can I point to a spec example that explicitly demonstrates this exact behavior?"
| Spec Support | Classification |
|---|---|
| Example shows exact scenario | Keep as core (no marker) |
| Behavior stated but no example | Mark as functionality |
| Inferred from context | Mark as functionality |
| Edge case not shown | Mark as functionality |
| Error handling not in examples | Mark as error |
C. Document the Decision
For each test, note:
- Spec support (quote or "NONE")
- Classification decision
- Reason
Step 4: Apply Markers
For Tests to Reclassify
Add @pytest.mark.functionality ABOVE the test function or parametrize decorator:
Before:
@pytest.mark.parametrize("case", EDGE_CASES, ids=[c["id"] for c in EDGE_CASES])
def test_edge_cases(entrypoint_argv, case, tmp_path):
...
After:
@pytest.mark.functionality
@pytest.mark.parametrize("case", EDGE_CASES, ids=[c["id"] for c in EDGE_CASES])
def test_edge_cases(entrypoint_argv, case, tmp_path):
...
For Individual Parametrized Cases
If some cases in a parametrized test are explicit and others aren't, consider:
- Split the test: Separate core cases from functionality cases
- Use pytest.param with marks:
@pytest.mark.parametrize("case", [
pytest.param(case1, id="explicit-case"),
pytest.param(case2, marks=pytest.mark.functionality, id="inferred-case"),
])
def test_cases(case):
...
Step 5: Report Changes
Generate a summary of changes made:
# Reclassification Report: {problem} {checkpoint}
## Summary
- Tests analyzed: N
- Tests reclassified: N
- Tests unchanged: N
## Reclassified Tests
### `test_function_name` → @pytest.mark.functionality
**Reason**: Test verifies [behavior] which is not explicitly demonstrated in spec.
**Spec says**: [Quote or "No example shown"]
**Test expects**: [What the test checks]
---
### `test_another_function` → @pytest.mark.functionality
...
## Unchanged Tests (Explicitly in Spec)
| Test | Spec Example Reference |
|------|------------------------|
| `test_core_case_1` | Example 1: shows exact input/output |
| `test_core_case_2` | Example 2: demonstrates this scenario |
Classification Guidelines
KEEP AS CORE (no marker) when:
- Spec example shows exact input and expected output
- Behavior is explicitly stated with specific values
- Test directly validates a demonstrated scenario
- Example output format matches test expectations exactly
MARK AS FUNCTIONALITY when:
- Behavior is reasonable but not shown in examples
- Test checks edge cases not demonstrated
- Test verifies format details be
Установить reclassify-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл reclassify-tests?
Reclassify tests by adding @pytest.mark.functionality to tests not explicitly shown in the spec. Invoke with /reclassify-tests <problem> <checkpoint>.
Как установить скилл reclassify-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл reclassify-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic