Overview
The Impeccable build system transforms feature-rich source files into provider-specific formats. It’s built with Bun for fast performance and uses zero external dependencies.Architecture
The build system is modular and focused:Build Commands
Build Process
The build follows these steps:1. Build Static Assets
- Tailwind CLI for CSS compilation (handles
@themedirective) - Bun’s built-in bundler for HTML/JS
- Minification and source maps
2. Read Source Files
source/skills/*.md- Skill definitionssource/commands/*.md- Command definitions
3. Transform for Each Provider
4. Create Prefixed Versions
/i-audit) to avoid conflicts.
5. Assemble Universal Bundles
6. Create ZIP Bundles
7. Sync to Local Development
.claude/ for local development.
Core Utilities
parseFrontmatter(content)
Extracts YAML frontmatter and body from a markdown file:readSourceFiles(rootDir)
Recursively reads all source files:writeFile(filePath, content)
Writes content to a file, creating directories as needed:Transformer Pattern
Each provider has a dedicated transformer function:Provider-Specific Details
Cursor Transformer
Location:scripts/lib/transformers/cursor.js
Output: dist/cursor/.cursor/
Transformations:
- Commands: Strip frontmatter, body only
- Skills: Full Agent Skills standard with YAML frontmatter
Claude Code Transformer
Location:scripts/lib/transformers/claude-code.js
Output: dist/claude-code/.claude/
Transformations:
- Keeps full YAML frontmatter for both commands and skills
- No transformations needed
Gemini Transformer
Location:scripts/lib/transformers/gemini.js
Output: dist/gemini/
Transformations:
- Commands: Convert to TOML format
- Skills: Modular files with
@importsyntax - Transform
{{argname}}→{{args}}
Codex Transformer
Location:scripts/lib/transformers/codex.js
Output: dist/codex/.codex/
Transformations:
- Commands: Custom prompt format with
argument-hint - Skills: Agent Skills standard
- Transform
{{argname}}→$ARGNAME
Output Structure
The build generates:ZIP Generation
Location:scripts/lib/zip.js
Creates ZIP bundles for:
- Individual providers (e.g.,
cursor.zip) - Universal bundles (all providers)
- Prefixed versions
Performance
Bun provides significant performance benefits:- Faster execution: 2-4x faster than Node.js
- Native TypeScript: No compilation needed
- Built-in bundler: Fast HTML/JS/CSS bundling
- Zero dependencies: No node_modules overhead
- Full build: ~2-3 seconds
- Clean rebuild: ~3-4 seconds
Development Tips
Watch Mode
For active development, use:Testing Transformers
Test a single transformer:Debugging
Add console.log statements in transformers:Extending the Build System
Adding a New Provider
- Create transformer:
scripts/lib/transformers/newprovider.js
- Export from registry:
scripts/lib/transformers/index.js
- Call from build:
scripts/build.js
Adding New Source Types
- Define format: Create
source/newtype/directory - Add parser: Update
readSourceFiles()inutils.js - Update transformers: Handle new type in each transformer
Troubleshooting
Build Fails with YAML Parsing Errors
- Check frontmatter indentation (YAML is indent-sensitive)
- Ensure
---delimiters are on their own lines - Verify colons have spaces after them
Output Doesn’t Match Expectations
- Check transformer for your provider
- Verify source file frontmatter structure
- Run
bun run rebuildfor clean build
ZIP Generation Fails
- Ensure output directories exist
- Check file permissions
- Verify ZIP library is working
Performance Issues
- Profile with
console.time()/console.timeEnd() - Check for unnecessary file operations
- Ensure directories are cleaned properly
Related
- Contributing Overview - Getting started
- Architecture - System design
- Adding Content - Adding skills/commands
