Agent skill

Pretty

by scalus3 in scalus3/scalus

A skill your agent uses when writing or changing a Pretty typeclass instance (paiges Doc DSL) in scalus-core, for example in scalus/utils/Pretty.scala or the cardano/ledger types.

Apache-2.0Auto-check passedBackend & APIs

Install Pretty

skills CLI
$ npx skills add scalus3/scalus --skill pretty -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install scalus3/scalus pretty --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/scalus3/scalus.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/pretty .claude/skills/pretty && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pretty
GitHub stars
105
Token cost
~1.6k tokens
SKILL.md length
495 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when writing or changing a Pretty typeclass instance (paiges Doc DSL) in scalus-core, for example in scalus/utils/Pretty.scala or the cardano/ledger types.

  • Works in 8 steps: Read the type definition to understand… → Choose the right pattern → Apply styling consistently → …
  • Changing a Pretty typeclass instance (paiges Doc DSL) in scalus-core
  • SKILL.md covers Key Files, Pretty Typeclass Overview, Doc DSL Quick Reference and Pretty Helpers (from…, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Pretty is an agent skill from scalus3/scalus. Use when writing or changing a Pretty typeclass instance (paiges Doc DSL) in scalus-core, for example in scalus/utils/Pretty.scala or the cardano/ledger types.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Smart contracts. The repository describes itself as: Scalus - Smart contracts & dApps Development Platform for Cardano. The licence is Apache-2.0.

When your agent uses it

  • Changing a Pretty typeclass instance (paiges Doc DSL) in scalus-core
  • For example in scalus/utils/Pretty.scala
  • The cardano/ledger types

Example prompts

  • “/pretty”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Read the type definition to understand its structure
  2. Choose the right pattern
  3. Apply styling consistently
  4. Prefer using Composition Operators: &, /, + for clarity
  5. Use layout control
  6. Add to companion object
  7. Delegate to other instances
  8. Test output

What it can do on your machine

Read from SKILL.md and the folder at commit 073969c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are scala).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pretty loads about 1.6k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 495 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from scalus3/scalus at commit 073969c, republished under its Apache-2.0 licence (© scalus3). 495 words, ~1,576 tokens.

