residues — скилл для Claude Code: решение задач с вычетами
Скилл residues для Claude Code помогает решать задачи с вычетами в комплексном анализе. Запускает вычисления вычетов, определяет порядок полюсов и применяет теорему о вычетах через SymPy и Z3.
MIT ★ 3 951 обновлён 2026-01-26
npx skills add parcadei/Continuous-Claude-v3 --skill residues -a claude-codeЧто делает residues
Скилл предоставляет структурированный подход к вычислению вычетов: простой полюс через формулу Res(f, z₀) = lim(z→z₀) (z − z₀)f(z), полюс порядка n через производную, существенные особенности через ряд Лорана. Вычисления выполняются командами sympy_compute.py для пределов, дифференцирования и разложения в ряд, z3_solve.py для проверки принадлежности полюсов контуру интегрирования.
Дерево решений навигирует по типам особенностей: сначала определяешь, простой ли полюс или выше порядка, потом вычисляешь вычет подходящим методом, потом применяешь теорему о вычетах — интеграл по замкнутому контуру равен 2πi, умноженному на сумму вычетов внутри контура. Требует Python и установленных пакетов SymPy и Z3 для работы.
Какие задачи решает
- вычислить вычет функции в полюсе
- определить порядок полюса
- найти вычеты в существенных особенностях через ряд Лорана
- вычислить интеграл по замкнутому контуру через вычеты
- проверить, лежит ли полюс внутри контура интегрирования
Примеры запросов агенту
- Вычисли вычет функции 1/((z-1)*(z-2)) в точке z=1 через residues
- Определи порядок полюса e^(1/z) в нуле и найди его вычет
- Применив residues, найди интеграл по окружности |z|=3 для функции с полюсами внутри
Как установить residues
1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill residues -a claude-code2Вручную: положить файлы
~/.claude/skills/residues/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/residues/
1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill residues -a codex2Вручную: положить файлы
.agents/skills/residues/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill residues -a cursor2Вручную: положить файлы
.cursor/skills/residues/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install parcadei/Continuous-Claude-v3 .claude/skills/math/complex-analysis/residues2Вручную: положить файлы
.github/skills/residues/SKILL.md1Через Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill residues -a gemini-cli2Командой платформы
gemini skills install https://github.com/parcadei/Continuous-Claude-v3 --path .claude/skills/math/complex-analysis/residuesВручную: положить файлы
.devin/skills/residues/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о residues
Как установить residues в Claude Code?
Выполни команду npx skills add parcadei/Continuous-Claude-v3 --skill residues -a claude-code, потом посмотри документацию в файле ~/.claude/skills/residues/SKILL.md.
Что делает residues?
Предоставляет инструменты для вычисления вычетов функций в полюсах и существенных особенностях, определения порядка полюсов и применения теоремы о вычетах для интегралов по замкнутым контурам.
Какие зависимости нужны для работы residues?
Скилл использует SymPy для аналитических вычислений (пределы, производные, ряды) и Z3 для логических проверок. Оба пакета должны быть установлены в окружении Python.
Исходный текст
SKILL.md · MIT
---
name: residues
description: "Problem-solving strategies for residues in complex analysis"
allowed-tools: [Bash, Read]
---
# Residues
## When to Use
Use this skill when working on residues problems in complex analysis.
## Decision Tree
1. **Computing Residues**
- Simple pole at z0:
* Res(f, z0) = lim_{z->z0} (z - z0)f(z)
* `sympy_compute.py limit "(z - z0)*f(z)" --var z --at z0`
- Pole of order n:
* Res(f, z0) = (1/(n-1)!) * lim d^{n-1}/dz^{n-1}[(z-z0)^n f(z)]
* `sympy_compute.py diff "((z-z0)**n)*f(z)" --var z --order n-1`
- L'Hopital shortcut for f = g/h with simple pole:
* Res(f, z0) = g(z0)/h'(z0)
2. **Identify Pole Order**
- Simple pole: (z - z0)f(z) has finite limit
- Order n: (z - z0)^n f(z) has finite limit, but (z - z0)^{n-1} f(z) doesn't
- `sympy_compute.py limit "(z - z0)**n * f(z)" --var z --at z0`
3. **Essential Singularities**
- Neither pole nor removable (e.g., e^{1/z} at z=0)
- Compute residue via Laurent series
- `sympy_compute.py series "exp(1/z)" --var z --at 0`
4. **Apply Residue Theorem**
- oint_C f(z)dz = 2*pi*i * (sum of residues inside C)
- Count only poles INSIDE the contour
- `z3_solve.py prove "pole_inside_contour"`
## Tool Commands
### Sympy_Residue
```bash
uv run python -m runtime.harness scripts/sympy_compute.py residue "1/((z-1)*(z-2))" --var z --at 1
```
### Sympy_Limit
```bash
uv run python -m runtime.harness scripts/sympy_compute.py limit "(z - z0)*f(z)" --var z --at z0
```
### Sympy_Laurent
```bash
uv run python -m runtime.harness scripts/sympy_compute.py series "exp(1/z)" --var z --at 0
```
### Z3_Pole_Inside
```bash
uv run python -m runtime.harness scripts/z3_solve.py prove "abs(z0) < R"
```
## Key Techniques
*From indexed textbooks:*
- [Complex analysis an introduction to... (Z-Library)] The fact that the calculus of residues yields complex rather than real integrals is no dis¬ (49) with g(z) — z, we obtain <»» i>(”)=25 / f^w) = 2vi / /'(*) /(z) - w z dz. If (49) is applied with g(z) = zm, equation (50) is replaced by 2iri I |z-zo| = /'(*) f(z) - w zm dz. The right-hand member represents an analytic function of w for \w — ir0| < 8.
- [Complex analysis an introduction to... (Z-Library)] What are the possible values of r dz J \/l — z2 over a closed curve in the region? THE CALCULUS OF RESIDUES The results of the preceding section have shown that the determination of line integrals of analytic functions over closed curves can be reduced to the determination of periods. Under certain circumstances it turns out that the periods can be found without or with very little computation.
- [Complex analysis an introduction to... (Z-Library)] Hint: Sketch the image of the imaginary axis and apply the argument principle to a large half disk. Evaluation of Definite Integrals. The calculus of residues pro¬ vides a very efficient tool for the evaluation of definite integrals.
- [Complex analysis an introduction to... (Z-Library)] The particular function 1 /(z — ay) has a vanishing period. The constant Rj which produces this result is called the residue of f(z) at the point ay. We repeat the definition in the following form: It is helpful to use such self-explanatory notations as R = Res!
- [Complex Analysis (Elias M. Stein, Ram... (Z-Library)] Cauchy, 1826 There is a general principle in the theory, already implicit in Riemann’s work, which states that analytic functions are in an essential way charac- terized by their singularities. That is to say, globally analytic functions are “eectively” determined by their zeros, and meromorphic functions by their zeros and poles. While these assertions cannot be formulated as precise general theorems, there are nevertheless signicant instances where this principle applies.
## Cognitive Tools Reference
See `.claude/skills/math-mode/SKILL.md` for full tool documentation.
© parcadei · MIT · parcadei/Continuous-Claude-v3