Логотип Codex Math

Codex Math

Сообщество
morankor
codex-math

Используйте OpenAI Codex (gpt-5.5) как состязательный математический сопроцессор в режимах проверки, написания и исследования: для работы над сложными доказательствами, поиска контрпримеров и независимой проверки. Рассматривайте каждый результат как зацепку, а не окончательный вердикт.

Add to TypingMind

Обзор

Издательmorankor
Репозиторийtheorist-toolbox
Название навыкаcodex-math
Звёзды
92
Форки
23
Файлы в комплекте
Только инструкции
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Всё необходимое — в инструкциях

    Всё необходимое для модели содержится в инструкциях — никаких дополнительных файлов для синхронизации.

  • Открытый исходный код

    Издатель навыка на GitHub — morankor. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Codex Math в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/morankor/theorist-toolbox/tree/master/skills/codex-math
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/morankor/theorist-toolbox.git /tmp/theorist-toolbox
mkdir -p .claude/skills
cp -r /tmp/theorist-toolbox/skills/codex-math .claude/skills/codex-math
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Codex Math в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Codex Math, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Codex Math не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Author: Moran Koren, Ben-Gurion University of the Negev (korenmor@bgu.ac.il). Part of the Theorist Toolbox.

What this is

OpenAI Codex (gpt-5.5) as a mathematical co-processor. Codex runs non-interactively via codex exec and returns structured results. Use it for hard proof problems that resist direct attempts.

Scripts are at code/utils/codex_math/. Three modes: verify, write, explore.

The erratic genius caveat

Codex is an excellent mathematician but produces a substantial fraction of false positives. It is brilliant and unreliable. Treat every output as a lead, not a verdict.

Real catches: concrete counterexamples, dimensional/sign errors, genuine logical gaps, missing existence arguments, incorrect domain specifications.

False positives: flagging standard conventions as errors, demanding unnecessary generality, over-interpreting degenerate cases, flagging stated assumptions as "unjustified," missing paper-level context.

How to tell them apart:

  • A real catch involves a specific counterexample or points to a concrete step that doesn't follow
  • A false positive involves a convention mismatch, demands regularity conditions that are standard, or flags something the paper already addresses elsewhere

Do not accept or reject Codex output without triaging it yourself. Read each finding. Check whether the concern is real. If Codex says a step is wrong, verify the specific algebra. If Codex says a proof is correct, still check the key steps.

When to use

  • After a proof attempt fails. If you tried to prove a result and got stuck, ask Codex to explore or write the proof. It may find a strategy you missed.
  • After the math auditor flags a gap. If the auditor identified an unproved load-bearing claim, use Codex to attempt the proof before weakening the claim.
  • For hard counterexample search. If you need to know whether a conjecture is true or false, Codex can systematically explore.
  • For independent verification. Run Codex verify on your own proofs as a second opinion.
  • Do not use for routine algebra. Simple FOCs, envelope conditions, sign checks, and standard derivations belong in the sympy skill (faster, deterministic, free). Reach for Codex only when the problem requires reasoning — proof strategy, counterexample search, existence/uniqueness — not when it's just symbolic computation.

Reasoning effort

Codex supports three reasoning effort levels. Do not limit effort on hard problems. The cost of running high effort is small; the cost of missing a proof or counterexample is large.

TaskEffortWhen to use
Quick sanity checklowRoutine sign/dimension check, already confident
Standard verificationmediumDefault. Checking a proof you believe is correct
Hard proof, conjecture, or explorationhighAlways use high for: unproved load-bearing claims, counterexample search, writing proofs for results that resisted direct attempts, anything the math auditor flagged as Critical

When in doubt, use high. There is no reason to economize on reasoning effort for important results.

How to prompt Codex well

Codex is non-interactive — it gets one prompt and returns one response. The quality of its output depends entirely on the quality of your prompt. Do the prep work before calling any script.

For verify and write modes (scripts handle the prompt, but you choose what to extract)

The scripts construct the prompt from extracted content. Your job is to give the right pattern so it extracts the right block. If the proposition references definitions or equations from elsewhere in the paper, the script grabs referenced equations automatically, but it may miss context. When verifying a hard proof:

  1. Check that the extracted block includes everything Codex needs (run extract_block.sh first to see what it pulls)
  2. If critical context is missing, use explore mode instead and construct the full prompt manually

For explore mode (you write the prompt)

