agentleFS
JiamingShi-JsPhysJiamingShi-JsPhys/chelate-shell/skills/formula-validator/SKILL.md

formula-validator

Skill10 starsChanged 6 days agoMITView on GitHub

Deterministic formula checker for physics and maths. You extract the equation and declare the units; the tool runs five CAS layers plus a pint unit cross-check and returns a strict pass / fail / unknown verdict. Fires on any formula whose correctness matters.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this exact form — do not read the source tree:

    line 27
  2. Very specific:

    Only validate/check run the pint layer.

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

formula-validator

Checks a formula with five independent layers (parse, dimension, limit, numeric, symbolic) plus a pint unit cross-check, and returns one strict verdict. You extract and interpret; the tool computes.

  • Stage: gates · Sandbox: no · Dependencies: sympy, numpy, pint

Quick Execution

Run this exact form — do not read the source tree:

python run.py --root <WS> --action validate -- --expr "F = m*a" --units F=N --units m=kg --units a=m/s**2
  • Everything after -- goes to the legacy CLI unchanged.
  • --units sym=unit may be repeated; leave a symbol undeclared rather than guessing its unit.
  • The verdict is written to <WS>/process/gates/formula-validator_<ts>.json and a Markdown report to <WS>/process/reports/.

When to use

  • A formula, identity or derived result appears and its correctness matters.
  • A multi-step derivation must be checked, or a wrong result localised.
  • A matrix must be confirmed Hermitian, unitary or otherwise structured.
  • A dimensional or limiting-case check is requested.

When NOT to use

  • Purely numeric evaluation with no symbolic claim.
  • Prose or literature work with no formula.
  • Curve fitting or statistics on measured data.
  • A formula the user only wants typeset.

Actions

--actionDoesExtra arguments
validateD1–D5 layers + pint cross-check--expr "..." [--units s=u ...]
checkAlias of validatesame as validate
deriveCheck a multi-step derivation--expr "..."
matrixMatrix property check--expr "..."
unitspint unit check only--expr "..." --units s=u

Hard constraints

  • Never compute the algebra yourself.
  • Never report a verdict the tool did not produce. unknown is a valid outcome and must never be reinterpreted as a pass.
  • Never guess a unit silently — an undeclared symbol is a legitimate state.

Outputs

  • <WS>/process/gates/formula-validator_<ts>.json — the merged gate result.
  • <WS>/process/reports/ — the Markdown report with the failing layer named.

Failure handling

  • Exit 3 (parse error) — retry in SymPy syntax, then quote the message.
  • Exit 2 (unknown) — report it as unknown and name what was not checked.
  • Exit 4 — report the message verbatim; never fall back to guessing.
  • D2 disagrees while D4 agrees → verdict conflict; almost always a unit error.

Limitations

  • Only validate/check run the pint layer; derive/matrix are D1–D5 only.
  • Pint cannot unit-check a decision; the report is a deterministic verdict.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.