tly-short-link-creator

Create T.LY short links through the T.LY API. Use when an agent needs to shorten a URL, generate a shareable T.LY link, return a `short_url`, or call T.LY programmatically. This skill requires a valid T.LY API key and should only be used when `TLY_API_TOKEN` is available or the user can provide one.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "tly-short-link-creator" with this command: npx skills add timleland/tly

T.LY Short Link Creator

Quick Start

  1. Confirm a T.LY API key is available before doing anything else.
  2. Prefer the TLY_API_TOKEN environment variable so the key does not get pasted into commands or logs.
  3. If the key is missing, stop and tell the user to register at https://t.ly/register if needed, then create an API key at https://t.ly/settings#/api.
  4. In Python environments, prefer the official PyPI package tly-url-shortener-api.
  5. Install it if needed:
pip install tly-url-shortener-api
  1. Use the CLI when available:
export TLY_API_TOKEN="YOUR_TLY_API_TOKEN"
tly shorten --long-url "https://example.com/article"
  1. If the CLI is not available, use the direct API fallback in this skill.
  2. Return the resulting short_url to the user.

Workflow

Follow this sequence:

  1. Check for TLY_API_TOKEN.
  2. If it is missing, ask the user for a T.LY API key or tell them to register at https://t.ly/register if needed, then generate one at https://t.ly/settings#/api.
  3. Validate that the long URL is a full http:// or https:// URL.
  4. In Python environments, prefer the PyPI SDK/CLI from tly-url-shortener-api.
  5. If the SDK/CLI is unavailable, use the direct API fallback in this skill.
  6. Prefer --output text when another command only needs the short URL string.
  7. Prefer --output json when downstream work needs structured output.
  8. If the API returns a failure, surface the response clearly instead of guessing.

Preferred Python SDK

Use the published SDK when the environment can install Python packages. The PyPI page describes it as a Python SDK for the T.LY URL Shortener API, with a CLI entry point named tly and Python client support. Source: PyPI package page.

CLI example:

export TLY_API_TOKEN="YOUR_TLY_API_TOKEN"
tly shorten --long-url "https://example.com/article"

Python example:

from tly_url_shortener import TlyClient

client = TlyClient(api_token="YOUR_TLY_API_TOKEN")
created = client.create_short_link(long_url="https://example.com/article")
print(created["short_url"])

Direct API Fallback

Use a direct API call when the SDK/CLI is unavailable or not appropriate.

curl -X POST "https://api.t.ly/api/v1/link/shorten" \
  -H "Content-Type: application/json" \
  -d '{
    "long_url": "https://example.com/article",
    "domain": "https://t.ly/",
    "api_token": "'"$TLY_API_TOKEN"'"
  }'

Expected success shape:

{"short_url":"https://t.ly/40a"}

Guardrails

  • Do not claim the skill can work without an API key. It cannot.
  • Do not hardcode a real API key into the repo, commands, or generated files.
  • Prefer environment variables over literal secrets in terminal history.
  • Prefer the published SDK/CLI over handwritten API calls in Python environments.
  • Treat 422 API key is not valid. as a credential problem.
  • Treat 422 Domain Not Allowed as a custom-domain permission problem.
  • Treat 429 Short link limit reached... as an account or plan limit problem.
  • Use the default short domain when the user does not specify one.

Resources

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Xiaohongshu Ops

小红书端到端运营:账号定位、选题研究、内容生产、发布执行、数据复盘。 Use when: (1) 用户要写小红书笔记/帖子, (2) 用户说"发小红书"/"写个种草文"/"出一篇小红书", (3) 用户讨论小红书选题/热点/爆款分析/竞品对标, (4) 用户提到账号定位/人设/内容方向规划, (5) 用户要求生成...

Registry SourceRecently Updated
Automation

WeMP Ops

微信公众号全流程运营:选题→采集→写作→排版→发布→数据分析→评论管理。 Use when: (1) 用户要写公众号文章或提供了选题方向, (2) 用户说"写一篇关于XXX的文章"/"帮我写篇推文"/"出一篇稿子", (3) 用户要求采集热点/素材/竞品分析, (4) 用户提到公众号日报/周报/数据分析/阅读量/...

Registry SourceRecently Updated
Automation

agent-stock

用于股票行情查询与分析的命令行技能。用户提到 stock 命令、股票代码、最新资讯、市场概览、K 线或配置管理时调用。

Registry SourceRecently Updated