← ClaudeAtlas

coldbox-module-developmentlisted

Use this skill when creating reusable ColdBox modules, writing ModuleConfig.cfc, defining module-specific routes, models, settings, and interceptors, packaging modules for ForgeBox, or building internal application sub-systems as modules.
ColdBox/skills · ★ 0 · AI & Automation · score 61
Install: claude install-skill ColdBox/skills
# Module Development ## When to Use This Skill Use this skill when creating ColdBox modules — reusable, self-contained sub-applications with their own routes, handlers, services, and configuration. ## Language Mode Reference Examples use **BoxLang (`.bx`)** syntax by default. Adapt for your target language: | Concept | BoxLang (`.bx`) | CFML (`.cfc`) | |---------|-----------------|---------------| | Class declaration | `class [extends="..."] {` | `component [extends="..."] {` | | DI annotation | `@inject` above `property name="svc";` | `property name="svc" inject="svc";` | | View templates | `.bxm` suffix | `.cfm` / `.cfml` suffix | | Tag prefix | `<bx:if>`, `<bx:output>`, `<bx:set>` | `<cfif>`, `<cfoutput>`, `<cfset>` | > **CFML Compat Mode**: With BoxLang + CFML Compat module, `.bx` and `.cfc` files coexist freely. BoxLang-native classes use `class {}` (`.bx` files); CFML-compat classes use `component {}` (`.cfc` files). ## Core Concepts ColdBox modules: - Live in `modules/` (external) or `modules_app/` (internal) - Have a `ModuleConfig.cfc` for registration and configuration - Have a `box.json` for package metadata - Can declare routes, settings, interceptors, and DI bindings - Can be packaged and distributed on ForgeBox - Are isolated via their own classloader mappings ## Module Directory Structure ``` modules_app/ myModule/ box.json # Package metadata ModuleConfig.cfc # Module registration config/ Router.cfc