home / skills / ehtbanton / claudeskillsrepo / postcss-config-builder
This skill generates a ready-to-use PostCSS configuration with Tailwind and autoprefixer, speeding CSS processing and project setup.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill postcss-config-builderReview the files below or copy the command above to add this skill to your agents.
---
name: postcss-config-builder
description: Generate PostCSS configuration files with plugins for CSS processing, autoprefixing, and optimizations. Triggers on "create postcss config", "generate postcss configuration", "postcss setup", "css processing config".
---
# PostCSS Config Builder
Generate PostCSS configuration files with appropriate plugins for CSS processing.
## Output Requirements
**File Output:** `postcss.config.js` or `postcss.config.cjs`
**Format:** Valid PostCSS configuration
**Standards:** PostCSS 8.x
## When Invoked
Immediately generate a complete PostCSS configuration with plugins for the project needs.
## Configuration Template
```javascript
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
```
## Example Invocations
**Prompt:** "Create postcss config for Tailwind with autoprefixer"
**Output:** Complete `postcss.config.js` with Tailwind and autoprefixer.
This skill generates a ready-to-use PostCSS configuration file tailored to your project needs. It produces valid PostCSS 8.x configs (postcss.config.js or postcss.config.cjs) with commonly used plugins like Tailwind, autoprefixer, cssnano, and other optimizers. The output is immediately usable and follows conventional module.exports format. Use the trigger phrases to create or update a PostCSS setup quickly.
Given a short prompt describing the desired CSS toolchain, the skill selects and composes appropriate PostCSS plugins and writes a complete configuration file. It validates plugin compatibility with PostCSS 8.x and formats the result as module.exports with a plugins object. The generator can include conditional comments or variations (CJS vs. JS) based on your project's module system.
Which filename should I use, postcss.config.js or .cjs?
Use .cjs for CommonJS environments and tools that load config via require. Use .js if your build system supports ESM and you prefer that style.
Does the generated config include production-only optimizers?
Yes — the generator can include cssnano or similar optimizers and annotate them as production-only so you can wrap them in NODE_ENV checks.