home / skills / ehtbanton / claudeskillsrepo / prettier-config-generator
This skill generates a complete Prettier configuration file tailored to your project with consistent formatting across languages.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill prettier-config-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: prettier-config-generator
description: Generate Prettier configuration files for consistent code formatting across JavaScript, TypeScript, CSS, and other file types. Triggers on "create prettier config", "generate prettier configuration", "prettier setup", "code formatting config".
---
# Prettier Config Generator
Generate Prettier configuration files for consistent code formatting.
## Output Requirements
**File Output:** `.prettierrc`, `.prettierrc.js`, or `prettier.config.js`
**Format:** Valid Prettier configuration
**Standards:** Prettier 3.x
## When Invoked
Immediately generate a complete Prettier configuration with formatting rules for the project type.
## Configuration Template
```json
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100,
"bracketSpacing": true,
"arrowParens": "avoid"
}
```
## Example Invocations
**Prompt:** "Create prettier config for TypeScript project"
**Output:** Complete `.prettierrc` with TypeScript-friendly settings.
This skill generates complete Prettier configuration files to enforce consistent code formatting across JavaScript, TypeScript, CSS, and other file types. It outputs ready-to-use files (.prettierrc, .prettierrc.js, or prettier.config.js) tailored for Prettier 3.x and typical project needs. Use the triggers like "create prettier config", "generate prettier configuration", or "prettier setup" to run it.
When invoked, the skill asks (or infers) project details such as language (JavaScript/TypeScript), target file types, and preferred style rules, then produces a validated Prettier configuration file. It follows Prettier 3.x standards and can emit JSON or JavaScript config files with sensible defaults (semi, singleQuote, tabWidth, trailingComma, printWidth, bracketSpacing, arrowParens). The generated file is ready to drop into the project root and integrate with editors, CI, and git hooks.
Which file should I choose: .prettierrc or prettier.config.js?
Use .prettierrc for simple JSON configs and prettier.config.js if you need comments or dynamic logic. Both are supported by Prettier.
Will the generated config work with Prettier 3.x?
Yes. The skill generates settings targeted at Prettier 3.x; verify the installed Prettier version in package.json to avoid mismatches.