本文へ移動
cccskills
無料GitHub で公開

concept-to-formula-deriver

当问「这条公式怎么来的」「为什么长这样」,或说「帮我推导/推出 X 公式」时使用。从定义或守恒律出发重建标准公式,每一步标出用的是哪条原理、这一步在物理上做了什么;假设写在它真正被用到的那一步,不堆在开头。终式可用 scripts/compare_formula.py 与标准式做符号比对。

会被评分的推导:结构与理由可以给,代数由本人做。要逐步核验一份已写好的推导,用 derivation-step-checker。

インストール方法を見る

含まれるファイル(2)

  • SKILL.md11.5 KB
  • scripts/compare_formula.py18.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

concept-to-formula-deriver

Purpose

Use this skill when someone knows the target relation they need, but does not yet understand how that relation follows from first principles.

This skill is for deriving structure, not for silently producing finished coursework. It should make the chain

principle -> assumptions -> intermediate relation -> target formula

explicit enough that a learner can reproduce it on their own.

Use when

  • The user asks where a standard formula comes from.
  • The user asks to derive a standard formula ("帮我推导 X"); for assessed work, stop at the safe endpoints in step 8.
  • The user can name a target relation, but cannot justify each step.
  • The user needs help choosing between candidate starting principles such as conservation, definitions, or kinematics.
  • The user wants each step of a derivation tied to its physical reason, not only the algebra.

Do not use when

  • The task is mainly about which model/mechanism applies. Use problem-formalization-coach first (which law applies here, and under what conditions), or physics-mechanism-decomposer for an open phenomenon.
  • The user already has a written derivation and wants it checked step by step (algebra, dimensions, signs, whether each law still applies at that step). Use derivation-step-checker: it audits an existing derivation, while this skill builds one from a starting principle.
  • The user wants a full polished assignment solution with no explanation. Refuse the write-up, but you may still teach the method.
  • The target relation depends on specialized facts, coefficients, or constitutive laws that the user has not supplied and you cannot justify.

Required inputs

Ask for or extract these before deriving:

  1. Target relation: the equation, proportionality, or scaling law to recover.
  2. Symbol table: meaning and units of every symbol that will appear.
  3. Regime / assumptions: small angle, nonrelativistic, steady state, ideal gas, negligible drag, etc.
  4. Allowed starting points: definitions, conservation laws, constitutive relations, or geometry facts the user is allowed to use.
  5. User ownership boundary: whether this is study help, a draft to critique, or assessed work where the learner must write the final derivation.

If any of these are missing, pause and ask only for the missing pieces that block a physically honest derivation.

Core workflow

1) Fix the target and the regime

Restate the target formula in words and symbols. Name the regime explicitly.

Output a short contract like:

  • Target: ...
  • Valid when: ...
  • Not valid when: ...

2) Build a symbol table before moving symbols

Create a compact table:

SymbolMeaningUnitsStatus
.........given / standard / assumed

Do not introduce new quantities without labeling them.

3) Choose the starting principle and justify it

Name the first principle before writing equations.

Examples:

  • Conservation of energy is appropriate because ...
  • Momentum balance is appropriate because ...
  • Start from the definition of electric field because ...

If there are multiple plausible starts, compare them briefly and choose the shortest physically clean path.

State the chosen principle's applicability conditions for this problem. ../_shared/law-applicability-table.md lists them for common laws, and its §6 gives the thresholds where non-relativistic or classical forms stop working.

4) Derive in single-responsibility steps

Each line should do one mathematical move and carry two labels:

  • Math action: substitute / expand / integrate / isolate / apply boundary condition / take limit
  • Physics reason: conservation law / constitutive law / geometry / definition / approximation

Preferred format:

  1. Equation
    • Math action:
    • Physics reason:

Avoid multi-line jumps that hide the physical reason.

5) Surface assumptions exactly where they are used

When an assumption matters, attach it to the line where it enters, for example:

  • "Using small-angle approximation, so sin(theta) ≈ theta for |theta| << 1."
  • "Setting nonconservative work to zero because drag is neglected in this model."

Do not dump assumptions only at the top and never mention them again. ../_shared/idealization-catalog.md says what each common idealization switches off and when it fails.

6) Interpret the result, not just the algebra

After reaching the target relation, explain:

  • what each factor means physically;
  • which variables the result is sensitive to;
  • which parameter combinations actually control the behavior;
  • what would change first if a key assumption were relaxed.

7) Run compact checks

Always do at least two of these:

  • Units check: both sides must match.
  • Special-case check: recover a simpler known result.
  • Sign / monotonicity check: confirm the direction of dependence makes sense.
  • Limit check: inspect a small/large parameter regime.
  • Formula-equivalence check: if a canonical expression is known, compare the final symbolic form with scripts/compare_formula.py.

