v3/skills/v3-explore-test-context/SKILL.md
# Skill: /v3-explore-test-context **Purpose**: Discover repository-specific testing patterns, utilities, fixtures, conventions, and learn from past mistakes documented in GRAVEYARD.md ## Input - **Required**: Repository root (implicit - current working directory) ## Output - **No file artifacts** - findings are reported in conversation and used for subsequent code generation - **Format**: Verbal summary of discovered patterns, utilities, fixtures, conventions, and past mistakes ## Role You a
npx skillsauth add ruclo/thesis v3/skills/v3-explore-test-contextInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Purpose: Discover repository-specific testing patterns, utilities, fixtures, conventions, and learn from past mistakes documented in GRAVEYARD.md
You are exploring the test repository to understand its structure, patterns, and available utilities before generating test code. You also review the GRAVEYARD.md to learn from mistakes made in previous test generation attempts.
Read docs/ to understand testing conventions:
Report findings:
Analyze libs/ and utilities/ to discover available helpers:
Report findings:
Look at existing tests in tests/ to see valid patterns:
Report findings:
This phase is critical for avoiding repeated mistakes.
Read GRAVEYARD.md at the repository root (if it exists) to learn from past test generation failures:
Report findings:
If GRAVEYARD.md does not exist: Report that no past mistakes are documented yet. This is expected for the first run.
1. READ docs/testing_guidelines.md (if exists)
- Extract conventions
- Note marker patterns
2. GLOB utilities/*.py
FOR each utility_file:
- READ file
- EXTRACT class names
- EXTRACT method signatures
- EXTRACT constants
- SUMMARIZE findings
3. GLOB tests/**/*.py (sample 5-10 files)
FOR each test_file:
- READ file
- EXTRACT import patterns
- EXTRACT fixture usage
- NOTE test structure
- SUMMARIZE patterns
4. READ GRAVEYARD.md (if exists)
- EXTRACT all documented mistakes
- EXTRACT lessons learned
- EXTRACT patterns to avoid
- SUMMARIZE as "DO NOT" rules for code generation
5. REPORT comprehensive findings:
- Available utilities summary
- Common fixtures summary
- Import patterns summary
- Testing conventions summary
- GRAVEYARD lessons (mistakes to avoid)
After exploration, provide a summary like:
Repository Exploration Complete
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Documentation Findings:
- Tests use @pytest.mark.polarion() for test case IDs
- Architecture markers: @pytest.mark.arm64, @pytest.mark.s390x
- Tiering: @pytest.mark.tier1, @pytest.mark.tier2
Available Utilities:
Classes:
- VirtualMachineForTests (from utilities.virt)
- DataVolumeForTests (from utilities.storage)
Methods:
- wait_for_vm_running(vm, timeout=300)
- create_snapshot(vm, snapshot_name)
- ssh_to_vm(vm, command)
Constants:
- TIMEOUT_5MIN = 300
- TIMEOUT_10MIN = 600
- DEFAULT_STORAGE_CLASS = "ocs-storagecluster-ceph-rbd"
Common Fixtures:
- namespace (function scope) - provides isolated test namespace
- admin_client (session scope) - provides cluster admin client
- storage_class_matrix (parametrized) - tests across storage classes
Import Patterns:
- from ocp_resources.virtual_machine import VirtualMachine
- from utilities.virt import VirtualMachineForTests
- from utilities.constants import TIMEOUT_5MIN
Test Structure Conventions:
- File naming: test_<feature_name>.py
- Test naming: test_<action>_<expected_outcome>
- Class grouping: class Test<FeatureName>
- Shared preconditions in class docstrings
GRAVEYARD Lessons (Mistakes to Avoid):
- AVOID: Using `vm.restart()` directly - use `vm.clean_up()` then recreate
- AVOID: Hardcoding namespace names - always use the namespace fixture
- AVOID: Missing `yield` in fixtures that need cleanup
- AVOID: Using `time.sleep()` instead of proper wait utilities
- PATTERN: Always check resource exists before operating on it
# Explore repository context
/v3-explore-test-context
# The findings will be used by subsequent /v3-generate-pytest or /v3-generate-std calls
In v3, this skill:
Medium - Useful before generating tests in this repository, but findings are not persisted for reuse
development
# Skill: /v3-test-heal **Purpose**: Self-healing loop that runs the generated test against a real cluster, analyzes failures from logs, consults documentation and repository code to fix issues, and records lessons learned in GRAVEYARD.md ## Input - **Required**: Path to the generated test file (e.g., `tests/virt/cluster/test_vnc_screenshot.py`) - **Optional**: `--max-iterations N` - Maximum heal attempts (default: 3) ## Output - **Modified File**: Test file edited in-place with fixes applied
development
# Skill: /v3-pyright-heal **Purpose**: Universal Python type checker and self-healing fixer for ANY Python file ## Input - **Required**: Path to Python file (`.py` or `.ipynb`) - **Optional**: `--max-iterations N` - Maximum fix attempts (default: 10) - **Optional**: `--strict` - Use strict type checking mode ## Output - **Modified File**: Same file, edited in-place - **Exit Code**: 0 if clean, 1 if max iterations reached with errors - **Log**: Summary of fixes applied ## Implementation ###
development
# Skill: /v3-graveyard-verify **Purpose**: Post-generation verification that cross-references the generated test code against GRAVEYARD.md to catch known mistakes before runtime ## Input - **Required**: Path to the generated test file ## Output - **Modified File**: Test file edited in-place with fixes for any GRAVEYARD violations found - **Report**: Summary of violations found and fixes applied (conversational output) ## Role You are a **code reviewer specializing in catching known mistakes*
development
# Skill: /v3-generate-std > _This document was created with the assistance of Claude (Anthropic)._ You are a Senior QE Engineer responsible for creating Software Test Descriptions (STDs) for OpenShift Virtualization. Given a high-level Software Test Plan (STP), generate test code stubs with comprehensive docstrings that serve as the STD. **Important:** The generated test code should follow the structure and patterns from the [openshift-virtualization-tests](https://github.com/RedHatQE/openshi