Skip to main content
Glama

AbletonMCP

by chaudepark
README.mdโ€ข7.98 kB
# AI Prompt Generation Workflow Enhanced workflow for converting repository contents into XML files using [Repomix](https://repomix.com) for AI prompt creation. Now with **profile-based size control** to fit AI context windows, improved tooling, better organization, and pnpm support. ## โœจ New Features ### ๐ŸŽฏ Profile-based Generation - **minimal** (< 20KB): Core application files only - perfect for context windows - **core** (< 50KB): Essential application structure including tests - **docs** (< 30KB): Documentation and configuration only - **full** (< 100KB): Complete codebase excluding assets ### ๐Ÿ“Š Size Control & Warnings - Automatic size estimation - Context window compatibility warnings - Pre-generation size checks ## ๐Ÿ—๏ธ Directory Structure ``` prompts/ โ”œโ”€โ”€ package.json # Node.js dependencies (pnpm) โ”œโ”€โ”€ pnpm-lock.yaml # pnpm lockfile โ”œโ”€โ”€ setup.sh # Setup script โ”œโ”€โ”€ config/ # Configuration files โ”‚ โ””โ”€โ”€ repomix.config.json # Repomix configuration โ”œโ”€โ”€ scripts/ # Generation and management scripts โ”‚ โ”œโ”€โ”€ generate.js # Main generation script โ”‚ โ””โ”€โ”€ cleanup.js # File cleanup management โ”œโ”€โ”€ generated/ # Generated XML files โ”‚ โ”œโ”€โ”€ repo_202506021625.xml # Timestamped XML files โ”‚ โ””โ”€โ”€ repo_202506021705.xml # More timestamped files โ””โ”€โ”€ README.md # This file ``` ## ๐Ÿš€ Quick Start ### 1. Setup (One-time) ```bash cd prompts/ pnpm install # or use the setup script ./setup.sh ``` ### 2. Generate Repository XML ```bash # ๐ŸŽฏ NEW: Generate ALL profiles at once (recommended) pnpm run generate # or node scripts/generate.js run # This generates 4 optimized files: # - minimal: 12KB - Core application files only # - core: 43KB - Application structure + tests # - docs: 14KB - Documentation and configuration # - full: 189KB - Complete codebase (may be large) # Generate specific profile only pnpm run generate -- --profile minimal # Just the minimal profile pnpm run generate -- --profile core # Just the core profile # With verbose output for all profiles pnpm run generate -- --verbose # Dry run to see what would be generated pnpm run generate -- --dry-run # Estimate sizes before generation pnpm run generate estimate # All profiles pnpm run generate estimate --profile minimal # Specific profile ``` ### 3. View Available Profiles ```bash # List all available profiles node scripts/generate.js profiles # Output: # minimal - Core application files only (< 20KB) (20KB) # core - Essential application structure (< 50KB) (50KB) # full - Complete codebase excluding assets (< 100KB) (100KB) # docs - Documentation and configuration only (< 30KB) (30KB) ``` ### 4. List Generated Files ```bash # List all generated files (grouped by profile) pnpm run generate list # or node scripts/generate.js list # Filter by specific profile node scripts/generate.js list --profile minimal # Get path to latest file node scripts/generate.js latest --profile minimal ``` ### 4. Get Latest File Path ```bash pnpm run generate latest ``` ## ๐Ÿงน File Management ### Cleanup Old Files ```bash # Basic cleanup (keeps 5 latest, deletes files older than 30 days) pnpm run cleanup # Custom settings pnpm run cleanup -- --keep 10 --max-age 60 --max-size 200 # Dry run to see what would be deleted pnpm run cleanup -- --dry-run # Show statistics pnpm run cleanup stats ``` ### Cleanup Options - `--keep <count>`: Number of latest files to keep (default: 5) - `--max-age <days>`: Maximum age in days (default: 30) - `--max-size <mb>`: Maximum total size in MB (default: 100) - `--dry-run`: Preview deletions without executing - `--verbose`: Show detailed output ## ๐Ÿ“Š Enhanced Features ### Advanced Configuration The [`repomix.config.json`](config/repomix.config.json:1) provides: - Custom ignore patterns for better file filtering - Security checks to prevent sensitive data exposure - File size limits and optimization settings - Enhanced XML output formatting ### Improved File Management - **Automatic cleanup**: Prevents disk space issues - **File statistics**: Size, age, and metadata tracking - **Smart retention**: Keeps important files, removes old ones - **Progress reporting**: Verbose output with file information ### AI Prompt Templates Ready-to-use prompt patterns for: - Code quality reviews - Security audits - Performance analysis - Feature implementation guidance - Bug investigation ## ๐Ÿ’ก AI Prompt Usage ### 1. Generate XML ```bash cd prompts/ pnpm run generate ``` ### 2. Create Your Prompt Use these common prompt patterns based on your needs: - Code Quality Review - Feature Implementation - Bug Investigation - Performance Analysis - Security Audit ### 3. Copy Content ```bash # Copy latest XML to clipboard (macOS) cat generated/repo_202506021705.xml | pbcopy # View file info ls -la generated/ ``` ## ๐Ÿ”ง Configuration Details ### Repomix Configuration Key settings in [`config/repomix.config.json`](config/repomix.config.json:1): - **Output format**: XML with line numbers and headers - **Security filtering**: Prevents credential exposure - **File exclusions**: Ignores logs, dependencies, temporary files - **Size limits**: Prevents oversized outputs ### Ignored Patterns Automatically excludes: - Dependencies (`node_modules/`, `vendor/bundle/`) - Generated files (`*.lock`, `db/schema.rb`) - Logs and temporary files (`log/`, `tmp/`) - Environment files (`.env.*`, `config/master.key`) - Build artifacts (`.terraform/`, `coverage/`) ## ๐Ÿ“ˆ Migration Benefits ### From Bash to Node.js/pnpm - โœ… **Faster execution**: pnpm package resolution - โœ… **Better error handling**: Detailed error messages and stack traces - โœ… **Enhanced features**: File statistics, cleanup automation - โœ… **Cross-platform**: Works on Windows, macOS, Linux - โœ… **Maintainable**: Modular, testable code structure ### Improved Organization - โœ… **Separated concerns**: Config, scripts, templates, generated files - โœ… **Template system**: Ready-to-use AI prompt examples - โœ… **Automated cleanup**: Prevents disk space issues - โœ… **Better documentation**: Clear usage examples and options ## ๐Ÿ” File Statistics Generated XML files include: - Complete repository structure and content - File metadata and statistics - Security scan results - Token count estimates for AI models ## ๐Ÿ“ Best Practices ### Security - โš ๏ธ **Review generated XML** before sharing - โš ๏ธ **Check for sensitive data** (API keys, passwords) - โœ… **Use security filtering** (enabled by default) - โœ… **Keep .gitignore updated** for exclusions ### Performance - ๐Ÿ”ง **Regular cleanup**: Run cleanup weekly - ๐Ÿ”ง **Monitor file sizes**: Large repositories may need filtering - ๐Ÿ”ง **Use dry-run first**: Test settings before generation - ๐Ÿ”ง **Optimize ignore patterns**: Add project-specific exclusions ### AI Prompting - ๐Ÿ“ **Use specific templates** for better results - ๐Ÿ“ **Include context** about your goals - ๐Ÿ“ **Split large files** if needed for AI model limits - ๐Ÿ“ **Reference line numbers** when discussing specific code ## ๐Ÿ†˜ Troubleshooting ### Common Issues 1. **"repomix not found"**: Run `pnpm install` in `prompts/` directory 2. **Permission errors**: Check file permissions on generated files 3. **Large file sizes**: Adjust ignore patterns in config 4. **Script execution errors**: Ensure Node.js scripts have proper permissions ### Getting Help ```bash # Show command help node scripts/generate.js --help node scripts/cleanup.js --help # Show file statistics pnpm run cleanup stats # Verbose output for debugging pnpm run generate -- --verbose ``` ## ๐Ÿ”— References - [Repomix Documentation](https://repomix.com/guide/configuration) - [pnpm Documentation](https://pnpm.io/) - [Node.js File System API](https://nodejs.org/api/fs.html)

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chaudepark/ableton-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server