agentleFS
r-irber-irbe/proof-skills/skills/lean-security-formalization/SKILL.md

lean-security-formalization

Skill3 starsChanged 24 days agoApache-2.0View on GitHub

USE FOR: Data security, information security, access control, cryptographic properties, and privacy in Lean 4. DO NOT USE FOR: security policy design not in Lean (@applied-data-information-security). TRIGGERS: security formalization, information flow Lean.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    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. Very specific:

    STOP if the question is about policy design — delegate to @applied-data-information-security.

    line 46
  2. Very specific:

    STOP if Mathlib lacks the cryptographic primitive — escalate to @lean-research.

    line 47
  3. Very specific:

    STOP if the property has not been formally stated — delegate to @lean-specification.

    line 48

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

Lean 4 Security & Privacy Formalization

Guide to formalizing security properties, access control, information flow, and privacy in Lean 4.

Routing

  • USE FOR: Data security, information security, access control, cryptographic properties, and privacy in Lean 4. Use when formalizing information flow policies, access control models, confidentiality/integrity/availability properties, data protection compliance (GDPR/LED), or trust model properties.
  • DO NOT USE FOR: security policy design not in Lean (use @applied-data-information-security); AI safety formalisation (use @lean-ai-formalization); general knowledge formalisation (use @lean-knowledge-formalization).
  • TRIGGERS: security formalization, information flow Lean, access control proof, cryptographic Lean, privacy proof.

Workflow

  1. Identify the security property class: information flow, access control, cryptographic, or privacy.
  2. Pick the matching encoding from the body (non-interference, BLP-Lean, IND-CPA-Lean, k-anonymity-Lean).
  3. Produce the Lean statement + proof skeleton; verify Mathlib primitives at the pin.
  4. Hand off: to @lean-proof-review for review, to @lean-enforcement for CI, to @applied-data-information-security if the model is wrong.

Recovery & STOP

  • STOP if the question is about policy design — delegate to @applied-data-information-security.
  • STOP if Mathlib lacks the cryptographic primitive — escalate to @lean-research.
  • STOP if the property has not been formally stated — delegate to @lean-specification.

Handoffs

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

Detailed reference

Full content for lean-security-formalization lives in references/lean-security-formalization-handbook.md . Load that file when the skill is convened; the SKILL.md only carries the dispatch contract and the parts index.

SectionTopic
Part 1Security Properties
Part 2Access Control Models
Part 3Information Flow
Part 4Privacy and Data Protection
Part 5Cryptographic Properties
Part 6Trust Models
Part 7Research Council Integration

See also

  • ../../references/lean-security-formalization-handbook.md — Full handbook (extracted from this skill)
  • ../lean-proof-review/SKILL.md — Successor
  • ../lean-enforcement/SKILL.md — Successor
  • ../lean-zettelkasten/SKILL.md — Successor

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.