mcpField
H
highlight

highlight

github.com/xenodiumProductivity14787 installsUpdated 14w ago
Repository

About highlight

An Emacs skill for highlighting relevant line ranges in files using temporary read-only overlays. Pressing q exits the mode and removes the highlights from that buffer.

Key features

  1. 01Highlight line ranges in files
  2. 02Handle multiple files and regions
  3. 03Use a temporary read-only mode
  4. 04Remove highlights by pressing q

Use cases

  1. 01Emphasize code discussed in the latest interaction
  2. 02Mark several relevant passages across files
  3. 03Review selected sections without editing

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/xenodium/emacs-skills --skill highlight

After installing, type/highlightin Claude Code to confirm it loaded.

Bundled filesagent-skill-highlight.el

Details

From the project README

Highlight regions in Emacs

Highlight relevant regions in one or more files in Emacs using emacsclient --eval. Files are opened in a temporary read-only minor mode with highlighted overlays. The user presses q to exit the mode and remove all highlights in that buffer.

Determine the relevant files and line ranges from the most recent interaction context.

How to highlight

First, determine the path to agent-skill-highlight.el. It lives alongside this skill file at skills/highlight/agent-skill-highlight.el in the emacs-skills plugin directory.

emacsclient --eval '
(progn
  (load "/path/to/skills/highlight/agent-skill-highlight.el" nil t)
  (agent-skill-highlight
    :files (quote (("/path/to/file1.el"
                    :regions ((:start 90 :lines 18)
                              (:start 114 :lines 49)))
                   ("/path/to/file2.el"
                    :regions ((:start 94 :lines 18)))))))'
  • :start is the 1-indexed line number.
  • :lines is the number of lines to highlight from that start line.
  • Add as many files and regions as needed.

Rules

  • Use absolute paths for files.
  • Locate agent-skill-highlight.el relative to this skill file's directory.
  • If no relevant files or regions exist in the recent interaction, inform the user.
  • Run the emacsclient --eval command via the Bash tool.

Comments

Markdown supported