A long URL in a commit message or a README is a small but real quality problem. It wraps, it truncates, it pushes the actual commit message off the line, and it looks unfinished. A short, stable link does the job better.
Here is how to keep your repo's links clean without adding a chore to your workflow.
Why short links belong in code
- They do not wrap. A long deploy URL breaks markdown rendering and git commit display. A
kool.ink/xyzlink fits on one line. - They are permanent. A commit message is a record. If you shorten a link, it should still work years later, not expire after a month.
- They are readable.
kool.ink/xyztells a reader nothing about the path, which is fine, because the point of a commit message is the message — not a wall of URL. - You can track them. When you link a deployed artifact or an image in a README, a trackable short link tells you whether anyone is actually seeing it.
Shorten from your terminal
The fastest way to shorten a URL without leaving your shell is the KooLink CLI:
npx @koolink/koolink https://example.com/very/long/path
# → https://kool.ink/xyz
Pipe the long URL in:
echo "https://example.com/long/path" | npx @koolink/koolink
# → https://kool.ink/xyz
You can then paste the output straight into a commit message or a README line. No account, no API key, free and unlimited.
Shorten with an AI agent
If you work in Claude Code, Cursor, Windsurf, or any MCP client, add the KooLink MCP server and the agent shortens the URL itself:
https://mcp.kool.ink
Then just ask: "shorten this for the commit message." The agent does it and you never leave the editor.
The rules I use
- Shorten anything a human will read but not click in a browser. A deploy URL, an artifact link, an image URL in a README.
- Keep the message primary. The commit message explains why. The URL just needs to be findable. A short link keeps that balance.
- Never shorten links that must be inspectable. If a reviewer needs to see the full URL to audit it, leave it long. Short links are for sharing and tidiness, not for obscuring an origin.
- Use a permanent shortener. A link that expires breaks every commit message that references it. KooLink links do not expire.
Wrap up
Long URLs are an easy win to clean up. Shorten them from your terminal with npx @koolink/koolink, or let your AI agent do it via https://mcp.kool.ink. Either way you get clean, permanent, trackable links in your repo.