8) Preserve learner ownership

If the task is assessed work, stop at one of these safe endpoints:

  • annotated outline of the derivation;
  • first 1-2 justified steps plus the remaining roadmap;
  • critique of the learner's own attempt.

Do not hand over a ready-to-submit derivation when that would replace the learner's work. This is the shared boundary in ../_shared/physics-evidence-contract.md §4.

Output template

Use this structure unless the user asks for another format:

Derivation goal

  • Target relation:
  • Valid regime:

Symbols and assumptions

  • Symbols:
  • Assumptions:

Why this starting principle

  • Principle chosen:
  • Why it applies here:
  • Why competing starts are worse:

Step-by-step derivation

  1. ...
  2. ...
  3. ...

Physical interpretation

  • ...

Quick checks

  • Units:
  • Special case or limit:
  • Sign / scaling:

Next step for the learner

  • ...

Failure modes to avoid

  • Treating a memorized formula as a starting principle when the task is to derive that very formula.
  • Using a law without stating its applicability conditions.
  • Smuggling in extra constants, geometry facts, or boundary conditions that were never named.
  • Compressing three algebraic steps into one and losing the physical reason.
  • Ending with a symbolically correct result whose dependence is physically backwards.
  • Solving the whole assignment when the user actually needed a derivation coach.

Deterministic support

scripts/compare_formula.py can help compare a derived symbolic expression with a reference expression. It needs Python 3 with sympy.

python3 scripts/compare_formula.py --derived "2*pi*(L/g)**(1/2)" --reference "2*pi*sqrt(L/g)"
  • Every name is a plain symbol, including E, I, N, S, gamma, beta, and lambda. pi is the only constant; write Euler's number as exp(1). A name used as a function that the script does not know is an input error.
  • Every symbol is assumed positive, so L*sqrt(g/L) matches sqrt(g*L). List symbols that can be negative or zero with --real q,v.
  • Decimals are exact (0.5 is 1/2). Write products with * and powers with ** or ^.
  • Equations are written Eq(lhs, rhs) and match when their lhs - rhs differ by a nonzero constant factor, so swapped sides are fine. A rearranged form such as T**2 = 4*pi**2*L/g against T = 2*pi*sqrt(L/g) does not match; compare the expressions for the target quantity instead.
  • Exit status: 0 equivalent; 1 not equivalent, with a numerical counterexample printed; 2 input error (one line on stderr); 3 undetermined: simplification did not confirm it, but no counterexample was found. --selftest runs the regression cases.

Suggested use:

  • Compare two expressions for the same quantity after moving them into a common symbolic form.
  • Treat the script as a sanity check, not proof that the derivation is pedagogically good.
  • If the script says no, start from the printed counterexample and inspect assumptions, missing factors, sign conventions, and hidden substitutions. If it says undetermined, check by hand before calling the forms different. Exit status 2 means the input could not be read, not that the forms differ.
  • Without code execution, compare by hand and label the check as manual.

Minimal test cases

Case 1: Good fit

User asks: "Why does escape speed scale like sqrt(2GM/R)? Walk me from energy conservation."

Expected behavior:

  • choose conservation of energy;
  • state assumptions (two-body, neglect drag, Newtonian gravity);
  • derive stepwise;
  • explain why larger M increases required speed and larger R decreases it;
  • run units + sign checks.

Case 2: Boundary case

User asks: "Write the full derivation of the pendulum period for my homework so I can paste it."

Expected behavior:

  • refuse to provide a ready-to-submit derivation;
  • offer an annotated outline or critique the user's own draft;
  • explicitly mark where the small-angle approximation enters.

Case 3: Missing inputs

User asks: "Derive the formula for this circuit," but gives no circuit, symbols, or regime.

Expected behavior:

  • ask for the missing diagram/relations/symbol meanings;
  • do not invent topology or component laws.

Completion criteria

This skill is complete for a given turn when it has:

  • identified the target relation and regime;
  • named every nontrivial principle used;
  • attached assumptions where they enter;
  • given at least two post-derivation checks;
  • preserved learner ownership if the context is assessed work.

References

  • ../_shared/law-applicability-table.md — applicability conditions of common laws (step 3); §6 gives the thresholds for relativistic and quantum corrections
  • ../_shared/idealization-catalog.md — what each assumption switches off and when it fails (step 5)
  • ../_shared/physics-evidence-contract.md — status tags for the symbol table, sourcing of constants (§3), and the integrity boundary for assessed work (§4)
  • scripts/compare_formula.py — symbolic equivalence check for step 7

变更记录 / Changelog