This is where prompt quality matters most. Before calling codex_explore.sh:

  1. State the exact claim. Not "check the concavity" but "Prove or disprove: V(τ) is strictly concave in τ for all τ > 0, where x*(τ) is the unique fixed point of x = g(τ, x) with g defined by [equation]."
  2. Define all notation. Codex doesn't know your paper. Spell out every variable, its domain, and its economic meaning. "where τ > 0 is the tax rate, x*(τ) is the equilibrium effort level, σ² > 0 is the noise variance, γ ∈ (0,1) is risk aversion."
  3. Say what's been tried and failed. "Direct computation of V''(τ) via the chain rule produces a rational function whose sign depends on parameter ratios. The Hessian approach doesn't simplify because the implicit function has a non-separable second derivative."
  4. Ask for specific strategies. "Try: (a) change of variables to make the composition separable, (b) show the composition of concave functions is concave under the monotonicity conditions that hold here, (c) find a counterexample in the region γ > 0.5, σ² < 1."
  5. Demand rigor. "Prove every step. If you claim a function is concave, compute the second derivative and show it's negative. If you claim a counterexample, give specific parameter values and verify numerically. Do not hand-wave."

Example: good vs. bad explore prompts

Bad: "Is the value function concave?"

Good: "Consider V(τ) = u(c*(τ)) - ψ·x*(τ)², where c*(τ) = f(x*(τ)) - τ·x*(τ) and x*(τ) solves the fixed point x = h(τ, x) with h(τ,x) = (1-τ)f'⁻¹(ψx/(1-τ)). All parameters strictly positive, f strictly concave with f(0)=0, f'(0)=∞, f'(∞)=0. Prove or disprove: V is strictly concave in τ on (0,1). If not globally concave, find the tightest sufficient condition. Approaches tried: direct Hessian (doesn't simplify due to implicit function composition), perturbation around τ=0 (works locally). Try: envelope theorem approach, monotone comparative statics, or counterexample search over standard CES production functions."

The difference: the good prompt gives Codex everything it needs to work independently — definitions, parameter domains, what's been tried, what to try next, and the standard of rigor expected.

General rules for prompting Codex

  • Be explicit about rigor. Say "prove every step" or "show all algebra." Codex will hand-wave if you let it.
  • Include parameter domains. Codex needs to know whether parameters are positive, bounded, in (0,1), etc.
  • State the standard of proof. "A valid proof must handle all boundary cases" or "a counterexample must give specific numerical parameter values."
  • Ask for multiple strategies when exploring. Codex may fail with one approach but succeed with another.
  • Pipe content inline; do not have Codex read files itself. On a properly configured host Codex can cat files in the workspace, but reading from inside the sandbox is fragile (depends on bwrap being functional — see Sandbox model below) and adds a tool call. The scripts already pre-extract content; for ad-hoc prompts, paste the content into the prompt yourself.

Mode 1: Verify a proof

Check whether a proof is correct step by step.

bash
# Basic usage — extract block by pattern, verify at medium effort
code/utils/codex_math/codex_verify.sh paper/sections/model.tex "Theorem 1"

# Hard proof — use high effort
code/utils/codex_math/codex_verify.sh paper/sections/model.tex "prop:concavity" high

# Custom output directory
code/utils/codex_math/codex_verify.sh paper/sections/model.tex "Lemma 3" high output/codex_audits

The script extracts the proposition + proof + referenced equations automatically. Result saved to output/codex_audits/.

After running: Read the output. For each FAIL finding, check whether it's a real error or a false positive. Report only confirmed errors.

Mode 2: Write a proof

Ask Codex to write a complete proof of a stated result.

bash
# From inline theorem statement
code/utils/codex_math/codex_write.sh "Prove: the equilibrium is unique for all parameter values satisfying Assumption 1" high

# From a file containing the theorem
code/utils/codex_math/codex_write.sh theorem_statement.tex high

# From specific lines of a file
code/utils/codex_math/codex_write.sh paper/model.tex:200-210 high

Result saved to output/codex_proofs/.

After running: Do not blindly paste the proof into the paper. Verify every step. Run Mode 1 (verify) on Codex's own proof. Codex may produce a proof that looks complete but has a subtle gap.

Mode 3: Explore a conjecture

Investigate whether a claim is true, find conditions, construct counterexamples.

bash
# Plain question
code/utils/codex_math/codex_explore.sh "Is V(τ) globally concave for all γ > 0, or can it have multiple local maxima?" high

# With context file (definitions, notation, setup)
code/utils/codex_math/codex_explore.sh "Under what conditions on risk aversion and noise variance is the equilibrium unique?" paper/model.tex high

Result saved to output/codex_explorations/.

This is the most valuable mode for the pipeline. When a proof attempt fails and you're unsure whether the result is even true, exploration can:

  • Find a counterexample (→ characterize the boundary instead)
  • Find a sufficient condition (→ prove under that condition)
  • Suggest a proof strategy you haven't tried
  • Confirm the result is likely true but hard to prove (→ try harder, or restrict the parameter space)

