sorry-filler-deep

sorry-filler-deep is an agent for Claude Code from cameronfreer/lean4-skills. It costs 34 tokens per session (2,010 once invoked), scanned A, original, MIT.

A helper for resolving difficult unfinished Lean 4 proofs, including cases that may require changes across files. A “sorry” is a placeholder meaning that a proof is not yet completed.

In plain words
What is it for?
Use it for stubborn unfinished proofs, especially when arguments, helper lemmas, or type-class structure need refactoring.
Why use it?
It provides a deeper repair path when simpler proof attempts fail. It examines the surrounding code and dependencies before proposing structural changes.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions subagents.

Part of the lean4 plugin — 1 skill, 12 commands, 4 agents, 3 hooks shipped together

Good fit Use it for stubborn unfinished proofs, especially when arguments, helper lemmas, or type-class structure need refactoring.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/cameronfreer/lean4-skills/sorry-filler-deep
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/cameronfreer/lean4-skills

Made for: Claude Code.

Or install lean4, the plugin that ships this one along with the rest of its 1 skill, 12 commands, 4 agents, 3 hooks.

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 sorry-filler-deep

README.md
[![agentmods](https://agentmods.dev/badge/agents/cameronfreer/lean4-skills/sorry-filler-deep/github.svg)](https://agentmods.dev/agents/cameronfreer/lean4-skills/sorry-filler-deep)
Your own site
<a href="https://agentmods.dev/agents/cameronfreer/lean4-skills/sorry-filler-deep"><img src="https://agentmods.dev/badge/agents/cameronfreer/lean4-skills/sorry-filler-deep/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 sorry-filler-deep

Your own site · 80×15
<a href="https://agentmods.dev/agents/cameronfreer/lean4-skills/sorry-filler-deep"><img src="https://agentmods.dev/badge/agents/cameronfreer/lean4-skills/sorry-filler-deep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,010 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.00034 $0.02010
Opus 5 $0.00017 $0.01005
Sonnet 5 $0.00007 $0.00402
Haiku 4.5 $0.00003 $0.00201

Measured 3d ago against content hash a50243af1760, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

sorry-filler-deep 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 3d 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.

plugins/lean4/agents/sorry-filler-deep.md · 131 lines

How it starts

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

Inputs

Consume the run-contract/v1 dispatch record (record == "dispatch"): read target/scope, the context envelope (pre-collected LSP state — use it as the starting state when MCP is unavailable), and owned_files + file_baseline (fail closed on these — see below). Validate the envelope; a missing/malformed field is a protocol-error handoff, no mutation.

parameters shape for this worker: {fast_pass_error: string, permission_level: string, deep_budget: {scope, max_files, max_lines}} (why the fast pass failed, the refactor permission level, and the deep scope/diff budget).

Actions

  1. Understand why fast pass failed:

    • Start with lean_goal(file, line) and lean_diagnostic_messages(file) before any edits or Bash verification
    • Read surrounding code and dependencies
    • Check if needs: argument reordering, helper lemmas, type class refactoring (statement generalization NOT permitted — header fence)
    • Search with 1-2 LSP tools before trying fallback scripts or file-level compilation

    MCP canary: If both lean_goal and lean_diagnostic_messages are unavailable (tool-not-found, missing from context, or otherwise inaccessible), emit "⚠ Lean MCP tools unavailable in this subagent context" and proceed using script fallback for search and lake env lean / lake build for validation.

    No-MCP hygiene (if canary fails): MCP tools are tool calls, not shell commands — never invoke them via Bash. Do not probe MCP availability via Bash (which, env, ls) — the canary is authoritative. Stop retrying MCP for this run. Use Read/Grep to inspect files (never write scripts or temp files just to view source). Temp .lean files only for real scratch compilation when lean_run_code is unavailable. Start from pre-collected context in the parent prompt.

  2. Outline plan FIRST (~200-500 tokens):

    ## Sorry Filling Plan
    **Target:** [file:line]
    **Why it's hard:** [reasons]
    **Strategy:** [phases]
    **Safety checks:** [compile after each phase]
    

Read the full file on GitHub · 131 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. 3d ago Changed · +1 lines a50243af1760
  2. 6d ago Changed · +2 lines 289972908915
  3. 10d ago First seen · 128 lines · 34 tokens per session scan A 43b3a7dcb91a

Subscribe to this mod's changes

sorry-filler-deep is an agent published in the GitHub repository cameronfreer/lean4-skills (434 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 2,010 once invoked, about $0.0002 per session on Opus 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-08-30.