Download SKILL.mdSave it as .claude/skills/pretty/SKILL.md (or your agent's skills folder).
name
pretty
description
Use when writing or changing a Pretty typeclass instance (paiges Doc DSL) in scalus-core, for example in scalus/utils/Pretty.scala or the cardano/ledger types.

Pretty Printer Writing Guide

This skill provides knowledge for implementing Pretty[A] typeclass instances in the Scalus codebase.

Key Files

  • scalus-core/shared/src/main/scala/scalus/utils/Pretty.scala - typeclass definition and helpers
  • scalus-core/shared/src/main/scala/scalus/cardano/ledger/*.scala - example instances

Pretty Typeclass Overview

The Pretty[A] typeclass converts values to org.typelevel.paiges.Doc for flexible pretty printing.

Key Methods
  • pretty(a: A, style: Style): Doc - concise format
  • prettyDetailed(a: A, style: Style): Doc - detailed format (optional override)
Creating Instances
scala
// Simple instance
given Pretty[MyType] with
    def pretty(a: MyType, style: Style): Doc = ...

// Instance with detailed view
given Pretty[MyType] = Pretty.instanceWithDetailed(
  concise = (a, style) => ...,
  detailed = (a, style) => ...
)

Doc DSL Quick Reference

Basic Combinators
  • text("str") - literal text
  • str(value) - convert to string then Doc
  • char('x') - single character
  • empty - empty Doc
  • space - single space
  • comma - comma character
  • line - line break (or space when flattened)
Composition Operators
  • a + b - concatenate Docs directly (no space)
  • a & b - concatenate Docs with space
  • a / b - concatenate Docs with line break
Layout Control
  • .nested(n) - indent by n after line breaks
  • .indent(n) - indent the whole thing
  • .hang(n) - hanging indent (first line not indented)
  • .grouped - try to fit on one line, break if needed
  • .flatten - force single line
Lists and Brackets
  • fill(sep, docs) - fill paragraphs with flexible breaks
  • stack(docs) - vertical stack (join with line breaks)
  • intercalate(sep, docs) - join with separator
  • .tightBracketBy(open, close) - wrap with brackets
  • .bracketBy(open, close) - wrap with brackets and indent

Pretty Helpers (from scalus.utils.Pretty)

Bracket Helpers
  • Pretty.inParens(d) - wrap in (d)
  • Pretty.inBraces(d) - wrap in {d}
  • Pretty.inBrackets(d) - wrap in [d]
  • Pretty.braceList(entries) - { a, b, c } format
Field Helpers
  • Pretty.field(label, value, style) - label: value with styled label
  • Pretty.optField(label, opt, style) - optional field
  • Pretty.bulletList(label, items) - bulleted list
Styling (XTerm colors)
  • Pretty.kw(s, style) - keyword (orange) - use for labels
  • Pretty.ctr(s, style) - constructor (blue) - use for type names
  • Pretty.lit(d, style) - literal (green) - use for values
  • Pretty.typ(d, style) - type (purple)
  • Pretty.err(d, style) - error (red)
Rainbow Brackets (16 colors)

For nested structures, use rainbow brackets to color brackets based on nesting depth:

  • Pretty.rainbowChar(c, depth, style) - single bracket char with rainbow color
  • Pretty.rainbowBracket(d, open, close, depth, style) - wrap content in rainbow brackets

Colors cycle through 16 distinct XTerm colors: red → orange → yellow → lime → green → teal → cyan → blue → indigo → purple → magenta → pink. Colors are chosen to avoid collision with ctr, lit, and kw styling.

Show full SKILL.md (188 more words)Show less

Implementation Guidelines

When writing a Pretty instance:

  1. Read the type definition to understand its structure

  2. Choose the right pattern:

    • Enums/sealed traits: pattern match and show variant-specific content
    • Collections: use fill or stack for items
    • Wrappers: delegate to inner type's Pretty instance
  3. Apply styling consistently:

    • ctr for constructor/type names
    • lit for literal values (numbers, booleans)
    • kw for field labels
  4. Prefer using Composition Operators: &, /, + for clarity

  5. Use layout control:

    • .grouped for content that should try to fit on one line
    • fill(comma + space, items) for lists that can wrap
    • .hang(2) or .indent(2) for nested content
  6. Add to companion object:

    scala
    object MyType:
        import Doc.*
        import Pretty.{ctr, inParens, lit}
    
        given Pretty[MyType] with
            def pretty(a: MyType, style: Style): Doc = ...
  7. Delegate to other instances:

    scala
    Pretty[OtherType].pretty(value, style)
  8. Test output:

    • .show - render at 80 columns
    • .showDetailed - render detailed at 80 columns
    • .showHighlighted - render with XTerm colors
    • .showDetailedHighlighted - render detailed with XTerm colors

Common Patterns

Enum/Sealed Trait
scala
given Pretty[MyEnum] with
    def pretty(a: MyEnum, style: Style): Doc = a match
        case MyEnum.VariantA(x) => ctr("VariantA", style) + inParens(lit(str(x), style))
        case MyEnum.VariantB(items) =>
            val inner = fill(comma + space, items.map(Pretty[Item].pretty(_, style)))
            (ctr("VariantB", style) + inParens(inner)).grouped
Case Class with Fields
scala
given Pretty[MyCaseClass] with
    def pretty(a: MyCaseClass, style: Style): Doc =
        val fields = List(
            field("name", text(a.name), style),
            field("value", lit(str(a.value), style), style)
        )
        (ctr("MyCaseClass", style) / stack(fields).indent(2)).grouped
Concise + Detailed Views
scala
given Pretty[MyType] = Pretty.instanceWithDetailed(
  concise = (a, style) => text(a.hash.toHex),
  detailed = (a, style) => detailedInfo
)
Recursive Types with Rainbow Brackets

For nested/recursive structures, track depth and use rainbow brackets:

scala
given Pretty[MyTree] with
    def pretty(a: MyTree, style: Style): Doc = prettyWithDepth(a, style, 0)

    private def prettyWithDepth(a: MyTree, style: Style, depth: Int): Doc = a match
        case Leaf(value) => lit(str(value), style)
        case Branch(left, right) =>
            val inner = prettyWithDepth(left, style, depth + 1) + comma + space +
                        prettyWithDepth(right, style, depth + 1)
            rainbowBracket(inner, '(', ')', depth, style)
Guidelines
  • Never shorten hashes, always print full hash. No hash.take(16) + "...".

© scalus3, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/pretty of scalus3/scalus.

Open the folder on GitHubat commit 073969c

Compare with similar skills

Pretty next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pretty compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pretty this skillscalus3/scalus105—~1.6kAutomated safety check: PassApache-2.0
Fizz Convertpashov/skills1.2k2 repos~3.7kAutomated safety check: PassMIT
Solana Devsolana-foundation/solana-dev-skill574—~3.8kAutomated safety check: PassMIT
Feynman Auditor0xiehnnkta/nemesis-auditor2431 repos~11kAutomated safety check: PassMIT
Smart Contract Auditgreatpie/smart-contract-audit-skill101—~1.1kAutomated safety check: PassNone
RadarAuditware/radar154—~2.1kAutomated safety check: PassGPL-3.0

Similar skills

  • Fizz Convert

    pashov/skills

    Convert English-language properties in PROPERTIES.md (produced by the Fizz skill) into Solidity assertions inside the existing fuzz harness, then flip their checkboxes.

    1.2k GitHub starsUsed in 2 repos~3.7k tokens
    Backend & APIsAuto-check passed
  • Solana Dev

    solana-foundation/solana-dev-skill

    A skill your agent uses when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "fuzz my…

    574 GitHub stars~3.8k tokensUpdated today
    Backend & APIsAuto-check passed
  • Feynman Auditor

    0xiehnnkta/nemesis-auditor

    Deep business logic bug finder using the Feynman technique. An agent skill from 0xiehnnkta/nemesis-auditor.

    243 GitHub starsUsed in 1 repo~11k tokens
    Backend & APIsAuto-check passed
  • Smart Contract Audit

    greatpie/smart-contract-audit-skill

    Script-backed, out-of-box auditing workflow for Solidity/EVM repositories based on EVMbench detect/patch/exploit methodology.

    101 GitHub stars~1.1k tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed
  • Radar

    Auditware/radar

    Use radar for smart contract security analysis, AST generation, and detection template development.

    154 GitHub stars~2.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Solidity Auditor

    Gabson0x/bountyforge

    Security audit of Solidity code while you develop. An agent skill from Gabson0x/bountyforge.

    443 GitHub stars~3.7k tokensUpdated 21 days ago
    Backend & APIsAuto-check passed

More from scalus3/scalus

  • Optimize Contract

    scalus3/scalus

    Optimize Scalus/Cardano smart contracts for execution budget (CPU steps and memory).

    105 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Security review for Scalus/Cardano smart contracts. An agent skill from scalus3/scalus.

    105 GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Contract

    scalus3/scalus

    Guide for developing Scalus smart contracts. An agent skill from scalus3/scalus.

    105 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Contract Test

    scalus3/scalus

    Guide for testing Scalus smart contracts. An agent skill from scalus3/scalus.

    105 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Local Development

    scalus3/scalus

    A skill your agent uses when developing or testing Scalus smart contracts with the local Emulator and TxBuilder.

    105 GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Categories

Questions about Pretty

What does Pretty do?

A skill your agent uses when writing or changing a Pretty typeclass instance (paiges Doc DSL) in scalus-core, for example in scalus/utils/Pretty.scala or the cardano/ledger types. Pretty is an agent skill from scalus3/scalus.scala or the cardano/ledger types.

When should I use Pretty?

Pretty fits situations like: changing a Pretty typeclass instance (paiges Doc DSL) in scalus-core; for example in scalus/utils/Pretty.scala; the cardano/ledger types.

How do I install Pretty in Claude Code?

Run `npx skills add scalus3/scalus --skill pretty -a claude-code`. Or copy the skill folder (.claude/skills/pretty in scalus3/scalus) into .claude/skills/pretty in your project. Claude Code loads it when a task matches its description.

How do I install Pretty in Codex?

Run `npx skills add scalus3/scalus --skill pretty -a codex`. Or copy the skill folder (.claude/skills/pretty in scalus3/scalus) into .agents/skills/pretty in your project. Codex loads it when a task matches its description.

Can I use Pretty in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add scalus3/scalus --skill pretty -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pretty, .gemini/skills/pretty, .github/skills/pretty and .opencode/skills/pretty in your project.

What does Pretty need to run?

SKILL.md names no scripts, command-line tools or credentials: Pretty is instructions for the agent only.

Does Pretty access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pretty safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pretty use?

Pretty is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pretty use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pretty?

Skills that share tags, products or a category with Pretty: Fizz Convert (pashov/skills, 1.2k stars), Solana Dev (solana-foundation/solana-dev-skill, 574 stars), Feynman Auditor (0xiehnnkta/nemesis-auditor, 243 stars) and Smart Contract Audit (greatpie/smart-contract-audit-skill, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pretty?

scalus3 (a GitHub organization) maintains it in scalus3/scalus, which has 105 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.

Source: scalus3/scalus on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.