Emacs Config

Validate Emacs init-*.el modules for syntax and use-package conventions.

Updated Feb 24, 2013
One-click install
npx skills add https://github.com/ysano/dotfiles --skill emacs-config
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Emacs Config
Source: https://github.com/ysano/dotfiles/tree/main/.claude/skills/emacs-config
Command: npx skills add https://github.com/ysano/dotfiles --skill emacs-config

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps developers who manage a complex Emacs configuration in their dotfiles by automatically validating structure, syntax, and conventions to prevent startup errors and drift.

Core Features & Use Cases

  • Module validation: checks all init-*.el modules for correct (provide) endings, balanced parentheses, and consistent use-package declarations.
  • Cross-platform safeguards: analyzes OS-specific guards in init-platform.el and related files to ensure reliable behavior on macOS, Linux/WSL, and Windows.
  • Keybinding integrity: detects conflicting keybindings across modules to minimize startup confusion and override risks.
  • Quick-start workflow: run the included scripts to validate modules, detect issues, and provide actionable fixes for Emacs configuration.

Quick Start

Run: .claude/skills/emacs-config/scripts/validate.sh Optionally target a specific module: .claude/skills/emacs-config/scripts/validate.sh init-ai

Frequently Asked Questions about Emacs Config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate my Emacs configuration to prevent startup errors?

You can validate your Emacs configuration by running the included validate.sh script, which checks init-*.el modules for balanced parentheses, correct provide endings, and consistent use-package declarations to prevent startup failures.

What causes Emacs init file errors and how can I check for them automatically?

Emacs init file errors are often caused by unbalanced parentheses, missing provide forms, or conflicting keybindings. You can check for them automatically by running the validation script across your init-*.el modules to detect these structural issues.

Can I check for conflicting keybindings across multiple Emacs modules?

Yes, you can check for conflicting keybindings across multiple Emacs modules. The validation process analyzes all init-*.el files to detect override risks and minimize startup confusion caused by duplicate key assignments.

Does this Emacs config validation work with cross-platform guards for macOS, Linux, and Windows?

Yes, the Emacs config validation works with cross-platform guards. It analyzes OS-specific guards in init-platform.el to ensure reliable behavior and consistent startup across macOS, Linux/WSL, and Windows environments.

How do I validate a specific Emacs module like init-ai?

You can validate a specific Emacs module by passing the module name as an argument to the validation script, such as running validate.sh init-ai. This targets the individual file for structural and syntax checks.

What are the limitations of using shell scripts for Emacs dotfiles validation?

Using shell scripts for Emacs dotfiles validation limits checks to structural rules like balanced parentheses, provide forms, and keybinding conflicts. It does not execute the elisp code, so it cannot catch runtime errors or dynamic loading failures.