AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Code Formatter

skill-prasad-nimbalkar-claude-agent-skills-code-formatter · by prasad-nimbalkar

Use this skill when asked to format, lint, clean up, or standardize code style. Triggers: 'format this code', 'lint this', 'fix the style', 'make this PEP8 compliant', 'prettify this', 'clean up the formatting'. Supports Python, JavaScript/TypeScript, Go, Rust, SQL, JSON, YAML, HTML, CSS.

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-prasad-nimbalkar-claude-agent-skills-code-formatter

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-prasad-nimbalkar-claude-agent-skills-code-formatter)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Code Formatter? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Code Formatter

Why this skill exists

Every language has a canonical formatter. Using the wrong tool (or formatting by hand) produces inconsistent results. This skill routes to the right formatter for each language and handles common installation issues.

When to use

  • User pastes code and wants it formatted/cleaned up
  • User uploads a file and asks for style fixes
  • User wants code to conform to a specific style guide

Step-by-step procedure

Step 1 — Detect language

# If a file is provided
file /mnt/user-data/uploads/code_file
# or check extension: .py .js .ts .go .rs .sql .json .yaml .html .css

Step 2 — Format by language

Python → black + isort

pip install black isort --break-system-packages -q

# Format in place
black /mnt/user-data/uploads/script.py
isort /mnt/user-data/uploads/script.py

# Preview changes without writing (check mode)
black --check --diff /mnt/user-data/uploads/script.py

Also run flake8 for lint issues:

pip install flake8 --break-system-packages -q
flake8 /mnt/user-data/uploads/script.py --max-line-length=88

JavaScript / TypeScript → prettier

npm install -g prettier --silent
prettier --write /mnt/user-data/uploads/script.js
prettier --write /mnt/user-data/uploads/component.tsx

Go → gofmt

gofmt -w /mnt/user-data/uploads/main.go
# Show diff only (no write):
gofmt -d /mnt/user-data/uploads/main.go

Rust → rustfmt

rustfmt /mnt/user-data/uploads/main.rs

SQL → sqlfluff

pip install sqlfluff --break-system-packages -q
sqlfluff fix /mnt/user-data/uploads/query.sql --dialect postgres
# Dialects: ansi, postgres, mysql, bigquery, snowflake, sqlite

JSON → jq or python

# Pretty print
jq . /mnt/user-data/uploads/data.json > /mnt/user-data/outputs/data_formatted.json

# Python (handles edge cases better)
python3 -c "
import json, sys
with open('/mnt/user-data/uploads/data.json') as f:
    data = json.load(f)
with open('/mnt/user-data/outputs/data_formatted.json', 'w') as f:
    json.dump(data, f, indent=2, ensure_ascii=False)
print('Done')
"

YAML → yamllint + yq

pip install yamllint --break-system-packages -q
yamllint /mnt/user-data/uploads/config.yaml

# Format/normalize with yq
yq eval '.' /mnt/user-data/uploads/config.yaml > /mnt/user-data/outputs/config_formatted.yaml

HTML / CSS → prettier

prettier --write /mnt/user-data/uploads/index.html
prettier --write /mnt/user-data/uploads/styles.css

Step 3 — Copy result to outputs

cp /mnt/user-data/uploads/script.py /mnt/user-data/outputs/script_formatted.py
echo "Formatted file ready for download"

Step 4 — Report changes

Always tell the user:

  • What formatter was used and version
  • What changed (lines modified, errors fixed)
  • Any remaining lint warnings that require manual fixes
# Show what changed
diff /mnt/user-data/uploads/original.py /mnt/user-data/outputs/script_formatted.py

Edge cases

| Situation | Fix | |-----------|-----| | Formatter not installed | Install inline with pip/npm as shown above | | Syntax error prevents formatting | Report the error location; don't format broken code | | User has custom config (.prettierrc, pyproject.toml) | Ask if they want to upload it; use it if provided | | Mixed language file (e.g., JSX) | Use prettier with --parser babel flag | | Very long lines user wants to keep | black --line-length 120 or prettier --print-width 120 | | SQL dialect unknown | Default to ansi; ask user if result looks wrong |

Output format

Formatted with: black 24.x + isort 5.x
Changes: 47 lines reformatted, 3 imports reordered
Warnings: 2 lines exceed 88 chars (E501) — manual review needed
Output: /mnt/user-data/outputs/script_formatted.py

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.