mcpField
F
file-links

file-links

github.com/xenodiumAgent workflows14782 installsUpdated 14w ago
Repository

About file-links

file-links is an agent skill that formats file references as Markdown links, including GitHub-style line-number fragments. It is for producing outputs that point clearly to files and relevant code locations.

Key features

  1. 01Markdown links for file references
  2. 02GitHub-style line-number fragments
  3. 03Line ranges in link text and URL
  4. 04Project-relative paths

Use cases

  1. 01Citing a file without a line number
  2. 02Pointing to an error location
  3. 03Linking to a function or code block

Install

Copy the command and run it in a terminal.

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

After installing, type/file-linksin Claude Code to confirm it loaded.

Details

From the project README

Format file references as markdown links

When referencing files in your output, always format them as markdown links. Use the GitHub-style #L fragment for line numbers.

Format

With a line number:

[filename.el:42](relative/path/to/filename.el#L42)

With a line range:

[filename.el:42-50](relative/path/to/filename.el#L42-L50)

Without a line number:

[filename.el](relative/path/to/filename.el)

Important

  • The link text uses : for line numbers (e.g., filename.el:42).
  • The URL uses #L for line numbers (e.g., filename.el#L42).
  • For ranges, the link text uses - (e.g., filename.el:42-50) and the URL uses -L (e.g., filename.el#L42-L50).
  • The range must appear in both the link text and the URL.

Do NOT do this:

[filename.el#L42-L50](filename.el#L42)

Rules

  • Use paths relative to the project root.
  • Include line numbers when they are relevant (e.g., error locations, function definitions, modified lines).
  • Use line ranges when referring to a block of code.
  • The link text should be the filename (or relative path if needed for clarity) followed by the line number.

Comments

Markdown supported