003-skills/.claude/skills/nixtla-test-generator/SKILL.md
Generate comprehensive pytest test suites from PRD functional requirements with fixtures, parameterization, and coverage tracking. Use when creating tests for new plugins, validating PRD requirements, or scaffolding test infrastructure. Trigger with 'generate tests from PRD', 'create test suite', or 'scaffold pytest tests'.
npx skillsauth add intent-solutions-io/plugins-nixtla nixtla-test-generatorInstall 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.
Generate production-ready pytest test suites from PRD (Product Requirements Document) functional requirements, ensuring comprehensive test coverage for Nixtla plugins.
This skill automates the tedious process of creating test infrastructure for new plugins. It:
Key Benefits:
The script automatically:
PRD Structure Expected:
## Functional Requirements
### FR-1: Feature Name
- Requirement detail 1
- Requirement detail 2
### FR-2: Another Feature
- More requirements
Creates the following test files:
test_unit.py - Unit tests for individual functions
import pytest
from plugin_name.core import function_name
class TestFR1FeatureName:
"""Test FR-1: Feature Name"""
def test_basic_functionality(self):
"""Test basic happy path for FR-1"""
result = function_name(input_data)
assert result.success
def test_error_handling(self):
"""Test error handling for FR-1"""
with pytest.raises(ValueError):
function_name(invalid_input)
test_integration.py - Integration tests for MCP tools
import pytest
from mcp_server import ToolName
class TestMCPToolName:
"""Test MCP tool: tool_name"""
@pytest.mark.integration
def test_tool_execution(self, mock_api_client):
"""Test tool_name MCP tool end-to-end"""
result = ToolName.execute(params)
assert result["status"] == "success"
conftest.py - Shared fixtures
import pytest
@pytest.fixture
def sample_data():
"""Provide sample test data"""
return {"series": [...], "horizon": 14}
@pytest.fixture
def mock_api_client(monkeypatch):
"""Mock external API calls"""
class MockClient:
def forecast(self, **kwargs):
return {"predictions": [...]}
return MockClient()
Generated tests include appropriate markers:
@pytest.mark.unit - Fast, isolated tests@pytest.mark.integration - Tests with external dependencies@pytest.mark.slow - Long-running tests (>1 second)@pytest.mark.parametrize - Multiple input scenariosGenerates tests/COVERAGE_MATRIX.md:
# Test Coverage Matrix
| Requirement | Test File | Test Function | Status |
|-------------|-----------|---------------|--------|
| FR-1: Feature Name | test_unit.py | test_basic_functionality | ✅ |
| FR-2: Another Feature | test_unit.py | test_feature_2 | ✅ |
| MCP: tool_name | test_integration.py | test_tool_execution | ✅ |
# Install test dependencies
pip install -r requirements-dev.txt
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=plugin_name --cov-report=html
# Run only unit tests
pytest tests/ -m unit
The script generates:
Missing PRD File:
Error: PRD not found at /path/to/PRD.md
Solution: Verify PRD path and ensure file exists
No Functional Requirements Found:
Warning: No FR-X sections found in PRD
Solution: Ensure PRD has "### FR-X: Title" format sections
Invalid Python Syntax in Generated Tests:
Error: Generated test file has syntax errors
Solution: Run black formatter on generated files
Import Errors in Generated Tests:
Error: Cannot import plugin_name module
Solution: Update import paths in generated tests to match actual module structure
python {baseDir}/scripts/generate_test_suite.py \
--prd 000-docs/000a-planned-plugins/implemented/nixtla-roi-calculator/02-PRD.md \
--output 005-plugins/nixtla-roi-calculator/tests \
--plugin-name nixtla-roi-calculator
Output:
✓ Parsed PRD: Found 5 functional requirements, 4 MCP tools
✓ Generated tests/test_unit.py (15 test functions)
✓ Generated tests/test_integration.py (4 MCP tool tests)
✓ Generated tests/conftest.py (6 fixtures)
✓ Generated tests/COVERAGE_MATRIX.md
✓ Generated tests/README.md
Test Coverage: 19/19 requirements (100%)
python {baseDir}/scripts/generate_test_suite.py \
--prd /path/to/PRD.md \
--output /path/to/tests \
--unit-only
python {baseDir}/scripts/generate_test_suite.py \
--prd /path/to/PRD.md \
--output /path/to/tests \
--dry-run
{baseDir}/scripts/generate_test_suite.py{baseDir}/assets/templates/pytest_template.py000-docs/000a-planned-plugins/implemented/nixtla-roi-calculator/02-PRD.mdtools
This skill assists with managing database sharding strategies. It is activated when the user needs to implement horizontal database sharding to scale beyond single-server limitations. The skill supports designing sharding strategies, distributing data across multiple database instances, and implementing consistent hashing, automatic rebalancing, and cross-shard query coordination. Use this skill when the user mentions "database sharding", "sharding implementation", "scale database", or "horizontal partitioning". The plugin helps design and implement sharding for high-scale applications.
tools
This skill enables Claude to perform comprehensive database security scans using the database-security-scanner plugin. It is triggered when the user requests a security assessment of a database, including identifying vulnerabilities like weak passwords, SQL injection risks, and insecure configurations. The skill leverages OWASP guidelines to ensure thorough coverage and provides remediation suggestions. Use this skill when the user asks to "scan database security", "check database for vulnerabilities", "perform OWASP compliance check on database", or "assess database security posture". The plugin supports PostgreSQL and MySQL.
testing
This skill enables Claude to design and visualize database schemas. It leverages normalization guidance (1NF through BCNF), relationship mapping, and ERD generation to create efficient and well-structured databases. Use this skill when the user requests to "design a database schema", "create a database model", "generate an ERD", "normalize a database", or needs help with "database design best practices". The skill is triggered by terms like "database schema", "ERD diagram", "database normalization", and "relational database design".
tools
This skill enables Claude to manage database replication, failover, and high availability configurations using the database-replication-manager plugin. It is designed to assist with tasks such as setting up master-slave replication, configuring automatic failover, monitoring replication lag, and implementing read scaling. Use this skill when the user requests help with "database replication", "failover configuration", "high availability", "replication lag", or "read scaling" for databases like PostgreSQL or MySQL. The plugin facilitates both physical and logical replication strategies.