format

format is a skill for Claude Code, Codex from escapeboy/ai-prompts. It costs 10 tokens per session (1,426 once invoked), scanned A, original, MIT.

A code-formatting command that detects a project's language setup and runs its configured formatter. Formatting changes code layout without changing its intended behavior.

In plain words
What is it for?
Formatting a whole project or a selected path in PHP, JavaScript, TypeScript, Python, or Rust projects.
Why use it?
It removes manual style cleanup and helps keep files consistent with project conventions. It can also check formatting without changing files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Formatting a whole project or a selected path in PHP, JavaScript, TypeScript, Python, or Rust projects.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/escapeboy/ai-prompts/example-simple
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add escapeboy/ai-prompts --skill example-simple
Clone the repo
git clone --depth 1 https://github.com/escapeboy/ai-prompts

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for format

README.md
[![agentmods](https://agentmods.dev/badge/skills/escapeboy/ai-prompts/example-simple/github.svg)](https://agentmods.dev/skills/escapeboy/ai-prompts/example-simple)
Your own site
<a href="https://agentmods.dev/skills/escapeboy/ai-prompts/example-simple"><img src="https://agentmods.dev/badge/skills/escapeboy/ai-prompts/example-simple/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for format

Your own site · 80×15
<a href="https://agentmods.dev/skills/escapeboy/ai-prompts/example-simple"><img src="https://agentmods.dev/badge/skills/escapeboy/ai-prompts/example-simple.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,426 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00010 $0.01426
Opus 5.5 $0.00004 $0.00570
Sonnet 5.5 $0.00002 $0.00285
Haiku 4.5 $0.00001 $0.00143

Measured 21d ago against content hash ff13177cec3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

format scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 21d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

03-custom-skills/examples/example-simple-skill.md · 337 lines

How it starts

The opening of the file, as written. The whole thing — 337 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Format

Automatically format code using the project's configured formatters. Detects project type and runs the appropriate formatting tool.


Usage

/format [path] [--check]

Quick Examples

/format                    # Format entire project
/format app/Services/      # Format specific directory
/format --check            # Check formatting without changes

Actions

1. Default Action (Format All)

When invoked without arguments, formats the entire project.

Process:

  1. Detect project type:

    • Check for composer.json → PHP project
    • Check for package.json → JavaScript/TypeScript project
    • Check for pyproject.toml → Python project
    • Check for Cargo.toml → Rust project
  2. Run appropriate formatter:

    • PHP: vendor/bin/pint
    • JavaScript/TypeScript: npm run format (or npx prettier --write .)
    • Python: black .
    • Rust: cargo fmt
  3. Report results:

    • Number of files formatted
    • Any errors encountered

Example:

/format

Expected Output:

Detected: PHP (Laravel) project
Running: vendor/bin/pint
✅ Formatted 12 files

2. Format Specific Path

Format only a specific file or directory.

Usage:

/format [path]

Process:

  1. Verify path exists
  2. Determine if file or directory
  3. Run formatter on specified path only
  4. Report results

Example:

/format app/Services/UserService.php
/format resources/js/

3. Check Mode (--check)

Check if code is formatted without making changes.

Usage:

/format --check
/format app/Services/ --check

Process:

  1. Run formatter in check/dry-run mode
  2. Report files that would be changed
  3. Exit with status (useful for CI)

Example Output:

Checking formatting...
⚠️ 3 files need formatting:
  - app/Services/UserService.php
  - app/Http/Controllers/UsersController.php
  - app/Models/User.php

Run `/format` to fix these files.

Options

Option Description
--check Check formatting without making changes
--verbose Show each file being formatted

Read the full file on GitHub · 337 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 21d ago First seen · 337 lines · 10 tokens per session scan A ff13177cec3a

Subscribe to this mod's changes

format is a skill published in the GitHub repository escapeboy/ai-prompts (91 stars, last pushed 9d ago), licensed MIT. It adds 10 tokens to every session and 1,426 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-25.

Related

Other skills, from other repositories