agentsclimarketplace

Escpos skill

Skill Lordgrimz/escpos-skill

A comprehensive skill for generating, debugging, and reasoning about ESC/POS thermal receipt printer command streams. Covers 79 commands with exact hex byte sequences including text formatting, barcodes (UPC/EAN/CODE128), QR codes, PDF417, raster images, NV graphics, cash drawer control, paper cutting, page mode layout, and real-time hardware status queries.From its SKILL.md

Install
npx -y skills add Lordgrimz/escpos-skill

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

11.3 KB, ~3.4k tokens by cl100k_base, as published. Nobody here has run it

ESC/POS Printer Skill

When to activate: Use this skill whenever the user needs to generate, debug, or reason about ESC/POS printer command streams. Triggers include: thermal receipt printers, POS printers, ESC/POS commands, byte sequences for printing, barcode printing, QR code printing, cash drawer control, paper cutting, receipt layout, label printing, page mode, NV images, or any mention of printer commands like LF, GS V, GS k, DLE EOT, or similar. Use this skill even when the user asks general questions like "how do I center text on a receipt" or "how do I print a logo" -- if it involves a thermal printer, always consult this skill first.

A structured reference for generating correct ESC/POS command streams for thermal receipt and label printers. All command data is sourced from the canonical ESC/POS command PDF.

How to use this skill: Start with the Workflow Patterns section to understand job structure, then look up specific commands in the Quick Command Index. For full parameter details and edge cases, read the appropriate reference file from references/.


Workflow Patterns

Standard Receipt Job

ESC @           ← Initialize (safe start)
ESC t 0         ← Set code page (PC437 default)
ESC a 1         ← Center alignment (for header)
[logo or header text + LF]
ESC a 0         ← Left alignment (for body)
[line items with HT tab stops or ESC $ absolute positioning]
ESC a 2         ← Right alignment (for totals, if needed)
[totals]
ESC d 3         ← Feed 3 lines before cut
GS V 1          ← Partial cut

Page Mode Label

ESC @           ← Initialize
ESC L           ← Enter page mode
ESC T 0         ← Direction: left-to-right, upper-left start
ESC W [xL xH yL yH dxL dxH dyL dyH]  ← Define print area
[compose content using GS $, GS \, ESC $, ESC \]
FF              ← Print and exit page mode

Barcode Block

GS H 2          ← HRI below barcode
GS f 0          ← HRI font A
GS h 80         ← Height 80 dots
GS w 3          ← Width multiplier 3
GS k [type] [data] NUL  ← Print barcode

QR Code Block

