Elisp review

From captainflasmr/ollama-buddy · View interactive version

Elisp review is an AI agent skill from the GitHub repository captainflasmr/ollama-buddy. Review Emacs Lisp (elisp) packages for bugs, style/convention violations, and optimisation opportunities. Use this skill whenever the user asks to review, audit, check, or analyse an elisp or Emacs Lisp package, file, or set of files. Trigger on phrases like "review my package", "check my elisp", "a

How to use this skill

Skill file

Elisp Package Review Skill

You are performing a structured code review of an Emacs Lisp package. Your goal

is to produce a prioritised action plan the author can work through at their

own pace. Do NOT rewrite code unless explicitly asked — flag issues and explain

them clearly.


Phase 1: Orientation

Before diving into issues, briefly orient yourself:

  1. Read every .el file in the package.
  2. Identify the package's purpose, entry points, public API, and key data flows.
  3. Note the Emacs version target and any declared dependencies (Package-Requires).
  4. Check whether lexical-binding is enabled in every file.

State a one-paragraph summary of what the package does before listing any issues.


Phase 2: Review Dimensions

Work through each dimension below in order. Collect ALL findings before

presenting — do not present dimension-by-dimension.

1. Correctness & Bugs

Look for logic errors and runtime hazards:

and to guard.

up; missing unwind-protect.

process state that may have changed.

discarded (wasteful allocation).

after buffer modifications.

teardown/disable path.

disable/unload path.

things already guaranteed by dependencies.

2. Emacs Lisp Style & Conventions

Check against established community conventions:

File header:

present and accurate.

Naming:

Docstrings:

docstring.

Customisation:

Functions:

not deprecated forms).

implicit current buffer.

Control flow:

3. Performance & Optimisation

result.

O(n²); consider reorganising.

compilation.

flag and explain.

make-process.

avoid buffer allocation.

need.

every mode activation.

4. Autoloads & Load-Time Cost

have ;;;###autoload cookies.

at load time.

time are not.

deferred with with-eval-after-load or autoload.

5. Compatibility & Portability

Package-Requires.

6. Error Handling & Robustness

subprocess).

trap them.

allocated.


Phase 3: Output Format

Present findings as a structured action plan using the following format.

Group by severity. Within each group, order by file then by approximate line

number.

## Package Review: <package-name>

### Summary
<One paragraph: what the package does, overall impression, headline numbers>

---

### 🔴 Critical — Fix Before Release
Issues that will cause errors, data loss, or broken behaviour.

#### C1. <Short title>
**File:** `foo.el` **~Line:** 42
**Issue:** <Clear explanation of the problem and why it matters>
**Suggestion:** <What to do — no code rewrite, just direction>

#### C2. ...

---

### 🟠 Important — Strong Recommendation
Style violations, missing conventions, or meaningful inefficiencies.

#### I1. <Short title>
...

---

### 🟡 Minor — Worth Addressing
Small style issues, minor optimisations, nitpicks.

#### M1. <Short title>
...

---

### 💡 Optimisation Opportunities
Performance improvements worth considering, ordered by estimated impact.

#### O1. <Short title>
...

---

### ✅ Strengths
Brief list of things done well — keep this honest and specific.

Phase 4: Closing Note

After the plan, add a short paragraph:

"This is a plan for you to action at your own pace — not all items need to be

addressed. Prioritise 🔴 Critical items first. Feel free to ask me to elaborate

on any specific finding or to help implement a fix."


Review Principles

decides what to do.

levels of rigour — calibrate accordingly.

note it as a question rather than a violation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.