babel
Skill15 starsChanged 2 months agoMITView on GitHub
Expert Babel compiler assistance covering AST transforms, presets (@babel/preset-env, @babel/preset-react), and polyfilling via core-js. Use when transpiling modern ECMAScript/TypeScript for legacy targets.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- dT-Tb-labs/babel-orchestrationtheir own version, first seen Aug 26, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- dT-Tb-labs/babel-orchestration★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 108
Write a Babel visitor plugin:
- Very specific: line 128
Use useBuiltIns: "usage" with core-js to import only the exact polyfills referenced in your source code.
- Very specific: line 129
Prefer babel.config.json over legacy .babelrc for consistent monorepo root-level configuration.
- Very specific: line 131
Use @babel/plugin-transform-runtime to prevent duplicate helper functions across modules.
- Very specific: line 137
Use Babel for type checking.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Babel
Babel is the transpiler that made ES6+ possible. While slower than SWC/esbuild, it remains the most extensible compiler with the largest plugin ecosystem.
When to Use
- JavaScript / TypeScript Transpilation: Compiling modern ESNext, JSX, and TypeScript into backward-compatible JavaScript.
- Custom AST Code Transformations: Developing Babel plugins to automate code instrumentation, stripping, or macro generation.
- Polyfill Injection via core-js: Automatically injecting polyfills for target browser matrices using
@babel/preset-env. - Legacy Framework Support: Maintaining React and Webpack toolchains that depend on Babel transpilation.
Quick Start
// babel.config.json
{
"presets": [
[
"@babel/preset-env",
{
"targets": "> 0.25%, not dead",
"useBuiltIns": "usage",
"corejs": 3
}
],
["@babel/preset-react", { "runtime": "automatic" }],
"@babel/preset-typescript"
]
}Core Concepts
Modern Project Configuration (babel.config.json)
Transpiling modern TypeScript and React for targeted browsers:
{
"presets": [
[
"@babel/preset-env",
{
"targets": "> 0.5%, last 2 versions, not dead",
"useBuiltIns": "usage",
"corejs": "3.38",
"modules": false
}
],
[
"@babel/preset-react",
{
"runtime": "automatic"
}
],
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}Authoring a Custom Babel AST Transformation Plugin
Writing an AST visitor that removes console.log statements in production:
// plugins/babel-plugin-strip-console.js
export default function ({ types: t }) {
return {
name: "strip-console-plugin",
visitor: {
CallExpression(path) {
const callee = path.node.callee;
if (
t.isMemberExpression(callee) &&
t.isIdentifier(callee.object, { name: "console" }) &&
t.isIdentifier(callee.property, { name: "log" })
) {
path.remove();
}
},
},
};
}Executing Babel via CLI
Transpiling directories from command line:
# Compile src/ directory to dist/ with source maps
npx babel src --out-dir dist --extensions ".ts,.tsx,.js" --source-maps inlineCommon Patterns
Custom AST Plugin for Code Transformation
Problem: Stripping proprietary debug statements or injecting telemetry tokens during build time.
Solution: Write a Babel visitor plugin:
module.exports = function ({ types: t }) {
return {
visitor: {
CallExpression(path) {
if (path.get("callee").matchesPattern("console.debug")) {
path.remove();
}
},
},
};
};Best Practices
Do:
- Use
useBuiltIns: "usage"withcore-jsto import only the exact polyfills referenced in your source code. - Prefer
babel.config.jsonover legacy.babelrcfor consistent monorepo root-level configuration. - Evaluate whether modern native build tools (SWC, esbuild, Biome) can replace Babel for 10x-50x faster builds.
- Use
@babel/plugin-transform-runtimeto prevent duplicate helper functions across modules.
Don't:
- Transpile
node_moduleswith Babel unless a third-party package ships untranspiled modern ES features. - Set
modules: "commonjs"if your bundler (Vite, Rollup, Webpack) supports native ES modules. - Use Babel for type checking; use
tsc --noEmitalongside Babel.
Troubleshooting
| Error | Cause | Solution |
SyntaxError: Support for the experimental syntax ... isn't currently enabled | Missing specific Babel plugin or preset for experimental JS feature. | Install and add the required @babel/plugin-proposal-* to config. |
Cannot find module '@babel/core' | Peer dependency @babel/core missing from project root. | Run npm install --save-dev @babel/core. |
Duplicate helper functions in output bundle | Helpers inlined into every file instead of imported. | Install @babel/plugin-transform-runtime and @babel/runtime. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

