К основному содержанию
скилл CX Codex

advisor-protocol — скилл для Claude Code: математика и установка

Скилл advisor-protocol для Claude Code передаёт сложные математические выводы на проверку более способной модели. Он подключается, когда агент сомневается в переводе формул в код или трактовке обозначений.

Apache-2.0 ★ 89 обновлён 2026-11-12

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add bis-med-it/marco-BIS --skill advisor-protocol -a claude-code
Открыть на GitHub

Что делает advisor-protocol

Скилл отправляет математический вопрос выбранной модели, когда агент не может уверенно проверить вывод или реализацию формулы. Он подходит для разбора нетипичных априорных распределений, новых схем идентификации и математических выкладок из статей. Рутинную математику вроде стандартных OLS и GLS он не эскалирует.

Агент читает настройки в корневом config.yaml. По умолчанию advisor выключен: для вызова advisor.enabled нужно задать true, а также настроить провайдера, модель и api_key_env. Можно задать резервного провайдера и запрос проверки человеком. Вызовы идут через API провайдера, сама библиотека их не выполняет.

Ответ можно проверить вручную, сохранить вывод в references/ и использовать при реализации. Обмен записывается через скилл research-log; данные наборов и проприетарные сведения отправлять нельзя, но это ограничение задано политикой, а не техническим фильтром.

Какие задачи решает

  • проверить вывод из научной статьи
  • разобрать незнакомую схему идентификации
  • сверить реализацию формулы с математикой
  • перевести выражение в псевдокод
  • зафиксировать проверенный вывод для повторного использования

Примеры запросов агенту

  • Проверь вывод для этой формулы из статьи и перечисли допущения.
  • Сверь реализацию в model.py с математическим выражением.
  • Объясни обозначения в этой схеме идентификации и предложи псевдокод.

Как установить advisor-protocol

1Через Skills CLI (Vercel)

npx skills add bis-med-it/marco-BIS --skill advisor-protocol -a claude-code

2Вручную: положить файлы

~/.claude/skills/advisor-protocol/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/advisor-protocol/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об advisor-protocol

Как установить advisor-protocol в Claude Code?

Выполни npx skills add bis-med-it/marco-BIS --skill advisor-protocol -a claude-code. Файл скилла появится по пути ~/.claude/skills/advisor-protocol/SKILL.md.

Что делает advisor-protocol?

Он передаёт сложные математические выводы и проверки формул настроенной модели, а затем извлекает из ответа выводы, псевдокод и допущения. Можно запросить подтверждение человека и сохранить результат для следующих запусков.

Что нужно для работы advisor-protocol?

Нужны настройки провайдера и модели в корневом config.yaml, значение advisor.enabled: true и переменная окружения, заданная через api_key_env. Запрос отправляется через API провайдера; можно указать резервного провайдера.

Исходный текст

SKILL.md · Apache-2.0
---
name: advisor-protocol
description: >
  Model-agnostic escalation protocol for complex mathematical reasoning, derivation
  verification, and theoretical validation. Use when the executing agent encounters
  dense mathematical content from a paper, unfamiliar identification schemes, non-standard
  prior derivations, or any situation where the agent's confidence in correctly translating
  mathematics to code is low. This skill routes the query to a more capable reasoning
  model; the specific provider and model are configurable and not hardcoded.
---

# Advisor protocol

## Purpose

The executing agent handles the routine workflow. When mathematical content
exceeds its confidence, it asks a more capable reasoning model to check the
work before proceeding, as a researcher would consult a senior colleague on a
tricky derivation.

## When to escalate

The executing agent should invoke the advisor when:

1. **Unfamiliar derivations.** A paper introduces notation, distributional assumptions,
   or algebraic steps the agent cannot confidently verify.
2. **Novel identification schemes.** Sign restrictions with complex penalty functions,
   narrative identification with inequality constraints, or set-identified models.
3. **Non-standard priors.** Any prior structure not covered by the
   `scripts/lib/bvar.py` module docstrings or `CONVENTIONS.md`.
4. **Distributional theory.** Posterior derivations involving non-conjugate cases,
   marginalisation over nuisance parameters, or asymptotic approximations.
