Agent skill
generate-qr-code-natively
Generate QR codes locally without external APIs using native CLI and runtime libraries in Bash and Node.js.
Install this agent skill to your Project
npx add-skill https://github.com/besoeasy/open-skills/tree/main/skills/generate-qr-code-natively
SKILL.md
Generate QR Code Natively
Create QR codes fully offline on the local machine (no third-party QR API calls).
When to use
- User asks to generate a QR code from text, URL, wallet address, or payload
- Privacy-sensitive workflows where data should stay local
- Fast automation pipelines that should not depend on external services
Required tools / APIs
- No external API required
- Bash CLI option:
qrencode - Node.js option:
qrcodepackage
Install options:
# Ubuntu/Debian
sudo apt-get update && sudo apt-get install -y qrencode
# Node.js
npm install qrcode
Skills
generate_qr_with_bash
Generate PNG and terminal QR directly from shell.
# Encode text into PNG
DATA="https://example.com/report?id=123"
qrencode -o qrcode.png -s 8 -m 2 "$DATA"
# Print QR in terminal (UTF-8 block mode)
qrencode -t UTF8 "$DATA"
# SVG output
qrencode -t SVG -o qrcode.svg "$DATA"
generate_qr_with_nodejs
import QRCode from 'qrcode';
const data = process.argv[2] || 'https://example.com';
async function main() {
await QRCode.toFile('qrcode.png', data, {
errorCorrectionLevel: 'M',
margin: 2,
width: 512
});
const svg = await QRCode.toString(data, { type: 'svg', margin: 2 });
await import('node:fs/promises').then(fs => fs.writeFile('qrcode.svg', svg));
const terminal = await QRCode.toString(data, { type: 'terminal' });
console.log(terminal);
console.log('Saved: qrcode.png, qrcode.svg');
}
main().catch(err => {
console.error('QR generation failed:', err.message);
process.exit(1);
});
Run:
node generate-qr.js "https://example.com/invoice/abc"
Agent prompt
You are generating QR codes locally without calling external QR APIs.
Use Bash (qrencode) for quick CLI generation or Node.js (qrcode package) for programmatic control.
Return:
1) command/code used,
2) output filenames (png/svg),
3) brief validation note (e.g., "scan test recommended").
If dependency is missing, provide the install command and retry.
Best practices
- Keep payload concise for better scan reliability
- Use at least error correction level
Mfor general use - Export PNG for compatibility and SVG for scalable print/web usage
- Validate with a scanner after generation
Troubleshooting
qrencode: command not found→ installqrencodevia package manager- Node import error → ensure
npm install qrcodecompleted - Dense/unclear QR image → increase image size/box size and reduce payload length
See also
- pdf-manipulation.md — combine generated QR images into documents
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
phone-specs-scraper
Scrape phone specifications from GSM Arena, PhoneDB, and alternative sites. Use when: (1) Comparing smartphone specs, (2) Researching device features, or (3) Building phone comparison tools.
check-crypto-address-balance
Check cryptocurrency wallet balances across multiple blockchains using free public APIs.
get-crypto-price
Fetch current and historical crypto prices and compute ATH or ATL over common time windows.
static-assets-hosting
Host static websites and assets via zip upload to Originless IPFS. Use when: (1) Deploying static sites, (2) Hosting HTML/CSS/JS projects, (3) Sharing web assets publicly, or (4) User asks to host static files.
chat-logger
Log all chat messages to a SQLite database for searchable history and audit. Use when: (1) Building chat history, (2) Auditing conversations, (3) Searching past messages, or (4) User asks to log chats.
using-nostr
Post notes, send encrypted messages, and interact with relays using the Nostr protocol.
Didn't find tool you were looking for?