Bundles-forge scaffolding
Use when generating project structure for new bundle-plugins, adding or removing platform support (Claude Code, Cursor, Codex, OpenCode, Gemini CLI, OpenClaw), updating platform manifests, or migrating hooks and configuration between platforms
git clone https://github.com/OdradekAI/bundles-forge
T=$(mktemp -d) && git clone --depth=1 https://github.com/OdradekAI/bundles-forge "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/scaffolding" ~/.claude/skills/odradekai-bundles-forge-scaffolding && rm -rf "$T"
skills/scaffolding/SKILL.mdScaffolding Bundle-Plugins
Overview
Generate new bundle-plugin projects and manage platform support across their lifecycle. Handles initial project generation (greenfield) and ongoing platform adaptation (add, fix, migrate, remove).
Core principle: Generate only what's needed. Every platform, every file has a reason to exist. This skill generates structure only — it does not run its own scripts. Validation is delegated to
bundles-forge:auditing; version checks to bundles-forge bump-version.
Skill type: Hybrid — follow the generation/adaptation process rigidly, but mode selection and component choices are flexible based on user context.
Announce at start: "I'm using the scaffolding skill to [generate your project / add <platform> support / remove <platform> support / add <component> / remove <component>]."
Entry Detection
Determine the operation based on context:
- Design document provided (from
) → New Project flowbundles-forge:blueprinting - User request + no existing project → New Project flow
- User request + existing project → Platform Adaptation flow (add / fix / migrate / remove)
New Project: Scaffold Layers
For new projects, first select a mode:
- Design document specifies the mode (minimal or intelligent)
- Direct invocation — choose between:
- intelligent — recommend architecture based on user description, avoid unnecessary components
- custom — present the full architecture option set, ask the user about each component
Minimal Mode (quick packaging)
Lean plugin for marketplace distribution:
| File | Purpose |
|---|---|
| Plugin identity and metadata |
| One directory per skill |
| Installation instructions and skill catalog |
| Default MIT unless specified |
No hooks, no bootstrap, no version infrastructure. Add these later by re-running scaffolding in platform adaptation mode.
Intelligent Mode
Core
Generated for all intelligent-mode projects regardless of platform selection:
| File | Purpose |
|---|---|
| Project identity and version |
| Installation per platform, skill catalog |
| Default MIT unless specified |
| node_modules, .worktrees, OS files |
| Version sync manifest |
| One directory per skill |
Platform Adapters (selected platforms only)
| Platform | Files |
|---|---|
| Claude Code | , , , |
| Cursor | , , |
| Codex | , |
| OpenCode | , |
| Gemini CLI | , |
For platform-specific wiring details, read
references/platform-adapters.md.
Bootstrap (if requested)
| File | Purpose |
|---|---|
| Meta-skill: instruction priority, skill routing table |
| Per-platform tool mappings |
Optional Components (only if specified)
| Component | Files | When to Include |
|---|---|---|
| Executables | | Skills reference CLI tools (see decision tree) |
| MCP servers | | Skills need external service integration (see decision tree) |
| LSP servers | | Skills involve language-specific code intelligence (see LSP section) |
| Output styles | | Custom output formatting (see Output Styles section) |
| Default settings | | Default agent activation (see Default Settings section) |
| User configuration | in | Skills need user-provided API keys, endpoints, or tokens — Claude Code only (see userConfig section) |
| Marketplace entry | | Plugin targets marketplace distribution — declares plugin metadata for the marketplace index |
New Project: Generation Process
Minimal mode:
- Create plugin manifest from
templateassets/platforms/claude-code/plugin.json - Generate skill directories — one per skill
- Generate README + LICENSE
+ initial commit; validate manifest JSONgit init
Intelligent mode:
Phase 1 — Load context:
- Read template index — load
references/scaffold-templates.md - Read templates — load from
(infrastructure, docs, bootstrap)assets/ - Read platform templates — load from
assets/platforms/<platform>/ - Read anatomy — load
references/project-anatomy.md
Phase 2 — Generate: 5. Replace placeholders — substitute
<project-name>, <author-name>, etc.
6. Generate per-platform — only create files for target platforms
7. Generate skill stubs — one directory per skill
8. Generate bootstrap — if requested, create meta-skill with routing table
10. Generate optional components — only what the design specifies. For MCP servers, use assets/mcp-json.md template and consult references/external-integration.md for transport selection and platform differences. When userConfig is specified, add the userConfig field to plugin.json with appropriate sensitive flags. When marketplace distribution is specified, generate .claude-plugin/marketplace.json with plugin metadata. When CI validation is specified, generate .github/workflows/validate-plugin.yml from template
Phase 3 — Finalize: 11.
git init + initial commit; run bundles-forge bump-version --check
Platform Adaptation: Existing Projects
Adding a Platform
- Detect current platforms — scan for existing manifests (see detection table in
)references/platform-adapters.md - Identify target — read
for wiring detailsreferences/platform-adapters.md - Generate adapter files — from
, replaceassets/platforms/<platform>/
placeholders<project-name> - Update version sync — add version-bearing manifests to
.version-bump.json - Update hooks — if platform uses session hooks, ensure
(Bash) handles its JSON format viasession-start
. For custom hooks beyond SessionStart, readrun-hook.cmdreferences/hooks-configuration.md - Update documentation — add install section to README; create platform-specific docs if needed
- Verify — validate manifests,
, test hooksbundles-forge bump-version --check
Removing a Platform
- Delete manifest files — remove the platform's manifest directory or file
- Update
— remove entries for deleted manifests.version-bump.json - Clean hooks — delete platform-specific hook files; simplify
if branches removedsession-start - Update documentation — remove install section from README and platform-specific docs
- Verify —
; run inspector validationbundles-forge bump-version --check
Adding Optional Components
Add MCP servers, CLI executables, LSP servers, userConfig, output styles, or default settings to an existing project:
- Determine component type — read
decision tree to choose the right integration levelreferences/external-integration.md - Generate component files — create the corresponding file(s) at their default location (
,.mcp.json
,.lsp.json
,output-styles/
, orsettings.json
inuserConfig
)plugin.json - Update plugin manifests — add component declarations to
for platforms that require explicit paths (Cursor). For Claude Code, convention-based discovery handles most components automaticallyplugin.json - Update skill references — add
frontmatter for new CLI/MCP tools, addallowed-tools
references where skills need user-provided values${user_config.KEY} - Update README — add setup instructions for the new component (especially MCP server config for non-Claude Code platforms, LSP binary installation)
- Verify — run inspector validation to confirm structural integrity
Removing Optional Components
Remove MCP servers, CLI executables, or LSP servers from an existing project. Read
references/external-integration.md "Optional Component Removal" section for step-by-step instructions covering:
- Removing MCP servers (
,.mcp.json
, skill references, README)plugin.json mcpServers - Removing CLI executables (
,bin/
, skill body)allowed-tools - Removing LSP servers (
, README).lsp.json - Downgrading MCP to CLI (replace MCP with lighter CLI alternative)
Post-Action Validation
Step 1 — Deterministic checks (script): Run
bundles-forge audit-skill <target-dir> to verify structure, manifests, version sync, and frontmatter. Review any critical or warning findings before proceeding.
Step 2 — Semantic inspection (agent): Dispatch the
inspector agent (agents/inspector.md) for semantic validation that scripts cannot cover (template quality, hook logic coherence, design alignment). The inspector adjusts scope based on context:
- New project → full inspection (template quality, optional components, hook semantics, design coherence)
- Platform adaptation → focused inspection (hook semantics and template quality for affected platforms)
If subagent dispatch is unavailable: Ask — "Subagents are not available. Run validation inline?" If confirmed, read
agents/inspector.md and follow its instructions within this conversation, then report PASS/FAIL.
Common Mistakes
| Mistake | Fix |
|---|---|
| Generating all platforms regardless of design | Only create files for selected platforms |
Forgetting entries | Every version-bearing manifest needs an entry |
| Hardcoding author in templates | Pull from git config or ask |
Missing or in hook config | Claude Code uses ; Cursor runs directly; both require bash |
| Bootstrap skill > 200 lines | Keep lean — extract to |
| Wrong hook format (PascalCase vs camelCase) | Claude Code: , Cursor: |
| Copying template without customizing | Replace every placeholder |
| Using intelligent mode infrastructure for minimal | Minimal mode avoids over-engineering |
| Using MCP when CLI suffices | Consult decision tree — prefer CLI for stateless, single-shot tools |
Using paths to reference files outside the plugin | After marketplace install, plugins are cached — paths break. Keep all files within the plugin root |
Writing persistent data to | changes on each update. Use for caches, installed dependencies, and generated state |
Inputs
(optional) — fromdesign-document
with project mode, name, platforms, skill inventory, bootstrap strategy, and componentsbundles-forge:blueprinting
(optional) — existing bundle-plugin project root for platform adaptationproject-directory
(optional) — platform to add or removetarget-platform
Outputs
— generated project structure or adapted platform files. Consumed by the orchestrating skill (blueprinting or optimizing) for subsequent phasesscaffold-output
(optional) — validation report ininspector-report.bundles-forge/blueprints/
Integration
Called by:
- bundles-forge:blueprinting — Phase 1 of the new-project pipeline
- bundles-forge:optimizing — Platform Coverage routing for adding new platforms
- User directly — for platform adaptation or ad-hoc project generation
Pairs with:
- bundles-forge:releasing — version infrastructure and sync