frappe-agent-architect
Use when designing multi-app Frappe architectures, deciding whether to split functionality into separate apps, or implementing cross-app communication…
Use when configuring frontend asset bundling, migrating from build.json (v14) to esbuild (v15+), or troubleshooting SCSS/CSS compilation. Prevents build failures from mixing v14 and v15 build systems and misconfigured asset pipelines. Covers esbuild configuration (v15+),
$ npx -y skills add Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-ops-frontend-build --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/frappe-ops-frontend-buildContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when configuring frontend asset bundling, migrating from build.json (v14) to esbuild (v15+), or troubleshooting SCSS/CSS compilation. Prevents build failures from mixing v14 and v15 build systems and misconfigured asset pipelines. Covers esbuild configuration (v15+),
name: frappe-ops-frontend-build description: > Use when configuring frontend asset bundling, migrating from build.json (v14) to esbuild (v15+), or troubleshooting SCSS/CSS compilation. Prevents build failures from mixing v14 and v15 build systems and misconfigured asset pipelines. Covers esbuild configuration (v15+), build.json (v14), asset bundling, SCSS compilation, bundle.js setup, bench build flags. Keywords: esbuild, build.json, frontend build, SCSS, CSS, asset bundling, bench build, bundle.js, webpack, build error, assets not loading, CSS not updating, JS not compiling, bench build fails.. license: MIT compatibility: "Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16." metadata: author: OpenAEC-Foundation version: "2.0"
Complete reference for Frappe's frontend asset bundling pipeline, from build configuration to production optimization.
**Versions**: v14 (build.json) / v15+ (esbuild)
---
| Task | Command | |------|---------| | Build all apps | `bench build` | | Build specific app | `bench build --app myapp` | | Build multiple apps | `bench build --apps frappe,erpnext` | | Production build (minified) | `bench build --production` | | Force rebuild | `bench build --force` | | Watch mode (auto-rebuild) | `bench watch` | | Hard link assets | `bench build --hard-link` |
---
Which build system?
├── Frappe v14?
│ └── build.json — Concatenation-based bundling
├── Frappe v15+?
│ └── esbuild — ES module bundling with *.bundle.* convention
└── Migrating v14 → v15?
└── Replace build.json with *.bundle.* files in public/---
The v15+ build system uses esbuild for fast ES module bundling. It automatically discovers bundle entry points by scanning the `public/` directory for files matching `*.bundle.{js|ts|css|scss|sass|less|styl}`.
**How it works:**
1. `bench build` scans each app's `public/` directory recursively 2. Files matching `*.bundle.*` are treated as entry points 3. esbuild compiles, bundles, and optionally minifies each entry point 4. Output goes to `assets/dist/[app]/js/` or `assets/dist/[app]/css/` 5. Filenames include content hashes for cache-busting: `main.bundle.HASH.js`
**Supported file types:**
The v14 system uses `build.json` in the app root to define concatenation rules.
{
"js/myapp.min.js": [
"public/js/file1.js",
"public/js/file2.js"
],
"css/myapp.min.css": [
"public/css/style1.css",
"public/css/style2.css"
]
}**NEVER** use `build.json` in v15+ — it is ignored by the esbuild pipeline.
---
Place files in your app's `public/` directory with the `.bundle.` naming convention:
myapp/
└── public/
├── js/
│ └── myapp.bundle.js # → dist/myapp/js/myapp.bundle.HASH.js
├── css/
│ └── myapp.bundle.scss # → dist/myapp/css/myapp.bundle.HASH.css
└── components/
└── widget.bundle.js # → dist/myapp/js/widget.bundle.HASH.js// myapp/public/js/myapp.bundle.js
import { createApp } from "vue";
import MyComponent from "./components/MyComponent.vue";
// ES6 imports are resolved by esbuild
import "../css/myapp.bundle.scss";
// npm packages (installed via yarn) can be imported directly
import dayjs from "dayjs";
createApp(MyComponent).mount("#myapp-root");| Input | Output | |-------|--------| | `public/js/main.bundle.js` | `assets/dist/[app]/js/main.bundle.[hash].js` | | `public/css/style.bundle.scss` | `assets/dist/[app]/css/style.bundle.[hash].css` | | `public/deep/nested/file.bundle.ts` | `assets/dist/[app]/js/file.bundle.[hash].js` |
---
# hooks.py — loads in /app (Desk) app_include_js = "myapp.bundle.js" app_include_css = "myapp.bundle.css" # Multiple files app_include_js = ["myapp.bundle.js", "extra.bundle.js"] app_include_css = ["myapp.bundle.css", "extra.bundle.css"]
# hooks.py — loads on web pages (portal) web_include_js = "myapp-web.bundle.js" web_include_css = "myapp-web.bundle.css"
# hooks.py — loads on specific Desk pages
page_js = {"page_name": "public/js/custom_page.js"}# hooks.py — loads on specific Web Forms
webform_include_js = {"ToDo": "public/js/custom_todo.js"}
webform_include_css = {"ToDo": "public/css/custom_todo.css"}---
<!-- Include script with correct hash -->
{{ include_script("myapp.bundle.js") }}
<!-- Include stylesheet with correct hash -->
{{ include_style("myapp.bundle.css") }}
<!-- Get path string only (no HTML tag) -->
<script src="{{ bundled_asset('myapp.bundle.js') }}"></script>// Load asset on demand (returns Promise)
frappe.require("myapp.bundle.js", () => {
// Asset loaded, initialize component
myapp.init();
});
// Multiple assets
frappe.require(["widget.bundle.js", "widget.bundle.css"], () => {
// Both loaded
});---
60 deterministic Claude AI skills for Frappe Framework & ERPNext v14-v16 development and operations
Repo: Impertio-Studio/Frappe_Claude_Skill_Package
Use when designing multi-app Frappe architectures, deciding whether to split functionality into separate apps, or implementing cross-app communication…
Use when debugging Frappe errors, using bench console for live inspection, analyzing tracebacks, or reading Frappe log files. Prevents wasted debugging time…
Use when receiving vague or unclear ERPNext/Frappe development requests that need interpretation. Transforms requirements like 'make invoice auto-calculate' or…
Use when migrating a Frappe app between major versions, detecting breaking API changes, or resolving post-migration errors. Prevents failed migrations from…
Use when reviewing or validating Frappe/ERPNext code against best practices and common pitfalls. Checks generated code before deployment, validates against all…
Use when building ERPNext/Frappe API integrations (v14/v15/v16) including REST API, RPC API, authentication, webhooks, and rate limiting. Covers external API…