skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
steveclarke/dotfiles100 installs

print

Print files on Mac or Linux via `lp` — defaults to double-sided B&W. Supports PDF, markdown (via md-to-pdf), copies, page ranges, color, printer selection.

How do I install this agent skill?

npx skills add https://github.com/steveclarke/dotfiles --skill print
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill provides a utility to print files using the system's 'lp' command. It includes a helper script that safely manages printing options such as page ranges, copies, and color modes. The implementation uses security best practices for shell scripts to prevent command injection, and no malicious patterns or unauthorized data access were detected.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Print

Print files on Mac or Linux using the lp command with sensible defaults.

Printing Markdown

To print a markdown file, first convert it to PDF using the /md-to-pdf skill:

~/.claude/skills/md-to-pdf/scripts/md-to-pdf.cjs doc.md
~/.claude/skills/print/scripts/print doc.pdf
rm doc.pdf  # Delete if PDF was just for printing

The /md-to-pdf skill handles Mermaid diagrams, syntax highlighting, and page numbers.

Defaults

SettingDefaultRationale
DuplexDouble-sided (long-edge)Save paper
ColorBlack & whiteSave toner on color printers

These defaults can be overridden per-request.

Usage

Quick Print (uses system default printer)

# Print a file with defaults (double-sided, b&w)
lp -o sides=two-sided-long-edge -o ColorModel=Gray <file>

# Or use the helper script
~/.claude/skills/print/scripts/print <file>

Common Options

OptionFlagExample
Printer-d <name>-d HP_LaserJet_4001
Copies-n <count>-n 3
Pages-P <range>-P 1-5 or -P 1,3,7
Single-sided-o sides=one-sidedOverride duplex
Color-o ColorModel=ColorOverride b&w
Landscape-o landscapeRotate 90°
Fit to page-o fit-to-pageScale to fit

List Available Printers

lpstat -p -d

Shows all printers and the system default (marked with system default destination:).

Check Print Queue

lpstat -o          # Show pending jobs
lpstat -W completed # Show completed jobs

Cancel a Job

cancel <job-id>    # e.g., cancel HP_LaserJet_4001-852
cancel -a          # Cancel all jobs

Helper Script

The print script at ~/.claude/skills/print/scripts/print wraps lp with the defaults:

# Basic usage
~/.claude/skills/print/scripts/print document.pdf

# Specify printer
~/.claude/skills/print/scripts/print document.pdf -d Brother_HL_L3280CDW_series

# Multiple copies
~/.claude/skills/print/scripts/print document.pdf -n 3

# Single-sided color
~/.claude/skills/print/scripts/print document.pdf --single-sided --color

# Page range
~/.claude/skills/print/scripts/print document.pdf -P 1-5

Run ~/.claude/skills/print/scripts/print --help for all options.

Printer-Specific Notes

HP LaserJet 4001

  • Supports duplex
  • Monochrome only (no color option needed)
  • Steve's default printer

Brother HL-L3280CDW

  • Color laser
  • Supports duplex
  • Use --color to override b&w default

Brother DCP-L2550DW

  • Monochrome
  • Supports duplex

Troubleshooting

"No such file or directory"

The printer name has changed. Run lpstat -p to see current names.

Job stuck in queue

lpstat -o                    # Check status
cancel <job-id>              # Cancel stuck job
cupsenable <printer-name>    # Re-enable if disabled

Duplex not working

Not all printers support duplex. Check printer capabilities:

lpoptions -p <printer-name> -l | grep -i sides

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/steveclarke/dotfiles/print">View print on skillZs</a>