5. **Ambiguous mathematical notation.** When a paper's notation is inconsistent or
   context-dependent and the agent is unsure of the correct interpretation.
6. **Cross-checking implementations.** After coding a complex formula, the agent can
   ask the advisor to verify the code matches the mathematics.

**Do not escalate for:** routine matrix algebra, standard OLS/GLS, well-documented
Minnesota prior computation, basic time-series transformations, or anything already
covered in verified reference documents.

## Advisor configuration

The advisor is off by default. Before any call, read `advisor.enabled` in the
repo-root `config.yaml`. If it is not `true`, do not call the advisor: tell
the user the step would normally be escalated, continue without it, and
suggest checking the derivation by hand or enabling the advisor.

The advisor is configured in the repo-root `config.yaml` under `advisor:`
(`enabled`, provider, model, endpoint, `api_key_env`, an optional fallback provider, and
settings: `max_attempts`, `timeout_seconds`, `log_all_exchanges`,
`require_human_review`). The model named there is an example; set one the
user has access to. Users or administrators set this once; the agent reads it
at runtime.

The agent sends the query through the configured provider's API; the
library implements no advisor calls.

## Escalation protocol

### Step 1: Prepare the query

The executing agent constructs a structured prompt for the advisor:

```
CONTEXT:
I am implementing [model/method] from [paper reference].
The executing environment is [Python/R/Julia].

MATHEMATICAL CONTENT:
[Extract the relevant equations, definitions, and notation from the paper.
Include surrounding context so the advisor understands the setup.]

SPECIFIC QUESTION:
[One of:]
- "Verify that the following derivation is correct: [steps]"
- "Translate this mathematical expression into pseudocode: [expression]"
- "This paper uses notation X for Y. Please confirm my interpretation: [interpretation]"
- "I have implemented this formula as [code]. Verify it matches the mathematics."
- "Derive the posterior distribution for [parameter] given [prior] and [likelihood]."

CONSTRAINTS:
- Provide step-by-step reasoning.
- Flag any assumptions that are implicit in the paper but should be made explicit.
- If the derivation has multiple valid interpretations, list them.
- Express the final result in explicit matrix notation with dimensions annotated.
```

### Step 2: Call the advisor

Send the query through the configured provider's API as a standard request,
with no provider-specific logic beyond API format translation. If the primary
provider fails and a fallback is set, try the fallback. If no provider answers,
tell the user to verify the mathematical content manually before proceeding.

### Step 3: Process the response

1. Parse the advisor's response.
2. Extract: verified derivation steps, pseudocode, flagged assumptions, and any
   alternative interpretations.
3. **Present to the human for review** (if `require_human_review` is true).
   The review happens after the call and before the response is used.
4. Log the full exchange via the research-log skill.

### Step 4: Incorporate into workflow

Once the human confirms the advisor's output:

1. Save the verified derivation as a reference document in the relevant skill's
   `references/` directory (created on first use; e.g., `<skill-name>/references/verified_xyz_derivation.md`)
   or alongside the lib module that needs it
   (e.g., `scripts/lib/references/verified_xyz_derivation.md`).
2. Use the pseudocode to implement the formula.
3. The reference document persists, so future runs of the same method do not need
   to re-escalate.

This creates a growing library of verified mathematical content over time.

## Cost management

Advisor calls are expensive relative to routine execution. For each session,
the agent records in the research log the number of advisor calls, tokens
per call, and a cost estimate from the provider's published pricing. If costs
are a concern, the user can:

- Ask the agent to confirm with the user before each advisor call (an
  explicit step before invoking; `require_human_review` reviews the response
  after the call, so it saves no cost)
- Use a local model as the advisor for cost-free but potentially lower-quality review
- Pre-populate `references/` with verified content to reduce future escalations

## Institutional deployment considerations

Central banks and research institutions may have:

- **Air-gapped networks.** Use a locally hosted model as the advisor.
- **Data confidentiality constraints.** The advisor prompt should never include
  proprietary data, only mathematical content from published or working papers.
  The skill instructs the agent to send only equations and derivations, never
  datasets or proprietary data. This is a policy, not a technical filter.
