Using Xpolink with Claude Code

Install the Xpolink skill file and manage branded short links using slash commands. Works with the Claude Code CLI, desktop app, and web app.

Prerequisites

  • A Xpolink account with an API key (generate one from your dashboard under Settings → API Keys)
  • Claude Code installed (CLI, desktop, or web)

Quick Setup

Two steps to get started:

  1. Download the skill file and move it into your ~/.claude/skills/ folder (or your project's .claude/skills/ folder)
  2. The first time you run /xpolink, it will ask for your API key and save it automatically

Terminal Setup (Alternative)

If you prefer the terminal, you can download and install the skill with these commands:

1. Download the skill file

curl -o xpolink-skill.md https://xpolink.app/xpolink-skill.md

2. Place the skill file

For global access across all projects:

mkdir -p ~/.claude/skills && mv xpolink-skill.md ~/.claude/skills/

For a single project, place it in the project's .claude/skills/ directory instead.

3. Set your API key (optional)

The skill will prompt for your key automatically, but you can also set it in advance:

echo 'export XPOLINK_API_KEY="xpo_your_key_here"' >> ~/.zshenv
source ~/.zshenv

Usage

Run /xpolink in any Claude Code session to activate the skill. Claude will detect URLs in your context and offer to shorten them, or you can ask directly:

/xpolink create a short link for https://example.com/my-long-url
/xpolink list my links
/xpolink show stats for link abc123

Available operations

  • Create, list, update, and delete short links
  • View click analytics and export click data (Business plan)
  • List and export captured emails (Business plan)
  • Add, verify, and delete custom domains
  • Bulk import links from JSON (Pro/Business)
  • Manage API keys

Example Workflow

A typical session might look like this:

> /xpolink shorten https://docs.example.com/getting-started --slug docs

Created: https://xpo.link/docs -> https://docs.example.com/getting-started

> /xpolink stats for that link

Total clicks: 47 | Top country: US (31) | Retention: 90 days

See the API documentation and CLI documentation for the full reference. Questions? Contact us.