root-finding — скилл для Claude Code: поиск корней
Скилл root-finding для Claude Code выбирает численный метод поиска корней уравнения или решения системы — с учётом наличия производных и известного интервала.
MIT ★ 3 951 обновлён 2026-01-26
npx skills add parcadei/Continuous-Claude-v3 --skill root-finding -a claude-codeЧто делает root-finding
Скилл предлагает сначала определить, ищете ли вы один корень или несколько, известен ли интервал с корнем и доступны ли производные. Для интервала без производных он рекомендует бисекцию или метод Брента; для производных — метод Ньютона, а для систем уравнений — scipy.optimize.fsolve.
В примерах используются scipy.optimize.brentq и scipy.optimize.newton, а для символьного решения — sympy_compute.py. Для нескольких корней описаны дефляция и запуск поиска из разных начальных точек. Здесь есть и практический критерий проверки: для brentq с известной скобкой указана гарантированная сходимость.
После вычисления скилл предлагает проверить, что значение функции в найденной точке меньше допуска и что корень лежит в ожидаемой области. Для доказательства приводится команда z3_solve.py prove "f(root) == 0"; команды примеров используют uv run python.
Какие задачи решает
- выбрать метод поиска по наличию производной и интервала
- найти корень уравнения с помощью SciPy
- решить систему нелинейных уравнений
- искать несколько корней из разных начальных точек
- проверить остаток функции и область найденного корня
Примеры запросов агенту
- Подбери метод и найди корень уравнения
x**2 - 2на интервале от 0 до 2. - Реши систему нелинейных уравнений с помощью подходящего метода SciPy.
- Найди несколько корней уравнения, начни поиск из разных точек и проверь результат.
Как установить root-finding
1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill root-finding -a claude-code2Вручную: положить файлы
~/.claude/skills/root-finding/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/root-finding/
1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill root-finding -a codex2Вручную: положить файлы
.agents/skills/root-finding/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill root-finding -a cursor2Вручную: положить файлы
.cursor/skills/root-finding/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install parcadei/Continuous-Claude-v3 .claude/skills/math/numerical-methods/root-finding2Вручную: положить файлы
.github/skills/root-finding/SKILL.md1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill root-finding -a gemini-cli2Командой платформы
gemini skills install https://github.com/parcadei/Continuous-Claude-v3 --path .claude/skills/math/numerical-methods/root-findingВручную: положить файлы
.devin/skills/root-finding/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о root-finding
Как установить root-finding в Claude Code?
Выполните npx skills add parcadei/Continuous-Claude-v3 --skill root-finding -a claude-code. Файл скилла находится по пути ~/.claude/skills/root-finding/SKILL.md.
Что делает root-finding?
Помогает выбрать численный способ решения уравнения или системы по наличию производных и известного интервала, а затем проверить результат.
Как проверить найденный корень?
Скилл предлагает проверить значение функции в точке относительно допуска и убедиться, что корень находится в ожидаемой области. Для доказательства также приводит z3_solve.py prove "f(root) == 0".
Исходный текст
SKILL.md · MIT
---
name: root-finding
description: "Problem-solving strategies for root finding in numerical methods"
allowed-tools: [Bash, Read]
---
# Root Finding
## When to Use
Use this skill when working on root-finding problems in numerical methods.
## Decision Tree
1. **Characterize the Problem**
- Single root or multiple roots?
- Bracketed (know interval containing root)?
- Derivatives available?
2. **Method Selection**
| Situation | Method | Implementation |
|-----------|--------|----------------|
| Bracketed, no derivatives | Bisection, Brent | `scipy.optimize.brentq` |
| Derivatives available | Newton-Raphson | `scipy.optimize.newton` |
| No derivatives | Secant method | `scipy.optimize.newton` (no fprime) |
| System of equations | `scipy.optimize.fsolve` | Requires Jacobian ideally |
3. **Implement Root Finding**
- `scipy.optimize.brentq(f, a, b)` - guaranteed convergence if bracketed
- `scipy.optimize.newton(f, x0, fprime=df)` - quadratic convergence near root
- For systems: `scipy.optimize.fsolve(F, x0)`
4. **Handle Multiple Roots**
- Deflation: divide out found roots
- Multiple starting points
- `sympy_compute.py solve "f(x)" --var x` for symbolic solutions
5. **Verify Solutions**
- Check |f(root)| < tolerance
- Verify root is in expected domain
- `z3_solve.py prove "f(root) == 0"`
## Tool Commands
### Scipy_Brentq
```bash
uv run python -c "from scipy.optimize import brentq; root = brentq(lambda x: x**2 - 2, 0, 2); print('Root:', root)"
```
### Scipy_Newton
```bash
uv run python -c "from scipy.optimize import newton; root = newton(lambda x: x**2 - 2, 1.0, fprime=lambda x: 2*x); print('Root:', root)"
```
### Sympy_Solve
```bash
uv run python -m runtime.harness scripts/sympy_compute.py solve "x**3 - x - 1" --var x
```
## Key Techniques
*From indexed textbooks:*
- [Numerical analysis (Burden R.L., Fair... (Z-Library)] How accurate was his approximation? C H A P T E R 2 Solutions of Equations in One Variable 2. Survey of Methods and Software In this chapter we have considered the problem of solving the equation f (x) = 0, where f is a given continuous function.
- [An Introduction to Numerical Analysis... (Z-Library)] Computational Solution of Nonlinear Operator Equations. Methods for Solving Systems of Nonlinear Equations. Society for Industrial and Applied Mathematics, Philadelphia.
- [An Introduction to Numerical Analysis... (Z-Library)] General polynomial rootfinding methods There are a large number of rootfind ing algorithms designed especially for polynomials. Many of these are taken up in detail in the books Dejon and Henrici (1969), Henrici (1974, chap. There are far too many types of such methods to attempt to describe them all here.
- [An Introduction to Numerical Analysis... (Z-Library)] J n Consider the product a 0 a 1 ••• am, where a 0 , a1, ••• , am are m + 1 num bers stored in a computer that uses n digit base fJ arithmetic. What is a rigorous bound for w? What is a statistical estimate for the size of w?
- [An Introduction to Numerical Analysis... (Z-Library)] Discussion of the Literature There is a large literature on methods for calculating the roots of a single equation. See the books by Householder (1970), Ostrowski (1973), and Traub (1964) for a more extensive development than has been given here. Newton's method is one of the most widely used methods, and its development is due to many people.
## Cognitive Tools Reference
See `.claude/skills/math-mode/SKILL.md` for full tool documentation.
© parcadei · MIT · parcadei/Continuous-Claude-v3