home / skills / ehtbanton / claudeskillsrepo / babel-config-builder
This skill helps you generate Babel configuration files for JavaScript/TypeScript projects with presets and plugins tailored to your target environment.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill babel-config-builderReview the files below or copy the command above to add this skill to your agents.
---
name: babel-config-builder
description: Generate Babel configuration files for JavaScript/TypeScript transpilation with presets and plugins. Triggers on "create babel config", "generate babel configuration", "babel setup", "transpilation config".
---
# Babel Config Builder
Generate Babel configuration files for JavaScript transpilation with appropriate presets and plugins.
## Output Requirements
**File Output:** `babel.config.js`, `babel.config.json`, or `.babelrc`
**Format:** Valid Babel 7 configuration
**Standards:** Babel 7.x
## When Invoked
Immediately generate a complete Babel configuration with presets for the target environment and necessary plugins.
## Configuration Template
```javascript
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
['@babel/preset-react', { runtime: 'automatic' }],
],
plugins: [
'@babel/plugin-transform-runtime',
],
};
```
## Example Invocations
**Prompt:** "Create babel config for React TypeScript"
**Output:** Complete `babel.config.js` with React, TypeScript presets.
This skill generates complete Babel 7 configuration files for JavaScript and TypeScript projects, including presets and common plugins. It outputs ready-to-use files such as babel.config.js, babel.config.json, or .babelrc tailored to the target environment and framework (React, Node, etc.). The configuration follows Babel 7 standards and is suitable for modern tooling and build pipelines.
When triggered, the skill inspects the requested target (browser, Node, React, TypeScript) and produces a valid Babel config with appropriate presets and plugin options. It can emit different file formats (CommonJS JS file, JSON file, or .babelrc) and includes sensible defaults like @babel/preset-env and transform runtime. The output is minimal, practical, and intended to be dropped into the project root.
Which file format should I pick?
Use babel.config.js for monorepos or when you need dynamic logic; use .babelrc or babel.config.json for simple, static project configs.
Should I include TypeScript preset and type checking?
@babel/preset-typescript strips types during transpilation but does not do type checking. Keep a separate tsc or ESLint type-check step for validation.