GS ( k cn=49 fn=65: Set QR model (model 2 typical)
GS ( k cn=49 fn=67: Set module size (dot width)
GS ( k cn=49 fn=69: Set error correction level
GS ( k cn=49 fn=80: Store QR data (compute pL/pH from payload length + 3)
GS ( k cn=49 fn=81: Print QR code

Logo Print (NV Image)

FS q n [image definitions]  ← Define NV image (burns NV memory — max 10x/day)
[power-cycle / ESC @ after write completes]
FS p n m                    ← Print the stored NV image slot n

Cash Drawer

ESC p m t1 t2   ← Buffered pulse (fires after preceding print job finishes)
DLE DC4 n m t   ← Real-time pulse (fires immediately, bypasses buffer)

Modes: Standard vs Page

ConcernStandard ModePage Mode
Enter / ExitDefault; ESC S re-entersESC L to enter, FF to print+exit, ESC S to abort
PositioningESC $ (abs), ESC \ (rel), ESC a (justify)GS $ (abs secondary axis), GS \ (rel secondary axis)
Motion axisAlways horizontal = paper widthDepends on ESC T orientation
ImagesESC *, GS *, GS /, FS pGS v 0 only; FS p/q not available
JustificationLiveESC a buffers flag only; does not apply

Quick Command Index

Look up a command here, then read the reference file for full byte sequences and parameter details.

Control & Flow (references/01-control-flow.md)

CommandHexDescription
HT09Horizontal tab to next configured tab stop
LF0APrint buffer and advance one line
CR0DCarriage return (device-dependent; prefer LF)
FF0CPrint page-mode buffer and return to standard mode
CAN18Discard page-mode buffer without printing
ESC @1B 40Initialize printer to power-on defaults
ESC FF1B 0CPrint page-mode buffer without exiting page mode
ESC L1B 4CEnter page mode
ESC S1B 53Exit page mode, discard page buffer
ESC i1B 69Full paper cut (requires auto cutter)
ESC m1B 6DPartial paper cut (requires auto cutter)
GS V1D 56 m [n]Buffered cut with optional pre-feed (partial cut only via GS V)
GS :1D 3AStart/end macro definition (confirm hardware support)
GS ^1D 5E r t mExecute macro r times (confirm hardware support)

Text Formatting (references/02-text-formatting.md)

CommandHexDescription
ESC !1B 21 nCombined mode byte: font, bold, width, height, underline
ESC E1B 45 nEmphasized (bold) on/off
ESC G1B 47 nDouble-strike on/off (same visual as ESC E on this device)
ESC M1B 4D nSelect font A or B
ESC -1B 2D nUnderline on/off with thickness selection
ESC SP1B 20 nSet right-side character spacing
ESC t1B 74 nSelect character code table (code page)
ESC R1B 52 nSelect international character set variant
ESC V1B 56 n90-degree clockwise character rotation on/off
ESC {1B 7B nUpside-down line printing on/off
GS !1D 21 nIndependent width and height multipliers (1×–8×)
GS B1D 42 nWhite/black reverse printing on/off
ESC %1B 25 nEnable/disable user-defined character set
ESC &1B 26 y c1 c2 …Define custom RAM glyphs
ESC ?1B 3F nCancel a single user-defined character slot

Positioning & Layout (references/03-positioning-layout.md)

CommandHexDescription
ESC 21B 32Restore default line spacing (≈4.23 mm)
ESC 31B 33 nSet custom line spacing in motion units
ESC D1B 44 … 00Define horizontal tab stop positions
ESC $1B 24 nL nHSet absolute print position from line start
ESC \1B 5C nL nHSet relative print position
ESC a1B 61 nJustify: left / center / right
ESC J1B 4A nPrint and feed n motion units (one-shot)
ESC d1B 64 nPrint and feed n whole lines
ESC T1B 54 nSet page-mode print direction and start corner
ESC W1B 57 …Set page-mode print area rectangle
GS $1D 24 nL nHAbsolute secondary-axis position (page mode)
GS \1D 5C nL nHRelative secondary-axis position (page mode)
GS L1D 4C nL nHSet left margin (standard mode)
GS W1D 57 nL nHSet printing area width (standard mode)
GS P1D 50 x ySet horizontal and vertical motion units

Hardware & Status (references/04-hardware-status.md)

CommandHexDescription
DLE EOT10 04 nReal-time status query: printer/offline/error/paper
DLE ENQ10 05 nReal-time error recovery after auto-cutter fault
DLE DC410 14 01 m tReal-time drawer-kick pulse
ESC =1B 3D nEnable/disable printer (print-data gate)
ESC p1B 70 m t1 t2Buffered drawer-kick pulse
ESC c 31B 63 33 nSelect sensors that drive paper-end output signal
ESC c 41B 63 34 nSelect sensors that stop printing
ESC c 51B 63 35 nEnable/disable panel FEED button
GS a1D 61 nEnable/configure Automatic Status Back (ASB)
GS r1D 72 nTransmit paper sensor status on demand
GS I(not in PDF)Transmit printer ID (device docs required)

Images & Graphics (references/05-images-graphics.md)

CommandHexDescription
ESC *1B 2A m nL nH d…Inline column-format bit image
GS *1D 2A x y d…Define downloaded (RAM) bit image
GS /1D 2F mPrint downloaded (RAM) bit image
GS v 01D 76 30 m dxL dxH dyL dyH d…Raster-format image (standard mode only)
FS p1C 70 n mPrint NV bit image from slot n
FS q1C 71 n …Define NV bit image batch (≤10 writes/day)

Barcodes & 2D Symbols (references/06-barcodes-2d.md)

CommandHexDescription
GS k1D 6B m d… NUL / m n d…Print 1D barcode
GS H1D 48 nHRI position: none / above / below / both
GS f1D 66 nHRI font selection
GS h1D 68 nBarcode height in dots
GS w1D 77 nBarcode module width
GS x(not in PDF)Barcode horizontal size (device docs required)
GS ( k cn=49 fn=651D 28 6B … 31 41QR: select model
GS ( k cn=49 fn=671D 28 6B … 31 43QR: set module size
GS ( k cn=49 fn=691D 28 6B … 31 45QR: set error correction level
GS ( k cn=49 fn=801D 28 6B pL pH 31 50 30 d…QR: store data
GS ( k cn=49 fn=811D 28 6B 03 00 31 51 30QR: print stored symbol
GS ( k cn=48 fn=65–691D 28 6B … 30 41–45PDF417: columns / rows / module width / module height / error correction
GS ( k cn=48 fn=80/811D 28 6B … 30 50/51PDF417: store data / print

Common Pitfalls

  • CR vs LF: Always use LF (0A) for line advances. CR behavior depends on the printer's auto-LF DIP setting.
  • ESC @ scope: Resets runtime state but does NOT clear the receive buffer, NV images, or macro definitions.
  • pL/pH calculation: For GS ( k payload fields — length = data_bytes + 3; then pL = length % 256, pH = length / 256.
  • Motion units: Commands that specify distances in motion units (ESC 3, ESC J, ESC $, etc.) depend on the current GS P setting. Default: horizontal = 1/180 in, vertical = 1/360 in.
  • Page mode commands that silently buffer: ESC a, ESC V, GS L, GS W in page mode only update flags — they don't execute.
  • NV image write limit: FS q rewrites NV flash. Limit writes to ≤10/day to avoid wear.
  • Real-time vs buffered commands: DLE-family commands (DLE EOT, DLE ENQ, DLE DC4) bypass the print buffer and execute immediately. All ESC/GS commands are buffered.
  • GS V only partial-cuts: GS V does not support full cut on this printer family. Use m=1 or m=49 for partial cut. For full cut use ESC i (1B 69); for a simpler partial cut use ESC m (1B 6D). Both require an auto cutter.

Reference Files

Read the relevant file for full JSON command objects with byte sequences, parameter ranges, bit maps, and agent instructions:

FileContents
references/01-control-flow.mdHT, LF, CR, FF, CAN, ESC @, ESC FF, ESC L, ESC S, ESC i, ESC m, GS V, GS :, GS ^
references/02-text-formatting.mdESC !, ESC E, ESC G, ESC M, ESC -, ESC SP, ESC t, ESC R, ESC V, ESC {, GS !, GS B, ESC %, ESC &, ESC ?
references/03-positioning-layout.mdESC 2, ESC 3, ESC D, ESC $, ESC , ESC a, ESC J, ESC d, ESC T, ESC W, GS $, GS , GS L, GS W, GS P
references/04-hardware-status.mdDLE EOT, DLE ENQ, DLE DC4, ESC =, ESC p, ESC c 3, ESC c 4, ESC c 5, GS a, GS r, GS I
references/05-images-graphics.mdESC *, GS *, GS /, GS v 0, FS p, FS q
references/06-barcodes-2d.mdGS k, GS H, GS f, GS h, GS w, all GS ( k QR and PDF417 subcommands

What ships with it: 10 files

90.7 KB alongside SKILL.md

Keep looking

Skills are one crate of 326,422. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.