Skip to main content
skill CX Codex

interpolation — Claude Code skill: what it does, how to install

Guides Claude Code through selecting and running numerical interpolation workflows, from Lagrange polynomials to SciPy splines.

MIT ★ 3,951 updated 2026-01-26

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add parcadei/Continuous-Claude-v3 --skill interpolation -a claude-code
Open on GitHub

What interpolation does

This skill supplies Claude Code with a clear decision tree for numerical interpolation. It routes datasets with fewer than 10 points to Lagrange or Newton polynomials, smooth series to natural cubic splines, and noisy measurements to smoothing splines or least-squares fits. For multidimensional problems, it directs the agent toward simplex-based methods, Coxeter-Freudenthal-Kuhn triangulation, and barycentric subdivision.

The reference includes ready-to-run Bash commands via uv run python using scipy.interpolate (CubicSpline, make_interp_spline, interp1d) alongside symbolic evaluation with sympy_compute.py. It also outlines verification steps: tracking Runge's phenomenon near boundaries and running leave-one-out cross-validation.

Executing the bundled test commands requires a local setup with the uv tool and installed numpy, scipy, and sympy packages.

What it helps with

  • choose an interpolation method based on point density and noise
  • generate cubic splines using scipy.interpolate.CubicSpline
  • check high-degree polynomial fits for Runge's boundary errors
  • interpolate noisy 1D measurements with smoothing splines

Example prompts for the agent

  • Select an interpolation method for 8 smooth data points and generate SciPy code
  • Interpolate a noisy 1D array using a smoothing spline in Python
  • Check this polynomial interpolation model for boundary errors using SymPy

How to install interpolation

1Skills CLI (Vercel)

npx skills add parcadei/Continuous-Claude-v3 --skill interpolation -a claude-code

2Manually: put the files in place

~/.claude/skills/interpolation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/interpolation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about interpolation

How to install interpolation in Claude Code?

Run npx skills add parcadei/Continuous-Claude-v3 --skill interpolation -a claude-code.

What does the interpolation skill do?

It gives the agent structured heuristics and code templates to choose appropriate interpolation algorithms across 1D and high-dimensional datasets.

What software is needed to run the bundled snippets?

The embedded commands use uv run and expect numpy, scipy, and sympy in the Python runtime.

Source text

SKILL.md · MIT
---
name: interpolation
description: "Problem-solving strategies for interpolation in numerical methods"
allowed-tools: [Bash, Read]
---

# Interpolation

## When to Use

Use this skill when working on interpolation problems in numerical methods.

## Decision Tree


1. **Assess Data Characteristics**
   - How many data points? Spacing uniform or non-uniform?
   - Is data smooth or noisy?
   - Need derivatives at endpoints?

2. **Select Interpolation Method**
   - Few points (<10): Polynomial (Lagrange, Newton)
   - Many points, smooth data: Cubic splines
   - Noisy data: Smoothing splines or least squares
   - High dimensions: Use simplex-based (n+1 neighbors vs 2^n)

3. **Implement with SciPy**
   - `scipy.interpolate.CubicSpline(x, y)` - natural cubic spline
   - `scipy.interpolate.make_interp_spline(x, y, k=3)` - B-spline
   - `scipy.interpolate.interp1d(x, y, kind='cubic')` - 1D interpolation

4. **Validate Results**
   - Check for Runge's phenomenon at boundaries (high-degree polynomials)
   - Cross-validate: leave-one-out error estimation
   - Visual inspection of interpolated curve
   - `sympy_compute.py limit "interp_error" --at boundaries`

5. **High-Dimensional Considerations**
   - Coxeter-Freudenthal-Kuhn triangulation for O(n log n) point location
   - Barycentric subdivision for balanced performance


## Tool Commands

### Scipy_Cubic_Spline
```bash
uv run python -c "from scipy.interpolate import CubicSpline; import numpy as np; x = np.array([0,1,2,3]); y = np.array([0,1,4,9]); cs = CubicSpline(x, y); print(cs(1.5))"
```

