openlark: Skill for Claude Code

.agents/skills/openlark-formal-event-inbound/SKILL.md

openlark-formal-event-inbound is a skill for Claude Code, Codex from foxzool/openlark. It costs 79 tokens per session (1,711 once invoked), scanned A, original, Apache-2.0.

A formal verification guide for a Rust HTTP event handler. Formal verification uses a model and checks to test whether required safety rules always hold, including authenticating and decrypting incoming events in the right order.

In plain words
What is it for?
Use it when changing the OpenLark inbound event handler or its cryptographic checks, or when rerunning the TLA+ verification for those changes. TLA+ is a language for describing and checking system behavior.
Why use it?
It helps detect security regressions that ordinary example-based tests may miss, such as dispatching an unauthenticated callback. It gives plain-language rules and tells you when the verification check must be rerun.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is foxzool/openlark's own configuration. It tells Claude Code and Codex how to work on openlark itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything openlark configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./formal/event_inbound/run_tlc.sh.

Reuse

Borrowing it

Nothing to install: this file belongs to foxzool/openlark. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/foxzool/openlark/main/.agents/skills/openlark-formal-event-inbound/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/foxzool/openlark

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openlark-formal-event-inbound

README.md
[![agentmods](https://agentmods.dev/badge/skills/foxzool/openlark/openlark-formal-event-inbound/github.svg)](https://agentmods.dev/skills/foxzool/openlark/openlark-formal-event-inbound)
Your own site
<a href="https://agentmods.dev/skills/foxzool/openlark/openlark-formal-event-inbound"><img src="https://agentmods.dev/badge/skills/foxzool/openlark/openlark-formal-event-inbound/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openlark-formal-event-inbound

Your own site · 80×15
<a href="https://agentmods.dev/skills/foxzool/openlark/openlark-formal-event-inbound"><img src="https://agentmods.dev/badge/skills/foxzool/openlark/openlark-formal-event-inbound.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,711 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00079 $0.01711
Opus 5.5 $0.00032 $0.00684
Sonnet 5.5 $0.00016 $0.00342
Haiku 4.5 $0.00008 $0.00171

Measured 6d ago against content hash 4025fbf48022, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

openlark-formal-event-inbound scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/openlark-formal-event-inbound/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Formal verification: HttpEventInbound handle

Read this cold mid-change. You do not need to know TLA+. Run the script, read the plain-language result, and only open the .tla file when the covered Rust steps changed.

When to use

Use this skill if your change touches any of:

Path Why
crates/openlark-client/src/event_inbound/handler.rs handle, extract_payload, verify_sign, auth_challenge
crates/openlark-client/src/event_inbound/crypto.rs decrypt_event, verify_inbound_signature (call sites / contract)
crates/openlark-client/src/event_inbound/mod.rs exports / wiring of inbound
formal/event_inbound/** the model or runner itself

If none of those change, skip this skill.

Property (plain language)

Promise A — no unauthenticated dispatch: When encrypt_key is non-empty and skip_sign_verify is false, an event (not url_verification) must not reach dispatcher.dispatch_with_response unless the inbound signature is Good. Harm if broken: forged Feishu HTTP callbacks run bot handlers.

Promise B — challenge never dispatches as event: type == url_verification must finish via auth_challenge, never the event dispatcher. Harm if broken: challenge traffic is treated as a business event.

Promise C — verify before decrypt (intended, currently broken): Traffic that still needs a signature check and presents Missing/Bad signature must not call decrypt_event first. Harm if broken: unauthenticated clients force AES decrypt + JSON parse before reject (CPU / oracle cost).

Tool and why

TLA+ / TLC (model checker), not a Rust prover: the risk is the decision table of config × body shape × req type × signature × decrypt outcome. Unit tests cover happy paths; they do not enumerate every combination. There is no production code-level model checker for this pipeline. Crypto (AES/SHA256) is abstracted; TLC explores control-flow orders and input combinations up to the bound.

Pinned tool: tla2tools v1.8.0 (tla2tools.jar from the tlaplus GitHub release). Requires Java 17+ on PATH.

Read the full file on GitHub · 123 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 123 lines · 79 tokens per session scan A 4025fbf48022

Subscribe to this mod's changes

openlark-formal-event-inbound is a skill published in the GitHub repository foxzool/openlark (108 stars, last pushed 3d ago), licensed Apache-2.0. It adds 79 tokens to every session and 1,711 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-23.