jeremylongshore/tons-of-skills-marketplace / plugins/examples/formatter/skills/code-formatter
code-formatter
VerifiedExecute automatically formats and validates code files using Prettier and other formatting tools. Use when users mention "format my code", "fix formatting", "apply code style", "check formatting", "make code consistent", or "clean up code formatting". Handles JavaScript, TypeScript, JSON, CSS, Markdown, and many other file types. Trigger with relevant phrases based on skill purpose.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.9 KB |
| references/errors.md | markdown | 866 B |
| references/examples.md | markdown | 221 B |
| references/implementation.md | markdown | 2.2 KB |
references/errors.md
View on GitHub## Error Handling Reference
Common issues and solutions:
### 1. Prettier Not Found
```bash
# Install globally
npm install -g prettier
# Or use npx (no installation needed)
npx prettier --version
```
### 2. Syntax Errors
```bash
# Validate JavaScript syntax first
npx eslint src/app.js --fix-dry-run
# Check for parsing errors
npx prettier --debug-check src/app.js
```
### 3. Configuration Conflicts
```bash
# Find all config files
find . -name ".prettier*" -o -name "prettier.config.js"
# Use specific config
npx prettier --config ./custom-prettier.json --write src/
```
### 4. Permission Issues
```bash
# Check file permissions
ls -la src/app.js
# Fix permissions if needed
chmod u+w src/app.js
```
---
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |