Xpersona
C

Code Formatter

CLAWHUB · Unverified

Code formatting best practices and quick references for Python, JavaScript, JSON, Markdown, and common languages with Prettier, Black, ESLint, and other form... Skill: Code Formatter Owner: terrycarter1985 Summary: Code formatting best practices and quick references for Python, JavaScript, JSON, Markdown, and common languages with Prettier, Black, ESLint, and other form... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-05-17T08:34:56.092Z | user Initial release - Code formatting best practices for Python, JavaScript, JSON, Markdown with Prettier, Black, ESLint, ruff, and

62
Rank
84
Safety
2.5k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 2.5K downloads reported by the source. Last updated 10/9/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17brwfrqyjhbjgadkvar20h8x8492g8:code-formatter
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-terrycarter1985-code-formatter/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

7,429 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: code-formatter
description: Code formatting best practices and quick references for Python, JavaScript, JSON, Markdown, and common languages with Prettier, Black, ESLint, and other formatters. Use when needing to format code, configure linters, or set up code style guidelines.
---

# Code Formatter & Style Guide

Quick references for code formatting tools and style best practices.

---

## 🐍 Python Formatting

### Black (Opinionated Formatter)
```bash
# Install
pip install black

# Format file
black file.py

# Format directory
black src/

# Check without modifying
black --check file.py

# Configuration (pyproject.toml)
[tool.black]
line-length = 88
target-version = ['py310']
```

### isort (Import Sorting)
```bash
# Install
pip install isort

# Sort imports
isort file.py
isort src/

# Black-compatible config
[tool.isort]
profile = "black"
```

### flake8 (Linting)
```bash
# Install
pip install flake8

# Lint
flake8 file.py
flake8 src/

# Config (setup.cfg)
[flake8]
max-line-length = 88
extend-ignore = E203, W503
```

### ruff (Fast Linter & Formatter)
```bash
# Install
pip install ruff

# Lint
ruff check file.py

# Fix automatically
ruff check --fix file.py

# Format
ruff format file.py
```

---

## 💛 JavaScript/TypeScript Formatting

### Prettier
```bash
# Install
npm install -D prettier

# Format
npx prettier --write file.js
npx prettier --write src/

# Check
npx prettier --check file.js

# Config (.prettierrc)
{
  "semi": true,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "es5",
  "printWidth": 80
}

# Ignore (.prettierignore)
node_modules/
build/
dist/
```

### ESLint
```bash
# Install
npm install -D eslint

# Initialize
npx eslint --init

# Lint
npx eslint file.js
npx eslint src/

# Fix
npx eslint --fix file.js

# Config (.eslintrc.js)
module.exports = {
  extends: ['eslint:recommended'],
  parserOptions: { ecmaVersion: 2022 },
  rules: {
    'no-unused-vars': 'warn',
    'no-console': 'warn'
  }
}
```

### Format on Save (VS Code)
```json
// settings.json
{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true,
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[python]": {
    "editor.defaultFormatter": "ms-python.black-formatter"
  }
}
```

---

## 📋 JSON Formatting

### jq
```bash
# Pretty print JSON
jq '.' file.json

# Compact (one line)
jq -c '.' file.json

# Sort keys
jq -S '.' file.json
```

### Prettier for JSON
```bash
npx prettier --write file.json
npx prettier --write *.json
```

### Python json.tool
```bash
python3 -m json.tool file.json
python3 -m json.tool file.json --sort-keys
```

---

## 📝 Markdown Formatting

### Prettier
```bash
npx prettier --write README.md
npx prettier --write docs/
```

### markdownlint
```bash
# Install
npm install -D markdownlint-cli

# Lint
npx markdownlint README.md
npx markdownlint docs/

# Fix
npx markdownlint --fix README.md
```

### Common Rules
- Line length: 80-120 chars
- ATX headers: `# Header` not 

_meta.json

{
  "ownerId": "kn72jmd20ws94jr0p8b3p24wyn82abgj",
  "slug": "code-formatter",
  "version": "1.0.0",
  "publishedAt": 1779006896092
}

skill-card.md

## Description:

Code formatting best practices and quick references for Python, JavaScript, JSON, Markdown, and common languages with Prettier, Black, ESLint, and other formatters.

This skill is ready for commercial/non-commercial use.

## Publisher:

[terrycarter1985](https://clawhub.ai/user/terrycarter1985)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and engineers use this skill to choose and run common formatting, linting, editor, and pre-commit commands for Python, JavaScript, TypeScript, JSON, Markdown, shell, Go, and Rust projects.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Formatter and linter commands can modify many files when run with write or fix options.

Mitigation: Review commands before execution, prefer project-pinned dependencies and committed lockfiles, and run broad formatting changes in a controlled workspace.

Risk: Installing unpinned formatter packages can introduce dependency drift across environments.

Mitigation: Use project package scripts, pinned dependency versions, and existing repository configuration where available.

## Reference(s):

- [Code Formatter ClawHub Release](https://clawhub.ai/terrycarter1985/skills/code-formatter)
- [Black Formatter](https://github.com/psf/black)
- [isort](https://github.com/pycqa/isort)
- [Prettier Pre-commit Mirror](https://github.com/pre-commit/mirrors-prettier)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown with inline shell commands and configuration snippets]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May include formatter, linter, editor, and pre-commit configuration examples.]

## Skill Version(s):

1.0.0 (source: release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Code Formatter and adjacent AI workflows.