Emacs Lisp package development standards and conventions
View on GitHubhugoduncan/library-skills
emacs-libraries
January 23, 2026
Select agents to install to:
npx add-skill https://github.com/hugoduncan/library-skills/blob/main/plugins/emacs-libraries/skills/package-conventions/SKILL.md -a claude-code --skill package-conventionsInstallation paths:
.claude/skills/package-conventions/# Emacs Package Conventions
Comprehensive guide to Emacs Lisp package development standards, covering naming, structure, metadata, and distribution requirements.
## Overview
Emacs packages follow strict conventions to ensure compatibility, discoverability, and quality. These conventions cover file structure, naming, metadata, documentation, and distribution through package archives like MELPA and GNU ELPA.
## Package Types
### Simple Package
Single `.el` file with header metadata.
```elisp
;;; mypackage.el --- Brief description -*- lexical-binding: t; -*-
;; Copyright (C) 2025 Your Name
;; Author: Your Name <you@example.com>
;; Version: 1.0.0
;; Package-Requires: ((emacs "25.1"))
;; Keywords: convenience, tools
;; URL: https://github.com/user/mypackage
;;; Commentary:
;; Longer description of what the package does.
;;; Code:
(defun mypackage-hello ()
"Say hello."
(interactive)
(message "Hello from mypackage!"))
(provide 'mypackage)
;;; mypackage.el ends here
```
### Multi-File Package
Directory with `-pkg.el` descriptor file.
Structure:
```
mypackage/
├── mypackage.el
├── mypackage-utils.el
├── mypackage-pkg.el
└── README.md
```
`mypackage-pkg.el`:
```elisp
(define-package "mypackage" "1.0.0"
"Brief description"
'((emacs "25.1")
(dash "2.19.1"))
:keywords '("convenience" "tools")
:url "https://github.com/user/mypackage")
```
## File Header Conventions
### Required Headers
**Simple package** (single `.el`):
- `;;; filename.el --- description`
- `;; Author:`
- `;; Version:` or `;; Package-Version:`
- `;;; Commentary:`
- `;;; Code:`
- `(provide 'feature-name)`
- `;;; filename.el ends here`
### Standard Headers
```elisp
;;; mypackage.el --- Brief one-line description -*- lexical-binding: t; -*-
;; Copyright (C) 2025 Author Name
;; Author: Author Name <email@example.com>
;; Maintainer: Maintainer Name <email@example.com>
;; Version: 1.0.0
;; Package-Requires: ((emacs "25.1") (dash "2.19.1"))
;; Keywords: convenience tools
;; U