code-formatting

Format JavaScript, TypeScript, Python, JSON, Go, and Rust files with external tools.

3|Updated Jun 4, 2021
One-click install
npx skills add https://github.com/tizee/dotfiles --skill code-formatting-tizee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-formatting
Source: https://github.com/tizee/dotfiles/tree/main/claude/skills/code-formatting
Command: npx skills add https://github.com/tizee/dotfiles --skill code-formatting-tizee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Promotes consistent formatting across codebases using automated formatters and linters.

Core Features & Use Cases

  • External tooling: Prettier, Black, isort, etc.
  • Granular edits: Break changes into small, testable edits
  • CI readiness: Pre-commit and CI formatting checks

Quick Start

Format a Python file using Black: black file.py, or format JavaScript with Prettier: npx prettier --write file.js

Frequently Asked Questions about code-formatting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I format code automatically across my JavaScript and Python projects?

Code formatting with automated tools like Prettier and Black applies consistent style across JavaScript, TypeScript, and Python files. Run `npx prettier --write file.js` for JavaScript or `black file.py` for Python to reformat files automatically without manual editing.

Can I format multiple file types—JSON, Go, and Rust—with a single tool?

External formatters vary by language: Prettier handles JavaScript, TypeScript, and JSON; Black and isort format Python; gofmt handles Go; rustfmt formats Rust. Each tool integrates into your workflow separately, enabling consistent formatting across diverse codebases.

How do I integrate code formatting into CI and pre-commit workflows?

Formatting tools enforce style checks in CI pipelines and pre-commit hooks by running formatters as automated checks. This ensures consistent code quality before commits and prevents style violations from merging into your repository.

Why break large formatting changes into small, atomic edits?

Granular edits of 50–100 lines per change make formatting updates testable and reviewable. Small, atomic commits simplify debugging if issues arise and reduce review friction compared to applying formatting across an entire codebase at once.

What formatters work with my existing project setup?

Prettier integrates with JavaScript and TypeScript projects; Black and isort work with Python codebases; jq formats JSON; gofmt and rustfmt target Go and Rust respectively. Choose formatters matching your project's languages and install them as external CLI tools.

Do I need external formatter tools installed to format code?

Yes, code formatting requires external formatters or CLI tools like Prettier, Black, isort, jq, gofmt, or rustfmt installed in your environment. The Skill integrates these tools to apply formatting and break changes into manageable edits.