# Markdown Link Formatter

> Rewrites inline links into reference-style links when the user asks to clean up long markdown docs.

- Skill: `lichamnesia/markdown-link-formatter` (Agent Skill)
- Install (CLI): `npx skillmds@latest add lichamnesia/markdown-link-formatter`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lichamnesia/markdown-link-formatter/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: lichamnesia (https://skillmd.com/u/lichamnesia)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/lichamnesia/markdown-link-formatter

---


# Markdown Link Formatter

When the user asks to convert their markdown to use reference-style links:

1. Read the target file.
2. Collect every inline `[text](url)` occurrence.
3. Rewrite the body to `[text][n]` and append a reference block at the bottom.
4. Preserve ordering of first appearance.

Notes:
- Do not modify code fences or HTML blocks.
- Leave already-referenced links alone.

