Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By jeremylongshorev2.27.0MITIn 1 marketplace
Formats code with Prettier on demand or automatically after each Claude Write or Edit, and checks formatting without changing files. Requires Node.js and jq; Prettier can run through npx without a global install.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
1 caution to review before installing
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
code-formatting, code-style, auto-format, format-check, pre-commit, linting, formatting, automation ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A comprehensive code formatting plugin for Claude Code that automatically formats your code using Prettier and other formatting tools. Includes automatic formatting hooks, validation commands, and Agent Skills for intelligent formatting assistance.
/format and /format-check for manual control# Add the marketplace
/plugin marketplace add jeremylongshore/claude-code-plugins
# Install the formatter plugin
/plugin install formatter@claude-code-plugins-plus
The plugin requires Node.js, npm/npx, and jq for native hook-event parsing:
# Check if Node.js is installed
node --version
# Install Prettier globally (optional)
npm install -g prettier
# Or use npx (no installation needed)
npx prettier --version
The plugin automatically formats files after you edit them:
Write or Edit toolFormat files:
# Format all files in project
/format
# Format specific directory
/format src/
# Format specific file
/format src/app.js
# Format with custom config
/format --config .prettierrc.strict src/
Check formatting:
# Check all files
/format-check
# Check specific files
/format-check **/*.js
# Use in CI/CD (exits with error if unformatted)
/format-check || exit 1
The plugin's Agent Skill activates when you mention:
Example:
User: "Please format my JavaScript files"
Claude: [Activates code-formatter skill and formats all JS files]
Create a .prettierrc file in your project:
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100,
"bracketSpacing": true,
"arrowParens": "avoid"
}
Create .prettierignore to skip files:
# Dependencies
node_modules/
vendor/
# Build outputs
dist/
build/
*.min.js
*.min.css
# Generated files
coverage/
*.lock
The plugin's hooks are configured in hooks/hooks.json:
The scripts read the matching group's enabled flag in hooks/hooks.json.
To disable automatic formatting, set the PostToolUse group's enabled to
false. The optional PreToolUse validation stays inert while its flag is
false, before checking Prettier or attempting an npx call. These flags are
controls implemented by this plugin's scripts; Claude Code does not enforce
individual-hook disablement through group-level enabled metadata.
Automatic formatting reads native tool_input.file_path, with
tool_response.filePath as a fallback, only for successful Write/Edit events.
Legacy payload paths remain supported for manual callers. Explicit filename
invocations of validate-format.sh remain available regardless of the optional
hook's enable flag.
The plugin includes two main scripts:
Both scripts are executable and support debug mode:
# Enable debug mode
export FORMATTER_DEBUG=true
# Check logs
tail -f plugins/examples/formatter/logs/formatter.log
To test the plugin installation:
# 1. Check if plugin is installed
/plugin list
# 2. Test format checking
echo 'const x={a:1,b:2}' > test.js
/format-check test.js
# 3. Test formatting
/format test.js
cat test.js # Should show formatted code
# 4. Test Agent Skill
# Just say: "format my code"
7-day copy clicks
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin formatter