Back to Hooks

Format Javascript Files

Hooks post-tool 753 Scanned by NVIDIA SkillSpector

Automatically format JavaScript/TypeScript files after any Edit operation using prettier. This hook runs 'npx prettier --write' on any .js, .ts, .jsx, or .tsx file that Claude modifies, ensuring consistent code formatting. Uses npx so prettier doesn't need to be globally installed. Includes error suppression so it won't fail if prettier is not available.

Install Command
npx claude-code-templates@latest --hook post-tool/format-javascript-files
View on GitHub
claude-code — format-javascript-files

Scanned by NVIDIA SkillSpector

Automated static analysis (no LLM) · v2.12.0 · 2026-10-17

7 observations
scanner score 12/100

SkillSpector looks for patterns such as shell commands, credential access, network calls or unpinned dependencies. An observation is something worth reading in the files before you install, not a confirmed vulnerability. Components that run code locally, like hooks, MCP servers and security tooling, naturally show more of them.

  • Manifest references MCP server without version pin: 'npx prettier'.
    MCP Rug Pull · SKILL.md:1
  • Manifest references MCP server without version pin: 'npx so'.
    MCP Rug Pull · SKILL.md:1
  • MCP server referenced without pinned version: 'npx prettier'.
    MCP Rug Pull · SKILL.md:3
  • MCP server referenced without pinned version: 'npx prettier'. ×2
    MCP Rug Pull · format-javascript-files.json:2
  • MCP server referenced without pinned version: 'npx so'.
    MCP Rug Pull · SKILL.md:3

Showing 6 of 7 observations. Learn more about NVIDIA SkillSpector.

Content

JSON
{
"description": "Automatically format JavaScript/TypeScript files after any Edit operation using ..."
"hooks": {
"PostToolUse": [1 item]
}
}

Stack Builder

0 components

Your stack is empty

Browse components and click the + button to add them to your stack for easy installation.