agentleFS
r-irber-irbe/proof-skills/skills/lean-causal-reasoning/SKILL.md

lean-causal-reasoning

Skill3 starsChanged 24 days agoApache-2.0View on GitHub

USE FOR: Formalize causal DAGs, knowledge graph quality gates, counterfactual reasoning, and provenance bridges in Lean 4. DO NOT USE FOR: causal methodology not in Lean (@lean-causal-reasoning). TRIGGERS: causal DAG, counterfactual proof, provenance bridge, causal Lean.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are 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.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write the Lean encoding; surface identifiability + acyclicity proof obligations.

    line 36
  2. Very specific:

    STOP if the question is causal-methodological (not Lean) — delegate to @lean-causal-reasoning.

    line 40
  3. Very specific:

    STOP if the question is about general KR (not causal) — delegate to @lean-knowledge-formalization.

    line 41
  4. Very specific:

    STOP if Mathlib primitives are missing — escalate to @lean-research.

    line 42

≈ “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

SK-33: Lean Causal Reasoning Formalization


Routing

  • USE FOR: Formalize causal DAGs, knowledge graph quality gates, counterfactual reasoning, and provenance bridges in Lean 4. Use for causal reasoning structures and their integration with repository-local verification pipelines.
  • DO NOT USE FOR: causal methodology not in Lean (use @lean-causal-reasoning); knowledge graph formalisation generally (use @lean-knowledge-formalization); general AI formalisation (use @lean-ai-formalization).
  • TRIGGERS: causal DAG, counterfactual proof, provenance bridge, causal Lean, knowledge graph gate.

Workflow

  1. Identify the causal object: DAG, structural causal model, counterfactual query, provenance bridge, or knowledge-graph gate.
  2. Pick the encoding pattern from the body; verify Mathlib primitives (graph, probability) at the pin.
  3. Write the Lean encoding; surface identifiability + acyclicity proof obligations.
  4. Hand off: to @lean-proof-review for review, to @lean-knowledge-formalization for KR integration, to @lean-zettelkasten.

Recovery & STOP

  • STOP if the question is causal-methodological (not Lean) — delegate to @lean-causal-reasoning.
  • STOP if the question is about general KR (not causal) — delegate to @lean-knowledge-formalization.
  • STOP if Mathlib primitives are missing — escalate to @lean-research.

Handoffs

  • Predecessors: agent:gateway, skill:lean-research.
  • Successors: skill:lean-proof-review, skill:lean-knowledge-formalization, skill:lean-zettelkasten.

Detailed reference

Full encyclopedic reference, decision trees, and lookup tables live in references/lean-causal-reasoning-handbook.md .

See also

  • ../../references/lean-causal-reasoning-handbook.md -- Complete lean-causal-reasoning Handbook
  • ../lean-gateway/SKILL.md -- Top-level skill router

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.