Using Xpolink with Cursor

Add the Xpolink skill file as a custom rule so Cursor's AI can create and manage branded short links directly from chat or composer.

Prerequisites

  • A Xpolink account with an API key (generate one from your dashboard under Settings → API Keys)
  • Cursor editor installed

Quick Setup

Two steps to get started:

  1. Download the skill file and move it into your project's .cursor/rules/ folder
  2. When you ask Cursor to use Xpolink, it will prompt you for your API key

Terminal Setup (Alternative)

If you prefer the terminal:

curl -o xpolink-skill.md https://xpolink.app/xpolink-skill.md
mkdir -p .cursor/rules
mv xpolink-skill.md .cursor/rules/

Cursor automatically loads rules files from this directory and uses them as context in chat and composer sessions.

Optionally, set your API key in advance:

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

Usage

Open Cursor chat or composer and ask the AI to manage your links. It will use the API reference from the rules file to make the correct curl calls:

"Create a short link for https://example.com/campaign"
"List my recent links"
"Show stats for link abc123"

Example Workflow

In Cursor composer, you might type:

> Create a branded short link for https://example.com/launch with slug "launch"

Cursor runs:
curl -s -X POST https://xpolink.app/api/v1/links \
  -H "Authorization: Bearer $XPOLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/launch", "shortCode": "launch"}'

Result: https://xpo.link/launch

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