Back to skills
SkillHub ClubShip Full StackFull Stack

postcss-config

Imported from https://github.com/metasaver/metasaver-marketplace.

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
0
Hot score
74
Updated
March 20, 2026
Overall rating
C2.4
Composite score
2.4
Best-practice grade
A92.0

Install command

npx @skill-hub/cli install metasaver-metasaver-marketplace-postcss-config

Repository

metasaver/metasaver-marketplace

Skill path: plugins/metasaver-core/skills/config/build-tools/postcss-config

Imported from https://github.com/metasaver/metasaver-marketplace.

Open repository

Best for

Primary workflow: Ship Full Stack.

Technical facets: Full Stack.

Target audience: everyone.

License: Unknown.

Original source

Catalog source: SkillHub Club.

Repository owner: metasaver.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install postcss-config into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/metasaver/metasaver-marketplace before adding postcss-config to shared team environments
  • Use postcss-config for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: postcss-config
description: PostCSS configuration template and validation logic for Tailwind CSS processing with Autoprefixer. Includes 4 required standards (required base plugins, critical plugin order with tailwindcss first and autoprefixer last, file naming as postcss.config.js, required dependencies). Use when creating or auditing postcss.config.js files to ensure correct CSS build pipeline.
---

# PostCSS Configuration Skill

This skill provides postcss.config.js template and validation logic for CSS processing configuration.

## Purpose

Manage postcss.config.js configuration to:

- Configure Tailwind CSS processing
- Set up Autoprefixer for browser compatibility
- Ensure consistent CSS build pipeline
- Maintain correct plugin order

## Usage

This skill is invoked by the `postcss-agent` when:

- Creating new postcss.config.js files
- Auditing existing PostCSS configurations
- Validating PostCSS against standards

## Template

The standard PostCSS template is located at:

```
templates/postcss.config.template.js
```

## The 4 PostCSS Standards

### Rule 1: Required Base Plugins

Must include both required plugins:

- `tailwindcss` - Tailwind CSS processing
- `autoprefixer` - Browser prefix automation

### Rule 2: Plugin Order (CRITICAL)

Plugins must be in this exact order:

1. `tailwindcss` - FIRST
2. `autoprefixer` - LAST

✅ **ALWAYS**: Use Tailwind first, Autoprefixer last (reversed order causes CSS processing errors)

### Rule 3: File Naming

Must be named exactly `postcss.config.js`:

- ALWAYS use `.js` extension (not `.ts` or `.mjs`)
- Vite expects `postcss.config.js`

### Rule 4: Required Dependencies

Must have in package.json devDependencies:

```json
{
  "devDependencies": {
    "postcss": "^8.4.0",
    "tailwindcss": "^3.4.0",
    "autoprefixer": "^10.4.0"
  }
}
```

## Validation

To validate a postcss.config.js file:

1. Check that file exists at workspace root
2. Read package.json for dependencies
3. Parse config and check plugin array
4. Verify plugin order (tailwindcss first, autoprefixer last)
5. Check all required dependencies exist
6. Report violations

### Validation Approach

```javascript
// Rule 1: Check required plugins
const hasTailwind = plugins.some(
  (p) => p === "tailwindcss" || p.includes("tailwindcss"),
);
const hasAutoprefixer = plugins.some(
  (p) => p === "autoprefixer" || p.includes("autoprefixer"),
);

// Rule 2: Check plugin order
const tailwindIndex = plugins.findIndex(
  (p) => p === "tailwindcss" || p.includes("tailwindcss"),
);
const autoprefixerIndex = plugins.findIndex(
  (p) => p === "autoprefixer" || p.includes("autoprefixer"),
);

if (tailwindIndex > autoprefixerIndex) {
  errors.push("Rule 2: autoprefixer must be last plugin (after tailwindcss)");
}

// Rule 4: Check dependencies
const deps = packageJson.devDependencies || {};
if (!deps.postcss) errors.push("Rule 4: Missing postcss in devDependencies");
if (!deps.tailwindcss)
  errors.push("Rule 4: Missing tailwindcss in devDependencies");
if (!deps.autoprefixer)
  errors.push("Rule 4: Missing autoprefixer in devDependencies");
```

## Repository Type Considerations

- **Consumer Repos**: Must strictly follow all 4 standards unless exception declared
- **Library Repos**: May have additional plugins for component library needs (e.g., postcss-import)

### Exception Declaration

Consumer repos may declare exceptions in package.json:

```json
{
  "metasaver": {
    "exceptions": {
      "postcss-config": {
        "type": "custom-plugins",
        "reason": "Requires postcss-import for component library structure"
      }
    }
  }
}
```

## Best Practices

1. Place postcss.config.js at workspace root (where package.json is)
2. Use template as starting point
3. Keep plugin order: tailwindcss → autoprefixer
4. Include PostCSS in devDependencies
5. Re-audit after making changes
6. Minimal configuration - only what's needed

## Integration

This skill integrates with:

- Repository type provided via `scope` parameter. If not provided, use `/skill scope-check`
- `/skill audit-workflow` - Bi-directional comparison workflow
- `/skill remediation-options` - Conform/Update/Ignore choices
- `tailwind-agent` - Tailwind CSS configuration coordination
postcss-config | SkillHub