mcpField
M
math-router

math-router

github.com/parcadeiOther3.9k495 installsUpdated 39w ago
Repository

About math-router

Math Router is a skill that maps math requests to CLI commands using patterns, for users running math computation scripts. It covers several math categories, can list routes, and provides a fallback when it cannot recognize an intent.

Key features

  1. 01Route math intents to CLI commands
  2. 02Extract arguments with pattern matching
  3. 03Cover routes across math categories
  4. 04List all or category-specific routes
  5. 05Provide a fallback for unrecognized requests

Use cases

  1. 01Turn an integration request into a compute command
  2. 02Route unit conversions or geometry operations
  3. 03Check available math commands

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/parcadei/continuous-claude-v3 --skill math-router

After installing, type/math-routerin Claude Code to confirm it loaded.

Details

From the project README

Math Router

ALWAYS use this router first for math requests.

Instead of reading individual skill documentation, call the router to get the exact command:

Usage

# Route any math intent to get the CLI command
uv run python scripts/cc_math/math_router.py route "<user's math request>"

Example Workflow

  1. User says: "integrate sin(x) from 0 to pi"
  2. You run: uv run python scripts/cc_math/math_router.py route "integrate sin(x) from 0 to pi"
  3. Router returns:
    {
      "command": "uv run python scripts/cc_math/sympy_compute.py integrate \"sin(x)\" --var x --lower 0 --upper pi",
      "confidence": 0.95
    }
    
  4. You execute the returned command
  5. Return result to user

Why Use The Router

  • Faster: No need to read skill docs
  • Deterministic: Pattern-based, not LLM inference
  • Accurate: Extracts arguments correctly
  • Complete: Covers 32 routes across 7 scripts

Available Routes

CategoryCommands
sympyintegrate, diff, solve, simplify, limit, det, eigenvalues, inv, expand, factor, series, laplace, fourier
pintconvert, check
shapelycreate, measure, pred, op
z3prove, sat, optimize
scratchpadverify, explain
tutorhint, steps, generate
plotplot2d, plot3d, latex

List All Commands

# List all available routes
uv run python scripts/cc_math/math_router.py list

# List routes by category
uv run python scripts/cc_math/math_router.py list --category sympy

Fallback

If the router returns {"command": null}, the intent wasn't recognized. Then:

  1. Ask user to clarify
  2. Or use individual skills: /sympy-compute, /z3-solve, /pint-compute, etc.

Comments

Markdown supported