Printer skill

Manage printers via CUPS on macOS (discover, add, print, queue, status, wake).

MIT-0 · Free to use, modify, and redistribute. No attribution required.
2 · 1.8k · 5 current installs · 5 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
SKILL.md content matches the name/description: it uses CUPS/IP P commands to discover, add, print, manage queues, and wake printers. However the registry metadata you provided says 'Required binaries: none' while the SKILL.md metadata lists required bins (lp, lpstat, lpadmin). Also the package/source is 'unknown' and has no homepage — that lack of provenance is worth noting but does not make the functionality incoherent.
Instruction Scope
All runtime instructions are narrowly focused on printer management (lp, lpadmin, lpstat, ipptool, snmpwalk, curl to printer IPs). They reference system logs (/var/log/cups/error_log) and occasional sudo for server-wide changes, which is appropriate for admin tasks on printers. No instructions try to read unrelated files, exfiltrate data, or contact external endpoints beyond the target printers.
Install Mechanism
This is an instruction-only skill with no install spec or code files. That minimizes installer risk. The doc suggests optionally installing net-snmp via Homebrew for SNMP queries — an expected, low-risk suggestion and not performed automatically by the skill.
Credentials
The skill declares no required environment variables or credentials. The only credential-related note is use of the SNMP community string 'public' in examples (standard read-only default). The operations do require local system privileges for some actions (sudo for lpadmin changes, and reading /var/log), but those are proportional to printer administration.
Persistence & Privilege
always:false and no install hooks — the skill does not request permanent, automatic inclusion. The doc suggests creating a launchd agent for persistent keep-alive, but that is a user action and not baked into the skill.
Assessment
This skill appears to do exactly what it says: step-by-step, local printer administration via CUPS on macOS. Before installing/using it: (1) note the registry/source has no homepage and provenance is unknown — prefer skills from verifiable sources; (2) ensure the agent or user running these commands has appropriate local admin rights (sudo) — some commands modify system printer config or read /var/log; (3) the skill will talk directly to printer IPs (IPP/HTTP/SNMP) — that's expected, but confirm the printer addresses are correct and trusted; (4) the SKILL.md metadata lists required binaries (lp, lpstat, lpadmin) even though registry metadata said none — ensure those binaries exist on your system; (5) creating a launchd agent or installing net-snmp are optional steps that you must perform manually if desired. If you need higher assurance, ask the publisher for a homepage or source repo before proceeding.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk975nvs8d71wbczzr6rga77g297ysk61

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

🖨️ Clawdis
OSmacOS
Binslp, lpstat, lpadmin

SKILL.md

Printer (CUPS)

Control printers on macOS using built-in CUPS commands. No external CLI needed.

Discover printers

# Network printers (Bonjour/AirPrint)
dns-sd -B _ipp._tcp . 2>/dev/null & sleep 3; kill $! 2>/dev/null

# Get printer details (host, port, resource path)
dns-sd -L "Printer Name" _ipp._tcp . 2>/dev/null & sleep 3; kill $! 2>/dev/null

# CUPS-native discovery
lpstat -e                         # available network destinations
lpinfo --include-schemes dnssd -v # dnssd backends

# IPP discovery
ippfind --timeout 5

Add a printer (driverless IPP Everywhere)

# Recommended: driverless queue
lpadmin -p MyPrinter -E -v "ipp://printer.local:631/ipp/print" -m everywhere

# Set as default
lpadmin -d MyPrinter

# Enable SNMP supply reporting (toner levels)
sudo lpadmin -p MyPrinter -o cupsSNMPSupplies=true

Print files

lp filename.pdf                      # to default printer
lp -d MyPrinter filename.pdf         # specific printer
lp -d MyPrinter -n 2 file.pdf        # 2 copies
lp -d MyPrinter -o sides=two-sided-long-edge file.pdf  # duplex
lp -d MyPrinter -o media=letter file.pdf
lp -d MyPrinter -o ColorModel=Gray file.pdf  # grayscale

# Print text directly
echo "Hello World" | lp -d MyPrinter

Queue management

# Check status
lpstat -p MyPrinter        # printer status
lpstat -o MyPrinter        # queued jobs
lpstat -t                  # everything
lpq -P MyPrinter           # BSD-style queue view

# Cancel jobs
cancel JOB_ID
cancel -a MyPrinter        # cancel all

# Enable/disable
cupsenable MyPrinter       # resume printing
cupsdisable MyPrinter      # pause printer
cupsaccept MyPrinter       # accept new jobs
cupsreject MyPrinter       # reject new jobs

Printer options

# List available options for a printer
lpoptions -p MyPrinter -l

# Set default options (per-user)
lpoptions -p MyPrinter -o sides=two-sided-long-edge

# Set server-side defaults
sudo lpadmin -p MyPrinter -o sides-default=two-sided-long-edge

Status and diagnostics

# IPP status query (detailed)
ipptool -t ipp://PRINTER_IP/ipp/print get-printer-attributes.test

# Filter for key info
ipptool -t ipp://PRINTER_IP/ipp/print get-printer-attributes.test \
  | grep -iE 'printer-state|marker|supply|media|error'

Wake printer from sleep

# IPP poke (usually wakes the printer)
ipptool -q -T 5 ipp://PRINTER_IP/ipp/print get-printer-attributes.test

# HTTP poke (wakes web UI stack)
curl -s -m 5 http://PRINTER_IP/ >/dev/null

# TCP connect test
nc -zw2 PRINTER_IP 631

Keep-alive (prevent deep sleep)

# Poll every 5 minutes (runs in foreground)
ipptool -q -T 3 -i 300 ipp://PRINTER_IP/ipp/print get-printer-attributes.test

For persistent keep-alive, create a launchd agent.

Toner levels via SNMP

Requires brew install net-snmp:

snmpwalk -v2c -c public PRINTER_IP 1.3.6.1.2.1.43.11.1.1

Note: SNMP may be disabled on the printer. Check Remote UI settings.

Remote UI (web interface)

Most network printers expose a web UI at http://PRINTER_IP/ for:

  • Sleep/timer settings (Settings > Timer Settings > Auto Sleep Time)
  • Network protocol config (enable/disable IPP, SNMP, raw 9100)
  • Consumables status

Troubleshooting

# Printer stuck/disabled? Re-enable it
cupsenable MyPrinter

# Check device URI
lpstat -v MyPrinter

# Remove and re-add printer
lpadmin -x MyPrinter
lpadmin -p MyPrinter -E -v "ipp://..." -m everywhere

# CUPS error log
tail -f /var/log/cups/error_log

Notes

  • Prefer ipp:// or ipps:// URIs over raw 9100 or LPD
  • -m everywhere auto-configures from printer's IPP capabilities
  • Option names vary by printer; use lpoptions -l to discover
  • Sleep settings are best configured via printer's Remote UI
  • Auto-sleep (1 min) keeps services alive - print jobs wake the printer automatically
  • If the printer is completely unresponsive (IPP port closed, HTTP timeout), it's likely in deep sleep or powered off. Message the user to check/wake the printer physically.

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…