MCPInstall

formula-derivation

Structures and derives research formulas when the user wants to 推导公式, build a theory line, organize assumptions, turn scattered equations into a coherent derivation, or rewrite theory notes into a paper-ready formula document. Use when the derivation target is not yet fully fixed, the main object still needs to be chosen, or the user needs a coherent derivation package rather than a finished theorem proof.

Installs
537
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/wanshuiyin/auto-claude-code-research-in-sleep --skill formula-derivation
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads formula-derivation automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Formula Derivation: Research Theory Line Construction

Build an honest derivation package, not a fake polished theorem story.

Constants

  • DEFAULT_DERIVATION_DOC = DERIVATION_PACKAGE.md in project root
  • STATUS = COHERENT AS STATED | COHERENT AFTER REFRAMING / EXTRA ASSUMPTION | NOT YET COHERENT

Context: $ARGUMENTS

Goal

Produce exactly one of:

  1. a coherent derivation package for the original target
  2. a reframed derivation package with corrected object / assumptions / scope
  3. a blocker report explaining why the current notes cannot yet support a coherent derivation

Inputs

Extract and normalize:

  • the target phenomenon, formula, relation, or theory line
  • the intended role of the derivation:
    • exact identity / algebra
    • proposition / local theorem
    • approximation
    • mechanism interpretation
  • explicit assumptions
  • notation and definitions
  • any user-provided formula chain, sketch, messy notes, or current draft
  • nearby local theory files if the request points to them
  • desired output style if specified:
    • internal alignment note
    • paper-style theory draft
    • blocker report

If the target, object, notation, or assumptions are ambiguous, state the exact interpretation you are using before deriving anything.

Workflow

Step 1: Gather Derivation Context

Determine the target derivation file with this priority:

  1. a file path explicitly specified by the user
  2. a derivation draft already referenced in local notes
  3. DERIVATION_PACKAGE.md in project root as the default target

Read the relevant local context:

  • the chosen target derivation file, if it already exists
  • any local theory notes, formula drafts, appendix notes, or files explicitly mentioned by the user

Extract:

  • target formula / theory goal
  • current formula chain
  • assumptions
  • notation
  • known blockers
  • desired output mode

Step 2: Freeze the Target

State explicitly:

  • what is being explained, derived, or supported
  • whether the immediate goal is:
    • identity / algebra
    • proposition
    • approximation
    • interpretation
  • what the derivation is expected to output in the end

Do not start symbolic manipulation before this is fixed.

Step 3: Choose the Invariant Object

Identify the single quantity or conceptual object that should organize the derivation.

Typical possibilities include:

  • objective / utility / loss
  • total cost / energy / welfare
  • conserved quantity / state variable
  • expected metric / effective rate / effective cost

If the current notes start from a narrower quantity, decide explicitly whether it is:

  • the true top-level object
  • a proxy
  • a local slice
  • an approximation

Do not let a convenient proxy silently replace the actual conceptual object.

Step 4: Normalize Assumptions and Notation

Restate:

  • all assumptions
  • all symbols
  • regime boundaries or special cases
  • which quantities are fixed, adaptive, or state dependent

Identify:

  • hidden assumptions
  • undefined notation
  • scope ambiguities
  • whether the current formula chain already mixes exact steps with approximations

Preserve the user's original notation unless a cleanup is necessary for coherence. If you adopt a cleaner internal formulation, keep that as a derivation device rather than silently replacing the user's target.

Step 5: Classify the Derivation Steps

For every nontrivial step, determine whether it is:

  • identity: exact algebraic reformulation
  • proposition: a claim requiring conditions
  • approximation: model simplification or surrogate
  • interpretation: prose-level meaning of a formula

Never merge these categories without signaling the transition. If one part is only interpretive, do not present it as if it were mathematically proved.

Step 6: Build a Derivation Map

Choose a derivation strategy, for example:

  • definition -> substitution -> simplification
  • primitive law -> intermediate variable -> target expression
  • global quantity -> perturbation -> decomposition
  • exact model -> approximation -> interpretable closed form
  • general dynamic object -> simplified slice -> local theorem -> return to general case

Then write a derivation map:

  • target formula or theory line
  • required intermediate identities or lemmas
  • which assumptions each nontrivial step uses
  • where approximations enter
  • where special-case and general-case regimes diverge or collapse

If the derivation needs a decomposition, derive it from the chosen global quantity. Do not make a split appear magically from one local variable itself.

Step 7: Write the Derivation Document

Write to the chosen target derivation file.

If the target derivation file already exists:

  • read it first
  • update the relevant section
  • do not blindly duplicate prior content

If the user does not specify a target, default to DERIVATION_PACKAGE.md in project root.

Do NOT write directly into paper sections or appendix .tex files unless the user explicitly asks for that target.

The derivation package must include:

  • target
  • status
  • invariant object
  • assumptions
  • notation
  • derivation strategy
  • derivation map
  • main derivation steps
  • remarks / interpretations
  • boundaries and non-claims

Writing rules:

  • do not hide gaps with words like "clearly", "obviously", or "similarly"
  • define every symbol before use
  • mark approximations explicitly
  • separate derivation body from remarks
  • if the true object is dynamic or state dependent but a simpler slice is analyzed, say so explicitly
  • if a formula line is only heuristic, label it honestly

Step 8: Final Verification

Before finishing the target derivation file, verify:

  • the target is explicit
  • the invariant object is stable across the derivation
  • every assumption used is stated
  • each formula step is correctly labeled as identity / proposition / approximation / interpretation
  • the derivation does not silently switch objects
  • special cases and general cases still belong to one theory line
  • boundaries and non-claims are stated

