Elisp dev

From laurynas-biveinis/dotfiles · View interactive version

Elisp dev is an AI agent skill from the GitHub repository laurynas-biveinis/dotfiles. Emacs Lisp (elisp) development guidelines. Apply whenever writing, editing, reviewing, or discussing Emacs Lisp / elisp code or .el files.

How to use this skill

Skill file

Elisp Guidelines

Tooling

Use the elisp-dev MCP server when working with elisp.

Supported versions and compatibility

The oldest supported Emacs version is 27.1. The code must be compatible with

this and all the newer versions.

Operation principles

as needed.

File-level guidelines

code section.

Dependencies

etc.) is allowed as needed.

Symbol-level guidelines

variables from the surrounding lexical scope.

Function-level guidelines

when you remove bindings to leave only one untouched.

and-let*) to replace let for one binding with a conditional (e.g. if)

on the same variable immediately inside it. For the combined bindings, the

previous rule of star form not used for a single binding does not apply.

Note: while-let is only available from Emacs 29.1 onwards and should not

be used when supporting Emacs 27.2.

```elisp

;; Instead of:

(let ((value (get-value)))

(if value

(process value)))

;; Use:

(if-let* ((value (get-value)))

(process value))

```

Literals

elements must be evaluated, or when the resulting list will be destructively

modified (setcar/setcdr/nconc/sort) — quoted literals are

shared constants and must not be mutated. The same applies to [...] vector

literals.

Testing

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.