Automates REST API calls for managing URL shortener links, including geo-routing and metadata configuration.
Install
mkdir -p .claude/skills/sink && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5247" && unzip -o skill.zip -d .claude/skills/sink && rm skill.zipInstalls to .claude/skills/sink
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Sink short link API operations via OpenAPI. Use when managing short links: creating, querying, updating, deleting, listing, importing, or exporting links. Also covers AI-powered slug generation and link analytics.
Triggers: "create short link", "shorten URL", "delete link", "edit link", "list links", "export links", "import links", "link analytics", "AI slug".Key capabilities
- →Create short links with custom slugs
- →Configure geo-specific URL redirection
- →Generate OpenGraph metadata using AI
- →Export analytics data for click tracking
- →Manage link expiration and passwords
How it works
It sends REST requests to the Sink API to persist URL mappings, device-specific rules, and social preview metadata to a Cloudflare KV store.
Inputs & outputs
When to use sink
- →Create a short link with custom slug
- →Configure country-specific geo-routing
- →Generate AI-powered social link descriptions
- →Export link analytics data
About this skill
Sink API
Sink is a link shortener running on Cloudflare. Manage links via REST API.
Authentication
All endpoints require Bearer token authentication:
Authorization: Bearer YOUR_SITE_TOKEN
Token = NUXT_SITE_TOKEN environment variable.
Base URL
https://your-sink-domain
API Reference
Create Link
POST /api/link/create
Content-Type: application/json
{
"url": "https://example.com/long-url",
"slug": "custom-slug",
"comment": "optional note",
"expiration": 1735689599,
"apple": "https://apps.apple.com/app/id123",
"google": "https://play.google.com/store/apps/details?id=com.example",
"geo": {
"US": "https://example.com/us"
},
"title": "Example Title",
"description": "Example social preview description",
"password": "optional-password",
"redirectWithQuery": true
}
Required: url
Optional: slug (auto-generated if omitted), comment, expiration (unix timestamp), apple (Apple device redirect), google (Android redirect), geo (country-specific routing map), password, unsafe, title, description, image, cloaking, redirectWithQuery
If
NUXT_SAFE_BROWSING_DOHis configured andunsafeis not explicitly set, the server auto-detects via DoH and marks unsafe links automatically.
Response (201):
{
"link": {
"id": "abc123",
"url": "https://example.com/long-url",
"slug": "custom-slug",
"createdAt": 1718119809,
"updatedAt": 1718119809
},
"shortLink": "https://your-domain/custom-slug"
}
Errors: 409 (slug exists)
Query Link
GET /api/link/query?slug=custom-slug
Response (200):
{
"id": "abc123",
"url": "https://example.com",
"slug": "custom-slug",
"createdAt": 1718119809,
"updatedAt": 1718119809
}
Errors: 404 (not found)
Edit Link
PUT /api/link/edit
Content-Type: application/json
{
"slug": "existing-slug",
"url": "https://new-url.com",
"comment": "updated note"
}
Required: slug (identifies which link to edit), url
Optional: other fields to update
Response (201): Same as create
Errors: 404 (not found)
Delete Link
POST /api/link/delete
Content-Type: application/json
{
"slug": "slug-to-delete"
}
Response: 200 (empty body)
List Links
GET /api/link/list?limit=20&cursor=abc123
Parameters:
limit: max 1024, default 20cursor: pagination cursor from previous response
Response:
{
"keys": [],
"list_complete": false,
"cursor": "next-cursor"
}
Export Links
GET /api/link/export
Response:
{
"version": "1.0",
"exportedAt": "2024-01-01T00:00:00Z",
"count": 100,
"links": [],
"list_complete": true
}
Import Links
POST /api/link/import
Content-Type: application/json
{
"links": [
{"url": "https://example1.com", "slug": "ex1"},
{"url": "https://example2.com", "slug": "ex2"}
]
}
Response: imported links array
AI Slug Generation
GET /api/link/ai?url=https://example.com/article
The server can use the URL and extracted page content to generate a readable slug.
Response:
{
"slug": "ai-generated-slug"
}
AI OpenGraph Metadata Generation
GET /api/link/og-ai?url=https://example.com/article&locale=en-US
Generates a localized OpenGraph title and description from the URL and extracted page content.
Response:
{
"title": "Example Article",
"description": "A concise social preview description."
}
Verify Token
GET /api/verify
Verify if the site token is valid.
Response (200):
{
"name": "Sink",
"url": "https://sink.cool"
}
Errors: 401 (invalid token)
Link Fields
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Target URL (max 2048) |
slug | string | No | Custom slug (auto-generated) |
comment | string | No | Internal note |
expiration | number | No | Unix timestamp |
apple | string | No | iOS/macOS redirect URL |
google | string | No | Android redirect URL |
geo | object | No | Country-specific routing map, for example { "US": "https://example.com/us" } |
title | string | No | Custom title (max 256) |
description | string | No | Custom description |
image | string | No | Custom image path |
cloaking | boolean | No | Enable link cloaking |
redirectWithQuery | boolean | No | Append query params to destination URL (overrides global NUXT_REDIRECT_WITH_QUERY) |
password | string | No | Password protection for the link |
unsafe | boolean | No | Mark as unsafe (shows warning page before redirect) |
Analytics Endpoints
Counters
GET /api/stats/counters
Metrics
GET /api/stats/metrics
Views
GET /api/stats/views
Heatmap
GET /api/stats/heatmap
Export Access Analytics
GET /api/stats/export?startAt=1717200000&endAt=1719791999&slug=custom-slug
Returns text/csv with slug, url, viewer, views, and referer columns.
OpenAPI Docs
- JSON:
/_docs/openapi.json - Scalar UI:
/_docs/scalar - Swagger UI:
/_docs/swagger
cURL Examples
Create link:
curl -X POST https://your-domain/api/link/create \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com/example"}'
List links:
curl https://your-domain/api/link/list \
-H "Authorization: Bearer YOUR_TOKEN"
Delete link:
curl -X POST https://your-domain/api/link/delete \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"slug": "my-slug"}'
When not to use it
- →High-traffic sites requiring enterprise-grade global CDNs
- →Internal non-public documentation links
Prerequisites
Limitations
- →Slug uniqueness required
- →Depends on availability of Sink API endpoint
How it compares
It integrates link management directly into the workflow with AI-assisted title/metadata generation.
Compared to similar skills
sink side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| sink (this skill) | 1 | 3mo | Review | Beginner |
| telegram-bot-builder | 106 | 6mo | Review | Intermediate |
| mcp-integration | 21 | 8mo | Review | Intermediate |
| n8n-workflow-patterns | 16 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by miantiao-me
View all by miantiao-me →You might also like
telegram-bot-builder
davila7
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.
mcp-integration
anthropics
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.
n8n-workflow-patterns
czlonkowski
Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.
n8n-code-javascript
czlonkowski
Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with $helpers, working with dates using DateTime, troubleshooting Code node errors, or choosing between Code node modes.
n8n-expression-syntax
czlonkowski
Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.
n8n-node-configuration
czlonkowski
Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between get_node_essentials and get_node_info, or learning common configuration patterns by node type.