- **Approved vendor lists.** The configurable provider system accommodates this:
  set only the approved provider(s) in the configuration.
- **Audit requirements.** The agent logs every advisor exchange in the
  research log, with timestamps, prompts, responses, and human confirmation
  status.

© bis-med-it · Apache-2.0 · bis-med-it/marco-BIS

Похожие скиллы

Каталог скиллов SKILL.md →
okx-agent-payments-protocol okx Скилл okx-agent-payments-protocol для Claude Code разбирает сценарии оплаты агентами и работы с платными HTTP-эндпоинтами. Он подключается при HTTP 402, запросах оплаты и операциях с платёжными ссылками. CX Codex +1 16 200установок protocol-reverse-engineering Dávid Balatoni Скилл protocol-reverse-engineering для Claude Code разбирает сетевой трафик, выявляет структуру протоколов и оформляет спецификацию. Анализирует проприетарные протоколы. CX Codex +1 12 701установок defi-protocol-templates Seth Hobson Скилл defi-protocol-templates даёт Solidity-шаблоны для стейкинга и AMM, а также систем управления и flash loan. Пригодится при создании DeFi-протокола. CX Codex +1 10 400установок bailian-protocol modelstudioai Скилл bailian-protocol задаёт протокол выполнения, проверки прав и согласий для инструментов Alibaba Cloud Bailian. Он нужен как база перед запуском любых команд семейства bl. CX Codex +1 9 400установок crypto-protocol-diagram trailofbits Скилл crypto-protocol-diagram разбирает код или спеку криптопротокола и собирает Mermaid sequenceDiagram с пометками операций: keygen, DH, KDF, подпись. CX Codex +1 4 500установок network-protocol-attacks yaklang Скилл network-protocol-attacks для Claude Code описывает атаки на сетевые протоколы: ARP-спуфинг, отравление LLMNR и NBT-NS, WPAD, DHCPv6 и VLAN hopping. Внутренний пентест включает его для проверки этих техник. CX Codex +1 3 900установок

Из того же набора12

Весь набор →
consistency-audit Скилл consistency-audit для Claude Code проверяет согласованность навыков, библиотечного кода и словаря проекта. Запускается по запросу, перед релизом или после серии правок. CX Codex +1 ★ 89звёзд репо econometric-diagnostics Скилл econometric-diagnostics для Claude Code проверяет остатки и адекватность VAR/BVAR после оценки модели или по запросу проверить автокорреляцию, гетероскедастичность, нормальность и структурные сдвиги. CX Codex +1 ★ 89звёзд репо model-selection Скилл model-selection для Claude Code подбирает эконометрическую модель под исследовательский вопрос и доступные данные. Запускается, когда нужно выбрать подход или проверить уже выбранную модель. CX Codex +1 ★ 89звёзд репо research-log Скилл research-log для Claude Code ведёт журнал решений и этапов эконометрического анализа. Он подключается после завершения этапа другим скиллом MaRCo@BIS или по запросу на аудит, воспроизводимость либо сводку сессии. CX Codex +1 ★ 89звёзд репо knowledge-base Скилл knowledge-base для Claude Code согласует общие эконометрические знания агента с данными и правилами конкретной страны. Он подключается при настройке анализа или работе с местными источниками и исследованиями. CX Codex +1 ★ 89звёзд репо model-dictionary Скилл model-dictionary для Claude Code подбирает эконометрические спецификации по научной литературе. Агент ищет подход к исследовательскому вопросу или разбирает новую статью для словаря. CX Codex +1 ★ 89звёзд репо benchmarking Скилл benchmarking для Claude Code проверяет качество прогнозов и корректность результатов оценки. Запускается по запросу после расчёта модели или при подготовке результатов к публикации. CX Codex +1 ★ 89звёзд репо results-presentation Скилл results-presentation для Claude Code, который оформляет эконометрические результаты в графики, таблицы и текстовую интерпретацию. Запускается на этапе подготовки отчёта или по просьбе показать результаты и подготовить их к публикации. CX Codex +1 ★ 89звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой