Draft and submit bug reports, feature requests, and insights as GitHub issues. Commands may share Lean code snippets with GitHub — review every draft before confirming.

GitHub stars
489

Install

/plugin install lean4-contribute@lean4-skills

Run it inside Claude Code after adding the marketplace with /plugin marketplace add cameronfreer/lean4-skills.

Contents

Discovered from source

Commands 3

Bug Report

Draft and submit a bug report 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 bug report. If invoked without prior opt-in, ask:

This looks like a lean4-skills bug. Want me to draft a bug report?

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

Gathering Context

Collect the following from the user and the current session. Ask for anything you cannot infer:

  1. Summary — One-line description of the bug
  2. Expected behavior — What should happen
  3. Actual behavior — What happens instead
  4. Repro steps — Numbered steps to reproduce
  5. Minimal Lean snippet — Smallest code that triggers the bug (strip project-specific details)
  6. Environment / toolchain — Lean version (lean --version), lake version, OS, plugin version, relevant MCP servers
  7. Diagnostics / build output — Compiler errors, lake build output, or LSP messages (redact paths and usernames)
  8. Possible fix (optional) — If you have a local fix, write a short prose summary of what the fix does (1–3 sentences). Do not include a raw diff by default. If the user explicitly asks to include a patch excerpt, include only the minimal relevant hunk (not the whole diff), strip file paths and surrounding context, and require a separate confirmation:

    This draft includes a code patch. Review it for unrelated code or secrets. Include this patch? (yes / remove it / edit)

  9. Privacy / redaction check — Before showing the draft, scan for filesystem paths, usernames, API keys, or other sensitive data and redact them. Flag anything you redacted so the user can verify.

Drafting the Issue

Compose the issue using this template:

Title: [Bug] <summary>
Labels: bug

## Summary
<summary>

## Expected Behavior
<expected behavior>

## Actual Behavior
<actual behavior>

## Steps to Reproduce
<numbered repro steps>

## Minimal Example
```lean
<minimal Lean snippet>

Environment

  • Lean:
  • Lake:
  • OS:
  • Plugin:
  • MCP:

Diagnostics

<build output / compiler errors>

Possible Fix

<prose summary of fix; minimal patch excerpt only if user confirmed>


Drafted via lean4-contribute


## Showing the Draft

Display the **complete** issue draft to the user — title, labels, and full body.
Ask:

> Here is the bug report I will submit. Review it carefully — it may contain
> code snippets from your project.
>
> By submitting, you agree that this content may be edited, rearranged, or
> incorporated into lean4-skills in any form under its
> [MIT license](https://github.com/cameronfreer/lean4-skills/blob/main/LICENSE).
>
> **Submit this issue?** (yes / edit / cancel)

Do **not** proceed unless the user explicitly confirms.

## Submitting

After confirmation, submit using the first available method:

1. **`gh` CLI** — Try: `gh issue create --repo cameronfreer/lean4-skills --title "<title>" --body "<body>" --label bug`.
   If the label fails (e.g. `bug` doesn't exist on the repo), retry without
   `--label` and note that the label was advisory only.
   If `gh` fails for auth or network reasons, **stop** — do not retry. Fall
   through to the browser or email path immediately.
2. **Browser fallback** — Provide a prefilled GitHub URL:
   `https://github.com/cameronfreer/lean4-skills/issues/new?title=<url-encoded-title>&body=<url-encoded-body>&labels=bug`
   (the `labels=` param is best-effort; GitHub ignores unknown labels silently)
3. **Email fallback** — Draft an email to `lean4skills@gmail.com` with subject
   `[Bug] <summary>` and the full issue body, for the user to send manually.

Report the result (issue URL, fallback URL, or email draft) and confirm
completion.

Feature Request

Draft and submit a feature request 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 feature request. If invoked without prior opt-in, ask:

This looks like a plugin workflow gap. Want me to draft a feature request?

If the user explicitly ran /lean4-contribute:feature-request, treat that as opt-in. Do not proceed unless the user confirms. Do not gather structured questions or build an issue body until consent is given.

Gathering Context

