Skip to content
Back to skills

Cairo Printing

ASecurity

Explain Cairo printing and formatting with print!/println!/format!, Display/Debug traits, and Formatter helpers; use when a request involves output formatting or printing custom types in Cairo.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
tools

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill cairo-printing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Printing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cairo Printing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-cairo-printing/badge)](https://www.skillsdirectory.com/skills/david-li0406-cairo-printing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cairo-printing
description: Explain Cairo printing and formatting with print!/println!/format!, Display/Debug traits, and Formatter helpers; use when a request involves output formatting or printing custom types in Cairo.
---

# Cairo Printing

## Overview
Guide printing for standard and custom types, including Display and Debug formatting.

## Quick Use
- Read `references/printing.md` before answering.
- Use `println!` for newline output and `format!` for ByteArray formatting.
- Recommend `Debug` for complex types when no Display impl exists.

## Response Checklist
- `println!` and `print!` use Display (`{}`) and Debug (`{:?}`).
- `format!` returns a ByteArray and does not consume inputs.
- For custom types, implement `Display` or derive `Debug`.
- Use `write!`/`writeln!` with `Formatter` for custom formatting.

## Example Requests
- "How do I print a struct in Cairo?"
- "What is the difference between Display and Debug?"
- "How do I format a string without printing?"

## Cairo by Example
- [Hello World](https://cairo-by-example.xyz/hello)
- [Formatted print](https://cairo-by-example.xyz/hello/print)
- [Debug](https://cairo-by-example.xyz/hello/print/print_debug)
- [Display](https://cairo-by-example.xyz/hello/print/print_display)
- [Formatting](https://cairo-by-example.xyz/hello/print/fmt)

Files in this skill

  • SKILL.md1.3 KB
  • references/printing.md630 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…