validate-and-regenerate-parameters
Validates parameters.py, checks for errors, and regenerates _variables.yml. Use when editing parameters, adding new values, or ensuring variable consistency.
When & Why to Use This Skill
This Claude skill automates the validation and regeneration of project parameters within a development workflow. It ensures that Python-based parameter files are syntactically correct, checks for logical inconsistencies such as hardcoded values or naming violations, and automatically synchronizes dependent YAML configuration files to maintain data integrity across the entire codebase.
Use Cases
- Updating Model Parameters: Automatically validate syntax and naming conventions when adding or modifying variables in parameters.py to prevent runtime errors.
- Synchronizing Configuration Files: Regenerate _variables.yml and other dependent assets to ensure all downstream data references remain consistent with the source code.
- Error Detection and QA: Identify common development mistakes such as hardcoded values in calculated fields, missing unit specifications, or duplicate parameter definitions.
- Automated Reporting: Generate updated parameter summaries and analysis files to provide stakeholders with a clear, up-to-date overview of the current model state.
| name | validate-and-regenerate-parameters |
|---|---|
| description | Validates parameters.py, checks for errors, and regenerates _variables.yml. Use when editing parameters, adding new values, or ensuring variable consistency. |
Parameter Validation & Regeneration
When to Use
Use this skill when you:
- Add or modify parameters in
dih_models/parameters.py - Edit parameter formulas or calculations
- Need to verify variables are up-to-date
- Update parameter descriptions or confidence levels
- See "variables out of date" warnings
Process
1. Validate parameters.py syntax
cd e:\code\obsidian\websites\disease-eradication-plan
python -m py_compile dih_models/parameters.py
2. Check for common errors
- Hardcoded values marked as "calculated" (should use formulas)
- Missing unit specifications
- Parameter names that aren't self-documenting
- Non-uppercase naming violations
- Duplicate parameter definitions
3. Regenerate variables
.venv/Scripts/python.exe scripts/generate-everything-parameters-variables-calculations-references.py
4. Verify output
- Check
_variables.ymlupdated successfully - Verify
_analysis/parameter-summary.mdgenerated - Spot-check formatting of values (currency, percentages, DALYs)
5. Report changes
- List new/modified/deleted variables
- Show updated parameter counts
- Flag any warnings from generation script
Expected Outcome
After running this skill:
- parameters.py compiles without errors
- _variables.yml is up-to-date
- All variable references in QMD files are valid
- Parameter summary shows correct values