用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/duclm1x1/Dive-Ai --skill printer命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Persistent memory system for AI agents following Model Context Protocol (MCP). Use for storing long-term memories across sessions, semantic search of past knowledge, building knowledge graphs, auto-injecting context, deduplicating memories, syncing to cloud storage. Essential for agents that need to remember decisions, solutions, preferences, and learned patterns over time.
Persistent memory system for AI agents following Model Context Protocol (MCP). Use for storing long-term memories across sessions, semantic search of past knowledge, building knowledge graphs, auto-injecting context, deduplicating memories, syncing to cloud storage. Essential for agents that need to remember decisions, solutions, preferences, and learned patterns over time.
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.
正在显示 SKILL.md
基于 SOC 职业分类
| name | printer |
| description | Manage printers via CUPS on macOS (discover, add, print, queue, status, wake). |
| metadata | {"clawdbot":{"emoji":"🖨️","os":["darwin"],"requires":{"bins":["lp","lpstat","lpadmin"]}}} |
Control printers on macOS using built-in CUPS commands. No external CLI needed.
# 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
# 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
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
# 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
# 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
# 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'
# 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
# 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.
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.
Most network printers expose a web UI at http://PRINTER_IP/ for:
# 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
ipp:// or ipps:// URIs over raw 9100 or LPD-m everywhere auto-configures from printer's IPP capabilitieslpoptions -l to discover