360 Secure SkillHub
360 安全技能中心

Url Shorten

接收一个长 URL,用 Bash/curl 请求外部短链服务:默认使用 tinyurl,若设置了 BITLY_TOKEN 环境变量则改用 bitly API,最终返回缩短后的链接文本。不涉及本地文件读写或安装步骤。

分类:效率
xejrax
xejrax
热度 51.87
最近更新 2026-05-11 15:53:20

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add xejrax/url-shorten
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
url-shorten
description
Shorten URLs via tinyurl or bitly API
metadata
{"openclaw":{"emoji":"🔗","requires":{"bins":["curl"]},"install":[]}}

URL Shorten

Shorten URLs via tinyurl or bitly API. Requires BITLY_TOKEN env var for bitly; falls back to tinyurl if not set.

Commands

# Shorten a URL (uses tinyurl by default, bitly if BITLY_TOKEN is set)
url-shorten "https://example.com/very/long/path/to/resource"

Install

No installation needed. curl is always present on the system. Optionally set BITLY_TOKEN environment variable to use the bitly API instead of tinyurl.