| name | shortlink-qr |
| description | Create joel.dev shortlinks and QR assets. Use when Joel asks for a QR code, stage/demo shortlink, joel.dev redirect, link label that looks good in phone camera UI, or a copyable QR asset. |
| disable-model-invocation | true |
shortlink-qr
Use when Joel asks for a QR code, stage/demo shortlink, joel.dev redirect, link label that looks good in phone camera UI, or a copyable QR asset.
Default workflow
Prefer the Pi tool when available:
shortlink_qr({
slug: "cascadia-example",
url: "https://example.com/source",
title: "Example source",
push: true,
background: "transparent"
})
The tool should:
- Add/update
/<slug> <target-url> in /Users/joel/Code/joelhooks/joel-dev-link-shortener/_redirects.
- Generate native HiDPI QR assets from vector source, not by upscaling a tiny PNG.
- Default to a 1500×1500 PNG plus matching SVG in
resources/qr/.
- Copy the PNG to the macOS clipboard unless
clipboard: false.
- With
push: true, commit the shortener change as shitratgit[bot], then fetch/reset the shortener checkout to origin/master.
- Add/update
.brain/resources/shortlinks.svx as the local project Brain resource list.
- Return the shortlink, target URL, QR paths, commit URL, Brain file path, and local Brain URL when available through portless/pi-notes.
Background variants
Use background intentionally:
transparent — default for slides and design tools.
white — black QR on white background when transparency renders poorly.
black — white QR on black background for dark slides.
Example:
shortlink_qr({
slug: "cascadia-dark-demo",
url: "https://example.com",
push: true,
background: "black"
})
Why shortlinks
Phone camera UIs usually show the encoded URL/domain, not a custom QR label. Encode a friendly https://joel.dev/<slug> URL so the scanner display is readable.
Brain resource rule
Every generated shortlink belongs in the local project Brain as a resource list entry at:
.brain/resources/shortlinks.svx
This gives Joel a local pi-notes/portless review page for easy copy/paste of:
- short URL
- target URL
- PNG path
- SVG path
- background style
When a local Document Host is running, include the clickable Brain URL in the final answer. The extension tries portless get pi-notes and maps the note to:
<pi-notes-url>/notes/resources/shortlinks
Fallbacks
If Netlify deploy is stale or shortlink routing is suspect, generate a direct raw-URL QR for stage safety and say so. Do not silently hand Joel a QR that depends on an unverified redirect.
If ShitRat cannot access the shortener repo, do not push with Joel's identity. Return the local file changes and ask for the missing ShitRat/auth step.