Collect the following from the user and the current session. Ask for anything you cannot infer:

  1. Problem / pain point — What is frustrating, slow, or missing?
  2. Current workaround — How do you handle this today? (or "none")
  3. Desired behavior — What should the plugin do instead?
  4. Why this belongs in the plugin — Why is this a plugin concern rather than a user-side script or external tool?
  5. Acceptance criteria — Concrete conditions that would mark this done
  6. Alternatives considered — Other approaches you thought of and why they fall short
  7. Urgency / frequency — How often do you hit this? Blocking, frequent annoyance, nice-to-have?

Drafting the Issue

Compose the issue using this template:

Title: [Feature] <short description>
Labels: enhancement

## Problem / Pain Point
<problem description>

## Current Workaround
<workaround or "none">

## Desired Behavior
<what the plugin should do>

## Why This Belongs in the Plugin
<justification>

## Acceptance Criteria
- [ ] <criterion 1>
- [ ] <criterion 2>
- ...

## Alternatives Considered
<other approaches and trade-offs>

## Urgency / Frequency
<how often, how blocking>

---
*Drafted via [lean4-contribute](https://github.com/cameronfreer/lean4-skills)*

Showing the Draft

Display the complete issue draft to the user — title, labels, and full body. Ask:

Here is the feature request I will submit. Review it carefully.

By submitting, you agree that this content may be edited, rearranged, or incorporated into lean4-skills in any form under its MIT license.

Submit this issue? (yes / edit / cancel)

Do not proceed unless the user explicitly confirms.

Submitting

After confirmation, submit using the first available method:

  1. gh CLI — Try: gh issue create --repo cameronfreer/lean4-skills --title "<title>" --body "<body>" --label enhancement. If the label fails (e.g. enhancement doesn't exist on the repo), retry without --label and note that the label was advisory only. If gh fails for auth or network reasons, stop — do not retry. Fall through to the browser or email path immediately.
  2. Browser fallback — Provide a prefilled GitHub URL: https://github.com/cameronfreer/lean4-skills/issues/new?title=<url-encoded-title>&body=<url-encoded-body>&labels=enhancement (the labels= param is best-effort; GitHub ignores unknown labels silently)
  3. Email fallback — Draft an email to lean4skills@gmail.com with subject [Feature] <short description> and the full issue body, for the user to send manually.

Report the result (issue URL, fallback URL, or email draft) and confirm completion.

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.

Drafting the Issue

Compose the issue using this template:

Title: [Insight] <title>
Labels: insight

## Kind
<pattern / antipattern / mixed>

## Context
<what you were working on>

## Symptom / Trigger
<behavior or error that led to discovery>

## What Worked / What Failed
<core lesson>

## Why It Matters
<impact>

## Minimal Example
```lean
<minimal Lean snippet>

When to Use / When Not To

Confidence

<high / medium / low>


Drafted via lean4-contribute


## Showing the Draft

Display the **complete** issue draft to the user — title, labels, and full body.
Also list any alternate candidates that were not selected, in case the user
wants to switch. Ask:

> Here is the insight I will submit. Review it carefully — it may contain code
> snippets from your session.
>
> By submitting, you agree that this content may be edited, rearranged, or
> incorporated into lean4-skills in any form under its
> [MIT license](https://github.com/cameronfreer/lean4-skills/blob/main/LICENSE).
>
> **Submit this issue?** (yes / edit / switch to alternate / cancel)

Do **not** proceed unless the user explicitly confirms.

## Submitting

After confirmation, submit using the first available method:

1. **`gh` CLI** — Try: `gh issue create --repo cameronfreer/lean4-skills --title "<title>" --body "<body>" --label insight`.
   If the label fails (e.g. `insight` doesn't exist on the repo), retry without
   `--label` and note that the label was advisory only.
   If `gh` fails for auth or network reasons, **stop** — do not retry. Fall
   through to the browser or email path immediately.
2. **Browser fallback** — Provide a prefilled GitHub URL:
   `https://github.com/cameronfreer/lean4-skills/issues/new?title=<url-encoded-title>&body=<url-encoded-body>&labels=insight`
   (the `labels=` param is best-effort; GitHub ignores unknown labels silently)
3. **Email fallback** — Draft an email to `lean4skills@gmail.com` with subject
   `[Insight] <title>` and the full issue body, for the user to send manually.

Report the result (issue URL, fallback URL, or email draft) and confirm
completion.

Sponsors

Details

Marketplace
cameronfreer/lean4-skills
Source
plugins/lean4-contribute
Category
Community

More from cameronfreer/lean4-skills

All 2