版本日期变更类型
0.1.12026-09-26compare_formula.py 修正误判与崩溃:小数指数与等式左右互换判错、符号无正值假设、I/E 被当成虚数单位与自然常数、N/Q/S/gamma/beta/lambda 崩溃;所有名字按普通符号解析,退出码分成 0 等价/1 不等价(给反例)/2 输入错误/3 无法判定,加 --selftest;description 补上「帮我推导」触发语;泛称分流改成实名并点明与 derivation-step-checker 的分工;引用 _shared 参考patch
0.1.02026-09-05初始版本minor

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

当学生说"Common App 活动栏写不下"、"这段活动描述超字数了"、"帮我把这几条压到限制内"时使用。先按官方申请表核对当季字符限额,再逐条检查;一次把所有条目量完并直接给出压缩版,只在需要砍掉实质内容时才用选择题问该保哪部分。每改一版都用工具重新数一遍字符,绝不凭感觉说"这样应该够了"。只压缩,不代写空白。

日本語の概要は準備中です。原文の説明を表示しています。

ChromiteCr/Skills42026年10月16日 更新

当学生说"我参加过一些活动但没整理过"、"帮我把经历录进去"、"我的活动档案是空的"时使用。让学生一口气把记得的活动说出来,直接把这段话拆成结构化的长期事项(角色、组织、起止时间、做了什么、结果、级别),说不清的字段留空标"待补"而不是编,再用一张选择题卡把级别判定与是否重复这类关键项一次问完,然后提案入库。只记录学生真正说出口的内容,级别按事实判定,绝不往高了写。

日本語の概要は準備中です。原文の説明を表示しています。

ChromiteCr/Skills42026年10月16日 更新

当学生问"招生官会怎么看我的档案"、"我的背景还差什么"、"帮我评估一下现在的申请竞争力"时使用。以顶尖大学招生官的视角通读学生的档案、长期活动与已写下的反思,不问任何前置问题直接产出一份指名道姓的坦诚点评:这份材料的亮点、招生官真实的解读方式、明显的短板与空白、以及接下来最值得做的一到两件事。只读不写,不修改学生的任何数据,也不代写任何申请材料。

日本語の概要は準備中です。原文の説明を表示しています。

ChromiteCr/Skills42026年10月16日 更新

当使用者说"帮我填词"、"按这个字数模板写歌词"、"用多Agent对抗式写词"、"这首副歌帮我想几句"时使用,前提是字数骨架和这首歌写什么都已经有了;只有主题、还没定写什么时先用 lyric-concept-builder。拿一份字数骨架和意象系统,派三个 sonnet 子代理按不同路子并行独立起草(场景派 / 口语派 / 意象派),再派一个红队子代理逐句挑毛病,主 Agent 按句裁决拼稿,最后统一辙口与意象。收敛判据卡死:字数用 lyric-doctor 的脚本对模板数、每段同辙、hook 不含陈词、主歌二对主歌一有推进。不抄现有歌词,不替使用者决定这首歌要说什么。

日本語の概要は準備中です。原文の説明を表示しています。

ChromiteCr/Skills42026年10月16日 更新

当想知道一段 AI 回答"哪些能直接用、哪些必须先验证、哪些只能当建议"时使用。按声明类型分四级——低风险草稿材料、观点与策略建议、可查证的事实声明、会改变状态的可执行指令——每级配一句默认处置动作;再按影响半径排序,给出最小的下一步检查。可执行类一律标"不能直接执行;先做代码审阅/沙箱测试/回滚准备",其中破坏性或提权的命令排在最前。教的是一套可复用的复查习惯,不是替使用者把所有内容都核实一遍:本 skill 只分级、排序、定处置,要逐条核实走 ai-output-fact-checker,整段代码要做入库体检走 ai-code-onboarding-checklist。

日本語の概要は準備中です。原文の説明を表示しています。

ChromiteCr/Skills42026年10月16日 更新

当拿到一段 AI 生成的代码,还没决定要不要信、要不要跑、要不要往上继续加东西时使用。先做一遍客观体检:行数与嵌套深度、有没有测试、有没有硬编码密钥或遗留 TODO、依赖是不是真实存在、有没有危险调用(eval/exec、shell=True、递归删除、反序列化、提权、外发网络,按正文给的 grep 模式逐类查);再给风险评级和下一步动作。老实写明它查不了算法正确性——体检通过不等于代码是对的。回答里文字、事实和代码混在一起时先用 ai-answer-triage 分级;只审相对已有代码的一份改动用 ai-diff-review-protocol。

日本語の概要は準備中です。原文の説明を表示しています。

ChromiteCr/Skills42026年10月16日 更新

ChromiteCr のスキルをすべて見る

このスキルの問題を報告する