emacs-config

Guides configuring, optimizing, and refactoring GNU Emacs init files using Doom and Spacemacs patterns.

2|Updated Jan 2, 2026
One-click install
npx skills add https://github.com/ShineBreaker/Guix-configs --skill emacs-config-shinebreaker
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: emacs-config
Source: https://github.com/ShineBreaker/Guix-configs/tree/main/dotfiles/mutable/agents/skills/.config/agents/skills/emacs-config
Command: npx skills add https://github.com/ShineBreaker/Guix-configs --skill emacs-config-shinebreaker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Emacs configurations grow from a small init.el into hundreds of packages with slow startup, tangled keybindings, and disorganized structure. This Skill provides verified patterns distilled from real Doom Emacs and Spacemacs source code to diagnose startup bottlenecks, organize modules, and audit existing configurations. ## Core Features & Use Cases - Startup Optimization: Apply early-init.el techniques, GC tuning, lazy-loading semantics, and Doom's first-input/first-file/first-buffer hook patterns to reduce startup from 5s+ back to near 1s. - Modular Architecture Guidance: Choose between Doom-style modules, Spacemacs layers, or self-built modular configs with decision tables and migration steps for configs exceeding 500 lines. - Audit & Refactoring: Run a 40-item audit checklist and five-dimension review to detect anti-patterns like misused :init blocks, scattered keybindings, and missing early-init.el separation. - Validation Scripts: Byte-compile, reload, and test Elisp through a running Emacs daemon using shell wrappers for emacsclient. - Use Case: Your init.el has grown past 100 packages and startup takes 5 seconds. Use this Skill to locate the bottleneck, apply early-init optimizations, defer package loading, and restructure into modules. ## Quick Start Ask the assistant to audit your Emacs configuration and fix slow startup using the emacs-config skill.

Frequently Asked Questions about emacs-config

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

FAQPage Schema
How do I speed up slow Emacs startup?▼

Move optimizations into early-init.el: raise gc-cons-threshold during startup, disable file-name-handler-alist around loads, and defer packages with use-package :hook or :defer. Pair this with gcmh-mode on a post-startup hook to restore normal GC behavior.

Doom Emacs vs Spacemacs: which should I choose?▼

Choose Doom if you prioritize startup performance and are willing to learn its macro system like package! and map!. Choose Spacemacs if you want a large ready-made layer ecosystem and declarative dotspacemacs configuration. For full control with an existing 500+ line init.el, build your own modular structure instead.

How do I use use-package lazy loading correctly?▼

Use :hook, :mode, :bind, or :commands as triggers so packages load only when needed. Never call package functions inside :init since the package is not loaded yet; move those calls to :config which runs after require.

Why is my Emacs GUI not finding ripgrep or LSP servers?▼

GUI Emacs on macOS, WSL, or Flatpak does not inherit your shell PATH. Doom solves this with a generated env file loaded at startup instead of exec-path-from-shell, avoiding spawning a shell process on every launch.

How do I organize Emacs keybindings with which-key?▼

Centralize bindings in one macro such as Doom's map! or general.el's general-def, group them under described prefix maps, and enable which-key on first input rather than at startup. Replace raw SPC display with <leader> labels for readability.

How do I verify Elisp code without counting parentheses?▼

Use check-parens for balance checking and byte-compile the file to surface errors. The included scripts wrap emacsclient to byte-compile, reload files into a running daemon, and run ERT tests with exit codes.