### Scipy_Bspline
```bash
uv run python -c "from scipy.interpolate import make_interp_spline; import numpy as np; x = np.array([0,1,2,3]); y = np.array([0,1,4,9]); bspl = make_interp_spline(x, y, k=3); print(bspl(1.5))"
```

### Sympy_Lagrange
```bash
uv run python -m runtime.harness scripts/sympy_compute.py interpolate "[(0,0),(1,1),(2,4)]" --var x
```

## Key Techniques

*From indexed textbooks:*

- [An Introduction to Numerical Analysis... (Z-Library)] DISCUSSION OF THE LITERATURE Discussion of the Literature As noted in the introduction, interpolation theory is a foundation for the development of methods in numerical integration and differentiation, approxima tion theory, and the numerical solution of differential equations. Each of these· topics is developed in the following chapters, and the associated literature is discussed at that point. Additional results on interpolation theory are given in de Boor (1978), Davis (1963), Henrici (1982, chaps.
- [Numerical analysis (Burden R.L., Fair... (Z-Library)] The most commonly used form of interpolation is piecewise-polynomial interpolation. If function and derivative values are available, piecewise cubic Hermite interpolation is recommended. This is the preferred method for interpolating values of a function that is the solution to a differential equation.
- [Numerical analysis (Burden R.L., Fair... (Z-Library)] Copyright 2010 Cengage Learning. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
- [Numerical analysis (Burden R.L., Fair... (Z-Library)] Galerkin and Rayleigh-Ritz methods are both determined by Eq. However, this is not the case for an arbitrary boundary-value problem. A treatment of the similarities and differences in the two methods and a discussion of the wide application of the Galerkin method can be found in [Schul] and in [SF].
- [An Introduction to Numerical Analysis... (Z-Library)] Polynomial interpolation theory has a number of important uses. In this text, its primary use is to furnish some mathematical tools that are used in developing methods in the areas of approximation theory, numerical integration, and the numerical solution of differential equations. A second use is in developing means - for working with functions that are stored in tabular form.

## Cognitive Tools Reference

See `.claude/skills/math-mode/SKILL.md` for full tool documentation.

© parcadei · MIT · parcadei/Continuous-Claude-v3

Similar skills

All skills for Science and research →

From the same set161

The whole set →
graph-algorithms graph-algorithms — a Claude Code skill with a decision tree for graph algorithm problems: traversals, shortest paths, spanning trees, network flow, and spectral analysis. Runs Z3 and SymPy via uv run from inside the agent. CX Codex +1 ★ 3,951repo stars residues A Claude Code skill for solving residue problems in complex analysis. Computes residues at poles, identifies pole order, and applies the residue theorem through SymPy and Z3. CX Codex +1 ★ 3,951repo stars hilbert-spaces Solves functional analysis problems involving Hilbert spaces. Use it for orthogonal decomposition, projection theorems, Riesz representation, and computations on orthonormal bases. CX Codex +1 ★ 3,951repo stars debug-agent debug-agent — a subagent that investigates root causes by exploring the codebase, analyzing logs, finding patterns, and writing a detailed report with fix recommendations. CX Codex ★ 3,951repo stars gradient-methods gradient-methods is a Claude Code skill that helps choose gradient-based optimization methods and step sizes, and diagnose convergence in minimization problems. CX Codex +1 ★ 3,951repo stars aegis aegis is a Claude Code subagent that finds code vulnerabilities and assesses security risks. It checks a supplied threat model and writes its findings to a project file. CX Codex ★ 3,951repo stars oracle oracle — a subagent for Claude Code that searches the web, queries APIs, and gathers information from external sources. Frames research systematically and synthesizes findings through optional LLM analysis. CX Codex ★ 3,951repo stars onboard onboard — a subagent for Claude Code that analyzes existing code and creates a continuity ledger. Runs when entering a brownfield project with code already in place. CX Codex ★ 3,951repo stars

Project sponsors

Companies that keep this analytics open