
Url Shortener
- 23 installs
- 84 repo stars
- Updated January 28, 2026
- aidotnet/moyucode
url-shortener is a Claude Code skill that shortens URLs using services like TinyURL and is.gd and can generate a QR code.
About
url-shortener is a Claude Code skill that shortens long URLs using services like TinyURL and is.gd. It can optionally generate a QR code for the shortened link and falls back to a local hash. A developer uses it to create short links from within an agent workflow.
- Shortens URLs via TinyURL and is.gd services
- Optionally generates a QR code for the short link
- Falls back to a local short hash
Url Shortener by the numbers
- 23 all-time installs (skills.sh)
- Ranked #1,264 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
url-shortener capabilities & compatibility
- Capabilities
- url shortening · qr generation
- Runs
- Runs locally
- Pricing
- Free
What url-shortener says it does
Shorten long URLs using various services and optionally generate QR codes for the shortened links.
python scripts/url_shortener.py "https://example.com" --qr --output qr.png
`url`, `shortener`, `link`, `tinyurl`, `qr`
npx skills add https://github.com/aidotnet/moyucode --skill url-shortenerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 23 |
|---|---|
| repo stars | ★ 84 |
| Last updated | January 28, 2026 |
| Repository | aidotnet/moyucode ↗ |
What it does
Shorten a long URL via TinyURL or is.gd and optionally generate a QR code for the short link.
Who is it for?
Creating short links and QR codes from long URLs.
When should I use this skill?
You need to shorten a URL or make a QR code for a link.
What you get
Returns a shortened URL and optionally a QR code image.
- shortened URL
- QR code image
Files
URL Shortener Tool
Description
Shorten long URLs using various services and optionally generate QR codes for the shortened links.
Trigger
/shortencommand- User needs to shorten URLs
- User wants short links
Usage
# Shorten URL
python scripts/url_shortener.py "https://example.com/very/long/path"
# Shorten with specific service
python scripts/url_shortener.py "https://example.com" --service tinyurl
# Generate QR code for shortened URL
python scripts/url_shortener.py "https://example.com" --qr --output qr.pngTags
url, shortener, link, tinyurl, qr
Compatibility
- Codex: ✅
- Claude Code: ✅
#!/usr/bin/env python3
"""
URL Shortener Tool
Based on: https://github.com/ellisonleao/pyshorteners
Usage:
python url_shortener.py "https://example.com/long/path"
"""
import argparse
import hashlib
import sys
import urllib.request
import urllib.parse
def shorten_tinyurl(url):
"""Shorten URL using TinyURL."""
api_url = f"http://tinyurl.com/api-create.php?url={urllib.parse.quote(url)}"
try:
with urllib.request.urlopen(api_url, timeout=10) as response:
return response.read().decode('utf-8')
except Exception as e:
return None
def shorten_isgd(url):
"""Shorten URL using is.gd."""
api_url = f"https://is.gd/create.php?format=simple&url={urllib.parse.quote(url)}"
try:
with urllib.request.urlopen(api_url, timeout=10) as response:
return response.read().decode('utf-8')
except Exception as e:
return None
def generate_local_short(url):
"""Generate a local short hash."""
hash_obj = hashlib.md5(url.encode())
return f"local:{hash_obj.hexdigest()[:8]}"
SERVICES = {
'tinyurl': shorten_tinyurl,
'isgd': shorten_isgd,
'local': generate_local_short
}
def main():
parser = argparse.ArgumentParser(description="Shorten URLs")
parser.add_argument('url', help='URL to shorten')
parser.add_argument('--service', '-s', default='tinyurl',
choices=list(SERVICES.keys()))
parser.add_argument('--qr', action='store_true', help='Generate QR code')
parser.add_argument('--output', '-o', help='QR code output file')
args = parser.parse_args()
# Validate URL
if not args.url.startswith(('http://', 'https://')):
args.url = 'https://' + args.url
# Shorten
shortener = SERVICES.get(args.service)
short_url = shortener(args.url)
if not short_url:
print(f"Error: Failed to shorten URL", file=sys.stderr)
sys.exit(1)
print(f"Original: {args.url}")
print(f"Shortened: {short_url}")
if args.qr:
try:
import qrcode
qr = qrcode.make(short_url)
output = args.output or 'qr_code.png'
qr.save(output)
print(f"QR Code: {output}")
except ImportError:
print("Note: Install qrcode for QR generation: pip install qrcode")
if __name__ == "__main__":
main()
Related skills
FAQ
Which shortening services does it use?
TinyURL and is.gd, with a local hash fallback.
Can it make QR codes?
Yes, with the --qr flag it can generate a QR code for the short link.