Skip to main content
plugin

hooks-formatting — Claude Code plugin: event-driven file formatting

hooks-formatting — a plugin for Claude Code that runs JavaScript and Python formatting automatically on agent hooks — no manual trigger needed. Fires when the agent writes or modifies code.

MIT ★ 3,785 updated 2026-10-25

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add davepoon/buildwithclaude
/plugin install hooks-formatting@buildwithclaude
Open on GitHub

What hooks-formatting does

hooks-formatting integrates with Claude Code and Cursor through the hooks system, which attaches actions to specific points in the agent's cycle. When code is generated or edited in a session, the plugin applies formatting before the file lands in the project.

Two hooks ship with it: format-javascript-files and format-python-files. Each one activates on the relevant event, so JS and Python files come out of every session already formatted.

To install in Claude Code, run /plugin marketplace add davepoon/buildwithclaude first, then /plugin install hooks-formatting@buildwithclaude. The marketplace connection is required before the second command will work.

What it helps with

  • Auto-format JS files after the agent generates them
  • Keep Python code style consistent without running a linter manually
  • Wire formatting into the Claude Code hook lifecycle
  • Remove the separate prettier or black step from a session

Example prompts for the agent

  • Generate a Button.jsx component and format it on save
  • Write a Python CSV parser and make sure it comes out PEP 8 compliant
  • Create several JS modules and apply formatting to all of them

How to install hooks-formatting

Plugin marketplace

/plugin marketplace add davepoon/buildwithclaude
/plugin install hooks-formatting@buildwithclaude

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about hooks-formatting

How do I install hooks-formatting in Claude Code?

Run /plugin marketplace add davepoon/buildwithclaude first, then /plugin install hooks-formatting@buildwithclaude.

What does hooks-formatting do?

It adds two agent hooks — format-javascript-files and format-python-files — that automatically format code whenever the agent creates or changes a file in the session.

Does hooks-formatting work in Cursor as well as Claude Code?

Yes, it supports both Claude Code and Cursor, though the marketplace install commands apply to Claude Code specifically.

Source text

hooks-formatting · MIT
Formatting Hooks - Event-driven automation hooks

© BuildWithClaude Community · MIT · davepoon/buildwithclaude

Similar plugins

All plugins for Automation and no-code: n8n, Zapier, Make →

From the same set235

The whole set →
hooks-security hooks-security is a Claude Code and Cursor plugin for security automation that protects files, controls branch edits, and scans code. ★ 3,785repo stars hooks-performance hooks-performance is a plugin for Claude Code and Cursor that runs scripts and automation when performance metrics or context usage change. ★ 3,785repo stars hooks-notifications The hooks-notifications plugin sends IDE events—errors, operation completions, hook triggers—to Discord, Slack, or Telegram. Track long-running scripts and build failures without keeping an eye on the editor. ★ 3,785repo stars hooks-git hooks-git is a plugin for Claude Code and Cursor that automates Git workflows by staging changed files and structuring commits according to Conventional Commits. ★ 3,785repo stars hooks-development The hooks-development plugin for Claude Code runs event hooks in a project to track changes, create file backups, lint on save and format code. ★ 3,785repo stars hooks-automation hooks-automation adds event-driven automation hooks to your development workflow. Triggers builds, dependency reviews, and chat alerts when project files update. ★ 3,785repo stars commands-workflow-orchestration The commands-workflow-orchestration plugin adds commands for coordinating complex workflows. Use it when a process needs starting, status checks, resuming, or synchronization. ★ 3,785repo stars commands-version-control-git commands-version-control-git is a plugin for Claude Code and Cursor that adds slash commands for Git commits, branches, pull requests, and issue fixes from the editor. It integrates with Husky hooks. ★ 3,785repo stars

Project sponsors

Companies that keep this analytics open