If the derivation still lacks a coherent object, stable assumptions, or an honest path from premises to result, downgrade the status and write a blocker report instead of forcing a clean story.

Required File Structure

Write the target derivation file using this structure:

# Derivation Package

## Target
[what is being derived or explained]

## Status
COHERENT AS STATED / COHERENT AFTER REFRAMING / NOT YET COHERENT

## Invariant Object
[top-level quantity organizing the derivation]

## Assumptions
- ...

## Notation
- ...

## Derivation Strategy
[chosen route and why]

## Derivation Map
1. Target depends on ...
2. Intermediate step A uses ...
3. Approximation enters at ...

## Main Derivation
Step 1. ...
Step 2. ...
...

## Remarks and Interpretation
- ...

## Boundaries and Non-Claims
- ...

## Open Risks
- ...

Output Modes

If the derivation is coherent as stated

Write the full structure above with a clean derivation package.

If the notes are close but not coherent yet

Write:

  • the exact mismatch
  • the corrected invariant object, assumption, or scope
  • the reframed derivation package

If the derivation cannot be made coherent honestly

Write:

  • Status: NOT YET COHERENT
  • the exact blocker:
    • missing object
    • unstable assumptions
    • notation conflict
    • unsupported approximation
    • theorem-level claim without enough conditions
  • what extra assumption, reframe, or intermediate derivation would be needed

Relationship to proof-writer

Use formula-derivation when the user says things like:

  • “我不知道怎么起这条推导主线”
  • “这个公式到底该从哪个量出发”
  • “帮我把理论搭顺”
  • “把说明文档变成可写进论文的公式文档”
  • “这几段公式之间逻辑不通”

Use proof-writer only after:

  • the exact claim is fixed
  • the assumptions are stable
  • the notation is settled
  • and the task is now to prove or refute that claim rigorously

Once a precise claim and its hypotheses are available, use /lean-formalize when the user requests Lean or a specific proof obligation benefits from formal implementation and checking; routine algebraic derivations do not require it.

Chat Response

After writing the target derivation file, respond briefly with:

  • status
  • whether the target survived unchanged or had to be reframed
  • what file was updated

Key Rules

  • Never fabricate a coherent derivation if the object, assumptions, or scope do not support one.
  • Prefer reframing the derivation over overclaiming.
  • Separate assumptions, identities, propositions, approximations, and interpretations.
  • Keep one invariant object across special and general cases whenever possible.
  • Treat simplified constant-parameter cases as analysis slices, not as the conceptual main object.
  • If uncertainty remains, mark it explicitly in Open Risks; do not hide it in polished prose.
  • Coherence matters more than elegance.

FAQ

What does the formula-derivation skill do?

Structures and derives research formulas when the user wants to 推导公式, build a theory line, organize assumptions, turn scattered equations into a coherent derivation, or rewrite theory notes into a paper-ready formula document. Use when the derivation target is not yet fully fixed, the main object still needs to be chosen, or the user needs a coherent derivation package rather than a finished theorem proof.

How do I install formula-derivation?

Run npx skills add https://github.com/wanshuiyin/auto-claude-code-research-in-sleep --skill formula-derivation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/formula-derivation/ (personal) or .claude/skills/formula-derivation/ (project).

Which AI agents can use formula-derivation?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is formula-derivation safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains formula-derivation?

It is published by wanshuiyin in wanshuiyin/auto-claude-code-research-in-sleep. It has 537 recorded installs.

More from wanshuiyin/auto-claude-code-research-in-sleep

View all →

paper-figure

wanshuiyin/auto-claude-code-research-in-sleep

Generate publication-quality figures and tables from experiment results. Use when user says "画图", "作图", "generate figures", "paper figures", or needs plots for a paper.

semantic-scholar

wanshuiyin/auto-claude-code-research-in-sleep

Search published venue papers (IEEE, ACM, Springer, etc.) via Semantic Scholar API. Complements /arxiv (preprints) with citation counts, venue metadata, and TLDR. Use when user says "search semantic scholar", "find IEEE papers", "find journal papers", "venue papers", "citation search", or wants published literature beyond arXiv preprints.

research-lit

wanshuiyin/auto-claude-code-research-in-sleep

Search and analyze research papers, find related work, summarize key ideas. Use when user says "find papers", "related work", "literature review", "what does this paper say", or needs to understand academic papers.

idea-discovery

wanshuiyin/auto-claude-code-research-in-sleep

Workflow 1: Full idea discovery pipeline to go from a broad research direction to validated, pilot-tested ideas. Use when user says "找idea全流程", "idea discovery pipeline", "从零开始找方向", or wants the complete idea exploration workflow.

idea-creator

wanshuiyin/auto-claude-code-research-in-sleep

Generate and rank research ideas given a broad direction. Use when user says "找idea", "brainstorm ideas", "generate research ideas", "what can we work on", or wants to explore a research area for publishable directions.

arxiv

wanshuiyin/auto-claude-code-research-in-sleep

Search, download, and summarize academic papers from arXiv. Use when user says "search arxiv", "download paper", "fetch arxiv", "arxiv search", "get paper pdf", or wants to find and save papers from arXiv to the local paper library.

Popular productivity & automation skills

View category →

agent-browser

vercel-labs/agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

OfficialProductivity & Automation1.3M installs

lark-doc

open.feishu.cn

飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。

lark-base

open.feishu.cn

飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。

lark-drive

open.feishu.cn

飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。

lark-shared

open.feishu.cn

Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.

lark-im

open.feishu.cn

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。