Skip to content
Back to skills

Format Cc

ASecurity

Formats Claude Code files with markdownlint, prettier, and shellcheck. Use when user asks to "format my files", "fix markdown formatting", "clean up CLAUDE.md", or "check shell scripts". Auto-fixes markdown, JSON, YAML formatting and analyzes shell script quality.

  • 12 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 26, 2026
toolsshellbashci/cddocumentation

Works with

  • claude code
  • cli
  • mcp

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 3 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add pdugan20/claudelint --skill format-cc --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Format Cc?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Format Cc
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pdugan20-format-cc/badge)](https://www.skillsdirectory.com/skills/pdugan20-format-cc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: format-cc
description: Formats Claude Code files with markdownlint, prettier, and shellcheck. Use when user asks to "format my files", "fix markdown formatting", "clean up CLAUDE.md", or "check shell scripts". Auto-fixes markdown, JSON, YAML formatting and analyzes shell script quality.
version: 1.0.0
argument-hint: "[flags]"
allowed-tools:
  - Bash(claudelint:*)
---

# Format Claude Code Files

Runs `claudelint format` to format Claude Code project files using industry-standard tools:

- **markdownlint** - Markdown structure and formatting
- **prettier** - Code formatting for markdown, JSON, YAML
- **shellcheck** - Shell script analysis

## Usage

```bash
claudelint format --fix $ARGUMENTS
```

## Modes

### Fix Mode (default)

Auto-fix formatting issues:

```bash
claudelint format --fix
```

Or simply:

```bash
claudelint format
```

### Check Mode

Check formatting without making changes:

```bash
claudelint format --check
```

Useful for CI/CD to verify formatting.

## Options

- `--check` - Check formatting without making changes
- `--fix` - Fix formatting issues (default)
- `--verbose` - Show detailed command output

## What Gets Formatted

### Markdown Files

- `CLAUDE.md`
- `.claude/**/*.md`

Tools:

- markdownlint - MD041, MD031, MD032, MD040, MD022
- prettier - Line wrapping, indentation

### JSON Files

- `.claude/**/*.json`
- `.mcp.json`
- `.claude-plugin/**/*.json`

Tool: prettier

### YAML Files

- `.claude/**/*.{yaml,yml}`

Tool: prettier

### Shell Scripts

- `.claude/**/*.sh`
- `.claude/hooks/*`

Tool: shellcheck (analysis only, no auto-fix)

## Examples

Format all Claude files:

```bash
claudelint format --fix
```

Check formatting in CI:

```bash
claudelint format --check
```

Verbose output:

```bash
claudelint format --fix --verbose
```

## Required Tools

Install formatting tools globally or in your project:

### markdownlint

```bash
npm install -g markdownlint-cli
# or
npm install --save-dev markdownlint-cli
```

### prettier

```bash
npm install -g prettier
# or
npm install --save-dev prettier
```

### shellcheck

```bash
brew install shellcheck
# or
npm install -g shellcheck
```

## Configuration

The format command automatically scopes to Claude files only, so it won't conflict with your project's existing formatters.

### Customizing Markdownlint

Create `.markdownlint.json` in your project root:

```json
{
  "default": true,
  "MD013": false,
  "MD033": {
    "allowed_elements": ["kbd", "br"]
  },
  "MD041": true,
  "MD031": true,
  "MD032": true,
  "MD040": true,
  "MD022": true
}
```

`claudelint format` will automatically use this configuration.

### Customizing Prettier

Create `.prettierrc.json` in your project root:

```json
{
  "semi": true,
  "singleQuote": true,
  "printWidth": 100,
  "tabWidth": 2,
  "useTabs": false,
  "arrowParens": "always",
  "endOfLine": "lf",
  "proseWrap": "preserve"
}
```

`claudelint format` will automatically use this configuration.

## Integration

Add to package.json scripts:

```json
{
  "scripts": {
    "format:claude": "claudelint format --fix",
    "format:claude:check": "claudelint format --check",
    "lint:claude": "claudelint check-all"
  }
}
```

Add to pre-commit hooks:

```bash
#!/bin/sh
claudelint format --check
claudelint check-all
```

## Exit Codes

- `0` - All formatting checks passed
- `1` - Formatting issues found

## See Also

- [validate-all](../validate-all/SKILL.md) - Validate Claude files
- [CLI Reference](https://claudelint.com/guide/cli-reference) - Complete CLI documentation

Files in this skill

  • CHANGELOG.md305 B
  • SKILL.md3.5 KB
  • format-cc.sh543 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.