Unnamed Skill
Intensive mathematical analysis for numerical stability, algorithm correctness,and alignment with authoritative standards.Triggers: math review, numerical stability, algorithm correctness, mathematicalverification, scientific computing, numerical analysis, derivation checkUse when: reviewing math-heavy code, verifying algorithm correctness, checkingnumerical stability, aligning with mathematical standardsDO NOT use when: general algorithm review - use architecture-review.DO NOT use when: performance optimization - use parseltongue:python-performance.Use this skill for mathematical code verification.
$ 安裝
git clone https://github.com/athola/claude-night-market /tmp/claude-night-market && cp -r /tmp/claude-night-market/plugins/pensive/skills/math-review ~/.claude/skills/claude-night-market// tip: Run this command in your terminal to install the skill
name: math-review description: |
Triggers: verification, algorithms, scientific, stability, math Intensive mathematical analysis for numerical stability, algorithm correctness, and alignment with authoritative standards.
Triggers: math review, numerical stability, algorithm correctness, mathematical verification, scientific computing, numerical analysis, derivation check
Use when: reviewing math-heavy code, verifying algorithm correctness, checking numerical stability, aligning with mathematical standards
DO NOT use when: general algorithm review - use architecture-review. DO NOT use when: performance optimization - use parseltongue:python-performance.
Use this skill for mathematical code verification. category: specialized tags: [math, algorithms, numerical, stability, verification, scientific] tools: [derivation-checker, stability-analyzer, reference-finder] usage_patterns:
- algorithm-review
- numerical-analysis
- derivation-verification
- stability-assessment complexity: advanced estimated_tokens: 200 progressive_loading: true dependencies:
- pensive:shared
- imbue:evidence-logging
Table of Contents
- Quick Start
- When to Use
- Required TodoWrite Items
- Core Workflow
- 1. Context Sync
- 2. Requirements Mapping
- 3. Derivation Verification
- 4. Stability Assessment
- 5. Evidence Logging
- Progressive Loading
- Essential Checklist
- Output Format
- Summary
- Context
- Requirements Analysis
- Derivation Review
- Stability Analysis
- Issues
- Recommendation
- Exit Criteria
Mathematical Algorithm Review
Intensive analysis ensuring numerical stability and alignment with standards.
Quick Start
/math-review
Verification: Run the command with --help flag to verify availability.
When to Use
- Changes to mathematical models or algorithms
- Statistical routines or probabilistic logic
- Numerical integration or optimization
- Scientific computing code
- ML/AI model implementations
- Safety-critical calculations
Required TodoWrite Items
math-review:context-syncedmath-review:requirements-mappedmath-review:derivations-verifiedmath-review:stability-assessedmath-review:evidence-logged
Core Workflow
1. Context Sync
pwd && git status -sb && git diff --stat origin/main..HEAD
Verification: Run git status to confirm working tree state.
Enumerate math-heavy files (source, tests, docs, notebooks). Classify risk: safety-critical, financial, ML fairness.
2. Requirements Mapping
Translate requirements → mathematical invariants. Document pre/post conditions, conservation laws, bounds. Load: modules/requirements-mapping.md
3. Derivation Verification
Re-derive formulas using CAS. Challenge approximations. Cite authoritative standards (NASA-STD-7009, ASME VVUQ). Load: modules/derivation-verification.md
4. Stability Assessment
Evaluate conditioning, precision, scaling, randomness. Compare complexity. Quantify uncertainty. Load: modules/numerical-stability.md
5. Evidence Logging
pytest tests/math/ --benchmark
jupyter nbconvert --execute derivation.ipynb
Verification: Run pytest -v tests/math/ to verify.
Log deviations, recommend: Approve / Approve with actions / Block. Load: modules/testing-strategies.md
Progressive Loading
Default (200 tokens): Core workflow, checklists +Requirements (+300 tokens): Invariants, pre/post conditions, coverage analysis +Derivation (+350 tokens): CAS verification, standards, citations +Stability (+400 tokens): Numerical properties, precision, complexity +Testing (+350 tokens): Edge cases, benchmarks, reproducibility
Total with all modules: ~1600 tokens
Essential Checklist
Correctness: Formulas match spec | Edge cases handled | Units consistent | Domain enforced Stability: Condition number OK | Precision sufficient | No cancellation | Overflow prevented Verification: Derivations documented | References cited | Tests cover invariants | Benchmarks reproducible Documentation: Assumptions stated | Limitations documented | Error bounds specified | References linked
Output Format
## Summary
[Brief findings]
## Context
Files | Risk classification | Standards
## Requirements Analysis
| Invariant | Verified | Evidence |
## Derivation Review
[Status and conflicts]
## Stability Analysis
Condition number | Precision | Risks
## Issues
[M1] [Title]: Location | Issue | Fix
## Recommendation
Approve / Approve with actions / Block
Verification: Run the command with --help flag to verify availability.
Exit Criteria
- Context synced, requirements mapped, derivations verified, stability assessed, evidence logged with citations
Troubleshooting
Common Issues
Command not found Ensure all dependencies are installed and in PATH
Permission errors Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag
Repository
