360 Secure SkillHub
360 安全技能中心

Url Shorten

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

xejrax
xejrax
热度 95.53
最近更新 2026-05-11 15:53:20
分类:效率依赖:代码执行 / 第三方 API应用场景:API 集成 / 自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add 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.