agentsclimarketplace

Dub

Skill mdonmez/skills/dub

A curated list of skills designed to enhance AI Agents' capabilities across a range of instructions.

Install
npx -y skills add mdonmez/skills --skill dub

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Dub.co CLI for shortening links, managing domains, and searching links via the Dub.co API.

SKILL.md

7.3 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it

Dub CLI (dub)

The dub CLI is a tool for interacting with the Dub.co link shortening and attribution platform. It lets you shorten URLs, manage links, configure custom domains, and authenticate with your Dub workspace — all from the terminal.

Package name: dub-cli (npm), binary name: dub Source repo: dubinc/dub (monorepo, package at packages/cli)

Installation

npm i -g dub-cli@latest
yarn global add dub-cli@latest
pnpm i -g dub-cli@latest

Global Options

OptionAliasDescription
--version-vDisplay version number
--help-hDisplay help for command

Commands

dub login

Authenticate the CLI with your Dub.co account via OAuth2. Opens a browser window for authentication.

dub login

How it works:

  • Opens a local callback server on http://localhost:4587/callback
  • Uses the @badgateway/oauth2-client library
  • Requests scopes: links.read, links.write, domains.read
  • Stores tokens (access, refresh, expiry) in Configstore (typically ~/.config/configstore/dub-cli.json)

Scopes requested:

  • links.read — read links in workspace
  • links.write — create/update/delete links
  • domains.read — read workspace domains

Token refresh happens automatically when config is read and the token has expired.

dub config

View your configured credentials and workspace configuration as colorized JSON.

dub config

Config store: Uses Configstore with the key dub-cli. The stored config includes:

  • access_token — OAuth2 access token
  • refresh_token — OAuth2 refresh token
  • expires_at — token expiry timestamp (ms)
  • domain — selected workspace domain

Config file location: ~/.config/configstore/dub-cli.json

dub domains

Configure your workspace domain for link shortening. Presents an interactive prompt listing all available domains from your Dub workspace.

dub domains

Behind the scenes:

  • Fetches domain slugs via the Dub SDK (dub.domains.list())
  • Lets you select one from an interactive prompt
  • Saves the selected domain slug to config via setConfig({ domain: slug })

dub shorten

Create a short link. If called without arguments, enters interactive prompt mode.

dub shorten [url] [key]

Arguments:

ArgumentDescription
urlDestination URL to shorten
keyShort key/slug for the link (default: auto-generated nanoid)

If no URL provided (interactive mode):

  1. Prompts "Enter your Destination URL:"
  2. Prompts "Enter your Short link:" (prefilled with auto-generated nanoid)

Uses the Dub SDK's dub.links.create() with the configured domain.

dub links

Search for links in your Dub workspace and display results in a table.

dub links [options]

Options:

OptionAliasDescriptionDefault
--search [search]-sSearch term to filter links
--limit [limit]-lNumber of links to fetch10

Output columns: Short Link, Destination URL, Clicks, Created At

Uses the Dub SDK's dub.links.list() with search and pageSize params.

dub help

Display help for the CLI or a specific command.

dub help [command]

Environment Variables

VariableDescriptionDefault
DUB_API_URLBase API URLhttps://api.dub.co
DUB_OAUTH_URLOAuth URLhttps://app.dub.co

Architecture

  • CLI framework: commander (v11)
  • OAuth2 client: @badgateway/oauth2-client
  • SDK: dub (Dub.co TypeScript SDK, wraps the Dub REST API)
  • Config storage: configstore (JSON file in ~/.config/configstore/dub-cli.json)
  • Spinners: ora
  • Interactive prompts: prompts
  • Browser opening: open
  • Output: chalk (colors), json-colorizer (config JSON), console.table (links)

Quick Reference

TaskCommand
Install the CLInpm i -g dub-cli@latest
Check versiondub --version
Authenticatedub login
View current configdub config
Select workspace domaindub domains
Shorten a URL (interactive)dub shorten
Shorten a URL with custom keydub shorten <url> <key>
List links (10 most recent)dub links
Search links by termdub links -s <term>
List more linksdub links -l 50
Get helpdub help
Get help for a commanddub help shorten

Development

To work on the CLI locally from the dubinc/dub monorepo:

git clone https://github.com/dubinc/dub.git
cd dub/packages/cli
pnpm install
pnpm build
npm link   # makes `dub` available globally

Or run directly without global install:

pnpm start <command>
pnpm start help
pnpm start links

Key Files in Monorepo

FilePurpose
packages/cli/src/index.tsEntry point, commander setup
packages/cli/src/commands/shorten.tsdub shorten implementation
packages/cli/src/commands/login.tsdub login implementation
packages/cli/src/commands/config.tsdub config implementation
packages/cli/src/commands/domains.tsdub domains implementation
packages/cli/src/commands/links.tsdub links implementation
packages/cli/src/utils/config.tsConfig store get/set
packages/cli/src/api/links.tsSDK wrapper for link creation
packages/cli/src/api/domains.tsSDK wrapper for domain fetch
packages/cli/src/utils/oauth.tsOAuth2 client setup
packages/cli/src/utils/handle-error.tsError handler utility
packages/cli/src/utils/logger.tsLogger utility
packages/cli/src/utils/get-nanoid.tsNanoid key generator
packages/cli/src/utils/get-package-info.tsPackage version reader
packages/cli/package.jsonDependencies & build config

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.