math-review
Verifies math-heavy code for algorithmic correctness and numerical stability. Use when reviewing scientific algorithms, ML models, or numerical code.
How do I install this agent skill?
npx skills add https://github.com/athola/claude-night-market --skill math-reviewIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill is designed for reviewing mathematical algorithms and scientific code, utilizing standard tools like pytest and Jupyter nbconvert. While it adheres to best practices such as citation verification and reproducibility testing, it executes user-provided notebooks and processes external source files. These activities represent a surface for indirect prompt injection and dynamic code execution within the analysis environment.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerpass
5 files scanned · No issues
- ZeroLeakspass
Score: 93/100 · 2 sections analyzed
What does this agent skill do?
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
When NOT To Use
- General algorithm review - use architecture-review
- Performance optimization - use parseltongue:python-performance
Required TodoWrite Items
math-review:context-syncedmath-review:requirements-mappedmath-review:derivations-verifiedmath-review:stability-assessedmath-review:evidence-loggedmath-review:findings-verified
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. Proof of Work
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
6. Verify Findings Are Grounded (math-review:findings-verified)
Write issues to .review/findings.json, run the citation verifier
(Skill(imbue:review-core) Step 5), and drop or label UNVERIFIED any
the verifier rejects.
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: file.py:123
- Anchor: `verbatim source text at line 123`
- Issue: [what is wrong] | Fix: [remediation] | Evidence: [E1]
## Recommendation
Approve / Approve with actions / Block
Every issue's Anchor is the exact source text at Location; it is what
citation_verifier.py re-reads to prove the finding is real.
Verification: Run the command with --help flag to verify availability.
Exit Criteria
- Context synced, requirements mapped, derivations verified, stability assessed, evidence logged with citations
- Every reported issue carries a
Location+ verbatimAnchor, andcitation_verifier.pyconfirmed all citations (exit0) or unverified issues were dropped or labeledUNVERIFIED
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/athola/claude-night-market/math-review">View math-review on skillZs</a>