Sandbox model

Codex with --full-auto runs in the workspace-write sandbox:

  • Shell + Python available. cat, grep, sed, python3 (including sympy) all work.
  • Read access everywhere the user can read.
  • Write access only in workdir, /tmp, $TMPDIR, and ~/.codex/memories. Writes outside those zones fail with Read-only file system.

Ubuntu 24.04 host gotcha. The sandbox uses bubblewrap, which needs unprivileged user namespaces. Ubuntu 24.04's default AppArmor policy blocks this for unconfined binaries — every codex shell command then fails with bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted. One-time fix:

bash
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
echo 'kernel.apparmor_restrict_unprivileged_userns = 0' | sudo tee /etc/sysctl.d/60-apparmor-namespace.conf
sudo sysctl --system
# sanity: bwrap --unshare-all --bind / / true && echo OK

Our scripts don't depend on the sandbox shell. They use -o "$TMP" so the Codex CLI (running outside the sandbox) captures the model's final message regardless, and they pre-extract file content via extract_block.sh rather than asking codex to cat files. So codex_verify.sh, codex_write.sh, and codex_explore.sh work identically whether or not bwrap can start. If you write ad-hoc codex prompts, you can rely on shell + python on a working host; on a broken one, pass content inline.

Dual audit pattern

For maximum confidence on critical results, run Codex AND a Claude verification in parallel:

bash
# Codex audit
code/utils/codex_math/codex_verify.sh paper/model.tex "Proposition 3" high

# Claude math-auditor (runs separately as an agent)
  • Both PASS → high confidence
  • Both FAIL on same step → real error
  • Disagreement → investigate the specific step manually

Runtime behavior and output capture

Hard proofs at high effort routinely run 1–5 minutes; do not assume a hang. The terminal shows a session header, then a short progress paragraph mid-thinking ("I'm thinking about..."), then the final answer streams once reasoning completes. Those middle paragraphs are the model summarizing its own reasoning — not the answer. Do not paste them into the paper.

What gets saved to disk: only the final answer (with a header prefix), in the directory below. Reasoning summaries appear in the terminal but are not captured.

To capture the full session (e.g., for debugging or to record what codex was thinking), pipe the script output through tee:

bash
bash code/utils/codex_math/codex_verify.sh paper/sections/model.tex "Proposition 7" high 2>&1 | tee output/codex_logs/prop7.log

Output locations

ModeDefault output directory
Verifyoutput/codex_audits/
Writeoutput/codex_proofs/
Exploreoutput/codex_explorations/

Часто задаваемые вопросы

Что делает навык ИИ Codex Math?

Используйте OpenAI Codex (gpt-5.5) как состязательный математический сопроцессор в режимах проверки, написания и исследования: для работы над сложными доказательствами, поиска контрпримеров и независимой проверки. Рассматривайте каждый результат как зацепку, а не окончательный вердикт.

Зачем использовать Codex Math в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Codex Math — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Codex Math в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/morankor/theorist-toolbox/tree/master/skills/codex-math. TypingMind прочитает файл SKILL.md и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Codex Math?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Codex Math?

С любым количеством. В TypingMind вы можете использовать Codex Math с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Codex Math?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — morankor. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все
Логотип affaan-m

Skill Host Compat

affaan-m
СообществоПопулярный

Проверяйте навыки ECC перед отправкой PR: корректность frontmatter для Codex/Cursor и наличие замен, предназначенных только для Claude.

41.4K
277.3K
Файлы: 1
Открыть
Логотип affaan-m

Brand Voice

affaan-m
СообществоПопулярный

Создайте профиль стиля письма на основе реальных публикаций, эссе, заметок о запуске, документов или текста сайта, а затем используйте его повторно в материалах, деловой переписке и публикациях в социальных сетях. Подходит, если пользователь хочет…

40.4K
270.2K
Файлы: 2
Открыть
Логотип affaan-m

Competitive Platform Analysis

affaan-m
СообществоПопулярный

Используйте при определении конкурентной среды: выявлении конкурентов, их классификации и отборе по оценкам до начала сравнительного анализа. Определяет, кого считать конкурентом, к какому уровню его отнести…

40.4K
270.2K
Файлы: 1
Открыть
Логотип affaan-m

Content Engine

affaan-m
СообществоПопулярный

Создавайте системы контента для X, LinkedIn, TikTok, YouTube, рассылок и кампаний на разных платформах. Используйте этот навык, если пользователю нужны публикации для соцсетей, треды, сценарии, контент-календари или адаптация контента…

40.4K
270.2K
Файлы: 1
Открыть

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