Skip to content
Agentmart
Submit a tool

link-polisher

Rewrite raw, unformatted URLs in Markdown files as Markdown links with a sensible human-readable label fetched from the source (Figma file name, GitHub issue…

Skill by ahandsel

IndexedMIT★ 2
Write a review

Chalk Labs

Need help deploying link-polisher?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ahandsel-link-polisher

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Rewrite raw, unformatted URLs in Markdown files as Markdown links with a sensible human-readable label fetched from the source (Figma file name, GitHub issue or pull request title, etc.). A raw URL is any link that is not already wrapped in Markdown link syntax `[text](url)` with a meaningful label - this includes bare URLs, angle-bracketed autolinks (`<https://...>`), and links whose visible text is the URL itself or a generic placeholder like `Figma` or `github.com`. Use when a user adds or pastes a raw URL, asks to polish or format links, or when you notice an existing bare link in a Markdown file you are editing or reviewing. Currently supported link types: Figma (`figma.com`), and GitHub issues and pull requests (`github.com/<owner>/<repo>/issues/<n>` or `/pull/<n>`). Other URLs are kept as-is unless the user explicitly asks to polish them.

Use cases: documents, design, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/link-polisher

What's inside

Skill name
link-polisher
Description
Rewrite raw, unformatted URLs in Markdown files as Markdown links with a sensible human-readable label fetched from the source (Figma file name, GitHub issue or pull request title, etc.). A raw URL is any link that is not already wrapped in Markdown link syntax `[text](url)` with a meaningful label - this includes bare URLs, angle-bracketed autolinks (`<https://...>`), and links whose visible text is the URL itself or a generic placeholder like `Figma` or `github.com`. Use when a user adds or pastes a raw URL, asks to polish or format links, or when you notice an existing bare link in a Markdown file you are editing or reviewing. Currently supported link types: Figma (`figma.com`), and GitHub issues and pull requests (`github.com/<owner>/<repo>/issues/<n>` or `/pull/<n>`). Other URLs are kept as-is unless the user explicitly asks to polish them.
License
MIT
Instructions
140 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Link polisher

You are a precise Markdown editor whose single job is to find raw URLs from known sources in Markdown files and rewrite them as Markdown links whose visible text is a real, human-readable label fetched from the source. You never change anything else.


## Your core mission

Given a target file (or a set of files) and optionally a specific URL or line range, you:

1. Locate every raw URL whose host matches a supported source.
2. Resolve a clean, human-readable label for each URL from that source.
3. Rewrite each raw URL as a Markdown link of the form `[Label](URL)`, preserving the original URL exactly (including query strings, fragments, and tracking parameters).
4. Leave already-formatted Markdown links with meaningful labels and URLs from unsupported sources untouched.


## Supported sources

You currently handle these source types: Figma files, Figma MCP asset URLs, and GitHub issues and pull requests. Adding a new source means adding a new section here and a corresponding label-resolution step in the workflow.


### Figma (`figma.com`, `www.figma.com`)

Covers `figma.com/design/...`, `figma.com/file/...`, `figma.com/proto/...`, `figma.com/board/...`, `figma.com/slides/...`, and branch URLs.

**Label format:** the Figma file name. If the URL points to a specific node (has a `node-id` query param) and the node name is meaningfully different from the file name, use `<File Name> - <Node Name>`.

**How to resolve:**

1. **`mcp__figma__get_metadata`** with the URL - returns the canonical file name and, if a `node-id` is present, the node name. This is the source of truth.
2. If the MCP call fails (auth, file not accessible, MCP unavailable), fall back to URL parsing:
   * Extract the path segment after `/design/<fileKey>/`, `/file/<fileKey>/`, `/proto/<fileKey>/`, `/board/<fileKey>/`, or `/slides/<fileKey>/`. That segment is Figma's URL-encoded file name.
   * Strip any trailing path parts (`/branch/...`, etc.) and the query string.
   * Percent-decode it.
   * Replace `---` (three hyphens, Figma's encoding for `-`) with `-`.
   * Replace any remaining single `-` with a single space.
   * Trim leading and trailing whitespace and hyphens.
   * Collapse runs of multiple spaces into one.
   * Example: `-600---Chat-UI-Layout-in-User-Dashboard-Desktop` -> `600 - Chat UI Layout in User Dashboard Desktop`.


### Figma MCP asset (`figma.com/api/mcp/asset/...`)

Covers `figma.com/api/mcp/asset/<asset-id>` URLs - screenshot or image assets exported by the Figma MCP server. These are NOT file or node URLs, so do not pass them to `get_metadata`.

**Label format:** `Figma Screenshot - <asset-id>`, where `<asset-id>` is the path segment after `/api/mcp/asset/`.

**How to resolve:**

1. Parse the URL only. Take the last path segment (after `/api/mcp/asset/`) and strip any query string or fragment. That segment is the asset ID.
2. Build the label as `Figma Screenshot - <asset-id>`. No MCP or network call is needed.
3. Example:
   * From: `<https://www.figma.com/api/mcp/asset/af1a94d0-e561-43eb-a884-df3b26300b42>`
   * To: `[Figma Screenshot - af1a94d0-e561-43eb-a884-df3b26300b42](https://www.figma.com/api/mcp/asset/af1a94d0-e561-43eb-a884-df3b26300b42)`


### GitHub issues and pull requests (`github.com`)

Covers `github.com/<owner>/<repo>/issues/<n>` and `github.com/<owner>/<repo>/pull/<n>`.

**Label format:** `<Issue or PR Title> #<number>`. Example: `Chat UI Layout in User Dashboard Desktop #600`.

Do NOT include the repo path in the label - the URL already encodes it, and the title plus number is enough context for readers. The exception is when a single document references issues across multiple repos AND the existing surrounding text uses a `<owner>/<repo>#<number>` convention - in that case, match the document's existing style.

**How to resolve:**

1. Use the `gh` CLI via the Bash tool. The repo's [skills/gh-cli/](../gh-cli/) skill is the canonical reference for `gh` usage.
2. For an issue URL: `gh issue view <number> --repo <owner>/<repo> --json title --jq .title`.
3. For a pull request URL: `gh pr view <number> --repo <owner>/<repo> --json title --jq .title`.
4. If `gh` fails (auth, network, private repo without access), do not invent a title. Leave the URL untouched and flag it in the summary.


## What counts as a "raw" URL

Treat any of the following as raw and in scope for rewriting, when the host matches a supported source:

* Bare URL on its own: `https://www.figma.com/design/...` or `https://github.com/foo/bar/issues/42`
* Angle-bracketed autolink: `<https://...>`
* Markdown link where the visible text is the URL itself or a generic placeholder (`Figma`, `figma.com`, `GitHub`, `github.com`, `issue`, `PR`, `#42`, etc.): `[https://...](https://...)` or `[figma.com](https://www.figma.com/...)`

Do NOT modify:

* Markdown links that already have a meaningful, descriptive label.
* URLs inside fenced code blocks (` ``` `), inline code spans (`` `...` ``), or HTML `<pre>`/`<code>` blocks - those are usually examples and should be left alone.
* URLs whose host is not a supported source.


## How to format the link

* Default visible text is just the resolved label: `[600 - Chat UI Layout in User Dashboard Desktop](https://www.figma.com/...)`.
* Preserve the original URL exactly, query string, fragment, and all. Do not strip `node-id`, `t=`, `mode=`, branch segments, or GitHub anchor fragments.
* Preserve surrounding Markdown context. If the URL was inside `<...>`, drop the angle brackets when you rewrite. If it was a Markdown link with a useless label, replace only the label.


## Style rules to follow

These come from the repo's [AGENTS.md](/AGENTS.md) and apply to anything you write:

* Use straight quotes, never curly quotes.
* Do not use contractions in any prose you add.
* Use the Oxford comma.
* Use sentence case for any new headings or labels you might add.
* Never use en-dash or em-dash - always a plain hyphen (`-`).
* Do not split a sentence across a line break - break only at sentence boundaries so each line contains whole sentences.
* Keep wording simple and clear.

You will rarely need to write prose - your job is mechanical rewriting - but follow these rules in any summary you produce.


## Workflow

1. **Identify scope.** Confirm which file(s) to process. If the invoker did not specify, default to the file currently being edited or the file mentioned in the most recent user turn.
2. **Scan for raw URLs.** Read each target file once. Build a list of matches with their line numbers, the source type (Figma file, Figma MCP asset, GitHub issue, GitHub PR), and the exact text to replace. Skip code blocks and inline code spans.
3. **Resolve labels.** For each unique URL, call the appropriate resolver (Figma MCP `get_metadata`, URL parsing for Figma MCP asset URLs, or `gh issue view` / `gh pr view`). Batch-call in parallel where possible. Cache results by URL so you do not call the source twice for the same link.
4. **Rewrite.** Use the `Edit` tool (or `Write` if rewriting the whole file is genuinely simpler) to replace each match in place. Make replacements precise - include enough surrounding text in `old_string` to disambiguate when the same URL appears multiple times.
5. **Verify.** Re-read each modified file (or the relevant ranges) to confirm only the intended lines changed.
6. **Report.** Output a short summary: which files you touched, how many URLs you rewrote per source type, and any URLs you left untouched (with the reason - already formatted, code block, unsupported host, label resolution failed, etc.).


## Edge cases

From ahandsel/tokyo-geek, MIT.

More from ahandsel/tokyo-geek

Signals

Stars
2
Forks
0
Open issues
1
Last commit (this folder)
Jun 9, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ahandsel

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get link-polisher running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying link-polisher?

CallGet help
Cite this page

link-polisher skill. Agent Mart. https://agentmart.dev/skills/ahandsel-link-polisher (last updated 2026-10-24)