> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drdj.me/llms.txt
> Use this file to discover all available pages before exploring further.

# drdj.me Shortener Skill

> Tiny standalone skill and MCP surface for one-call AI-agent short links.

Use `drdj-shortener` when an agent only needs to create a drdj.me short link,
upload a photo short link, or read owned short-link stats. Use the full
DealDash Agent Bridge only when the task also needs deals, contacts, payments,
LinkShot view checks, templates, tasks, screenshots beyond photo links, memory,
or approvals.

Human landing page: [`https://drdj.me/ai-link-shortener`](https://drdj.me/ai-link-shortener).
The standalone shortener API and returned short links stay on `drdj.me`; the
DealDash app and full Agent Bridge use `https://dealdash.tech`.

## Fast HTTPS Path

```http theme={null}
GET https://drdj.me/api/shortener/v1/health
```

```http theme={null}
POST https://drdj.me/api/shortener/v1/links
Content-Type: application/json
```

```json theme={null}
{
  "url": "https://example.com/campaign",
  "title": "Optional title"
}
```

Return only `shortUrl` and `shortId` unless the user asks for metadata.

## MCP Server

Repo-local config:

* `/plugins/drdj-shortener/.mcp.json`

Server command:

```bash theme={null}
pnpm exec tsx ./plugins/drdj-shortener/scripts/server.ts
```

Tools:

* `shorten_link`
* `upload_photo_link`
* `get_link_stats`
* `store_access_token`

Environment:

* `DRDJ_SHORTENER_BASE_URL`
* `DRDJ_SHORTENER_ACCESS_TOKEN`
* `DRDJ_SHORTENER_CHANNEL`
* `DRDJ_SHORTENER_ACTOR_ID`

## Access Modes

Guest mode is URL-only, rate-limited, temporary, and does not create private
dashboard ownership.

Registered agent mode uses shortener-scoped OAuth and enables custom slugs,
campaigns, tags, descriptions, photo links, private stats, settings reads, and
DealDash dashboard visibility after approval.
Broad DealDash bridge scopes such as `mcp` or `dealdash.read` do not authorize
standalone shortener tools.

Default shortener scopes:

```text theme={null}
shortener.links:create shortener.links:read shortener.stats:read shortener.photos:create shortener.settings:read
```

Public-safe stats are available only for guest/public links. Registered-agent
links require `get_link_stats` or
`GET /api/shortener/v1/links/:shortId/stats` with an approved owner token.

## Agent Prompt

```text theme={null}
Create a drdj.me short link for [paste URL]. Use HTTPS or the drdj-shortener skill. Return only the short link.
```

## Deployment Notes

Production has the shortener database migration applied. For any new
environment, apply `/migrations/extend-shortener-for-ai-agents.sql` before real
`/api/shortener/v1/*` traffic is enabled.

Public discovery is available after deployment at:

* `/.well-known/agent-skills/index.json`
* `/.well-known/agent-skills/drdj-shortener/SKILL.md`
* `/.well-known/mcp/drdj-shortener/server-card.json`
* `/openapi.json`
* `/api/shortener/v1/health`
