Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Prettier

$ prettier Community Low Risk
Prettier Contributors · Code & DevOps · MIT · macos / linux / windows

Widely adopted code formatter supporting JS, TS, CSS, HTML, JSON, YAML, and Markdown. Offers deterministic --check and --list-different read-only verification before running --write, though it emits plain text rather than JSON.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
npm install -D prettier
CLI vs MCP Decision CLI Only

Formats local workspace files directly; MCP adds latency for zero gain.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Non-interactive --check, --list-different, and --no-color with clean exit codes, though lacks --json output.

  • --check and --list-different provide clean pass/fail exit codes
  • No --json diagnostic output flag
Trust & Safety 23 / 25

Read-only unless --write is explicitly supplied, and preserves AST semantics.

  • Only modifies files when --write is passed
Setup & Portability 13 / 15

Standard npm package running anywhere Node.js is installed.

  • Cross-platform Node.js CLI
Utility & Efficiency 13 / 15

Covers web frontend, Markdown, JSON, and YAML formatting consistently.

  • Broad multi-language formatting support beyond JS/TS
Maintenance & Lineage 9 / 10

Long-standing MIT project with massive industry adoption.

  • Active prettier/prettier repository
Docs & Verifiability 8 / 10

Clear CLI flag documentation at prettier.io/docs/en/cli.

  • Official CLI reference at prettier.io

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

Purely local file formatting; no credentials stored or required.

Side Effects
Read-Only Local Write
Cost & Quotas

MIT open-source npm package; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Prettier (prettier) Agent Rules
- Use `prettier --list-different` or `prettier --check` to verify formatting before rewriting files.
- Scope `prettier --write` to files you touched so unrelated formatting diffs stay clean.

Agent-Ready Command Recipes

Safe Read-Only Queries

List unformatted files without modifying them
npx prettier --list-different --no-color .

Prints file paths that differ from Prettier formatting and exits non-zero if any need formatting.

Controlled Writes & Previews

Format targeted modified files
npx prettier --write src/index.ts

Reformats specified files in place using the repository's .prettierrc config.

Strengths for Agents

  • + --list-different outputs exact file paths needing formatting for minimal token usage.
  • + Broad language coverage including Markdown, YAML, HTML, CSS, and TS.
  • + Zero interactive prompts and deterministic formatting.

Caveats & Pitfalls

  • ! Lacks structured --json output.
  • ! Slower than Rust formatters (biome) on large repositories.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI