Index of every page on this site: llms.txt
All skills
xenodium avatar

/highlight

@a158238
by xenodiumxenodium/emacs-skills151 stars
19
Run it yourself

This skill should be used when the user invokes "/highlight" to highlight relevant regions in one or more files in Emacs via emacsclient.

Use this Skill: https://skilld.dev/gh/xenodium/emacs-skills/highlight

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈37 tokens for metadata: the name and description. ≈339 when used: this file.

How this Skill uses context

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

This Skill turns off automatic use in Claude Code. Its description stays out of the automatic Skill list by default.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill facilitates code highlighting in Emacs by executing Lisp commands via emacsclient. It is safe for its intended purpose but contains a potential vulnerability to indirect prompt injection if the agent processes maliciously crafted file paths or data from the user context without proper sanitization.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer9mo

    1/2 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at a158238. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 9 months ago
tools
Bash
disable-model-invocation
true

README badge

README badge for xenodium/emacs-skills/highlight