share-insight

share-insight is a command for Claude Code from cameronfreer/lean4-skills. It costs 17 tokens per session (1,087 once invoked), scanned A, original, MIT.

A command that drafts a reusable coding insight as a GitHub issue, where GitHub issues are shared project discussions and records. It can classify the insight as a pattern, antipattern, or mixed result.

In plain words
What is it for?
Use it to review the conversation, recent changes, and Lean files, then propose one to five general lessons for the user to select and share.
Why use it?
It turns lessons from a coding session into a shareable record without publishing anything before the user agrees.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the lean4-contribute plugin — 3 commands shipped together

Good fit Use it to review the conversation, recent changes, and Lean files, then propose one to five general lessons for the user to select and share.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/cameronfreer/lean4-skills/share-insight
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-contribute, the plugin that ships this one along with the rest of its 3 commands.

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 share-insight

README.md
[![agentmods](https://agentmods.dev/badge/commands/cameronfreer/lean4-skills/share-insight.svg)](https://agentmods.dev/commands/cameronfreer/lean4-skills/share-insight)
Your own site
<a href="https://agentmods.dev/commands/cameronfreer/lean4-skills/share-insight"><img src="https://agentmods.dev/badge/commands/cameronfreer/lean4-skills/share-insight.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,087 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.00017 $0.01087
Opus 5 $0.00009 $0.00544
Sonnet 5 $0.00003 $0.00217
Haiku 4.5 $0.00002 $0.00109

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

Security

Grade A, and why

share-insight 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 8d 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-contribute/commands/share-insight.md · 130 lines

How it starts

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

Share Insight

Draft and submit a reusable insight (pattern, antipattern, or mixed) as a GitHub issue on cameronfreer/lean4-skills.

Precondition

Invoke this command only if the user explicitly ran it or explicitly agreed to draft a shareable insight. If invoked without prior opt-in, ask:

That seems reusable beyond this task. Want me to draft a shareable insight?

If the user explicitly ran /lean4-contribute:share-insight, treat that as opt-in. Do not proceed unless the user confirms. Do not mine git diff, infer insight candidates, or ask structured questions until consent is given.

Discovering Candidates

Once the user has opted in (see Precondition above), look at:

  • Current conversation / session context
  • Current git diff (git diff and git diff --cached)
  • Recently touched .lean files

From these, infer 1–5 candidate insights. For each candidate, note:

  • A one-line title (keep titles generic — avoid project-specific names, paths, or identifiers)
  • Classification: pattern (what worked), antipattern (what failed), or mixed (worked in some contexts, failed in others)

Present the candidates as a numbered list and ask the user to pick one (or describe a different insight). Proceed with the selected insight.

Gathering Context

For the chosen insight, collect or infer:

  1. Kind — pattern / antipattern / mixed
  2. Title — Concise, descriptive title
  3. Context — What were you working on when you discovered this?
  4. Symptom / trigger — What behavior or error led to the discovery?
  5. What worked / what failed — The core lesson
  6. Why it matters — Impact on proving, performance, readability, or correctness
  7. Minimal example — Smallest Lean snippet illustrating the insight (strip project-specific details)
  8. When to use / when not to — Applicability boundaries
  9. Confidence — High / medium / low — how sure are you this generalizes?
  10. Privacy / redaction check — Scan for filesystem paths, usernames, API keys, or other sensitive data and redact them. Flag anything you redacted so the user can verify.

Read the full file on GitHub · 130 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. 8d ago First seen · 130 lines · 17 tokens per session scan A 285db1dedb58

Subscribe to this mod's changes

share-insight is a command published in the GitHub repository cameronfreer/lean4-skills (432 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 1,087 once invoked, about $0.0001 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.