| name | ai-file-analyzer |
| description | Analyze Adobe Illustrator (.ai) files to extract design information including text content, fonts, color palettes, vector paths, and generate high-resolution preview images. Use when analyzing logo files, design assets, or any Adobe Illustrator documents that need programmatic inspection. |
Adobe Illustrator File Analyzer
Extract comprehensive design information from Adobe Illustrator (.ai) files including text, fonts, colors, and visual previews.
When to Use This Skill
Use this skill when:
- Analyzing existing logo files (.ai) to understand design elements
- Extracting brand colors from design files
- Identifying fonts used in artwork
- Generating preview images from Illustrator files without opening Adobe Illustrator
- Understanding the structure and content of .ai files for design decisions
- Preparing design specifications or style guides from source files
How It Works
Adobe Illustrator files (.ai) have been PDF-based since Creative Suite versions. This means .ai files can be read and analyzed using PDF processing libraries like PyMuPDF, without requiring Adobe Illustrator itself.
The analyzer extracts:
- Text content - All text elements and labels
- Font information - Font families and sizes used
- Color palette - All colors with usage frequency
- Preview images - High-resolution PNG previews (300 DPI)
- Metadata - Artboard dimensions, creation info
- Design complexity - Vector paths, images, structure
Quick Start
Install Dependencies
pip install pymupdf pillow
Analyze AI File
python scripts/analyze_ai_file.py <path/to/logo.ai> --output-dir ./analysis
Output Structure
The script creates the following output:
analysis/
├── analysis_report.md # Human-readable summary
├── analysis_data.json # Complete structured data
└── previews/ # High-resolution previews
├── artboard_1_preview.png
├── artboard_2_preview.png
└── ...
Usage in Claude Code
When a user provides an .ai file for analysis:
- Check dependencies: Verify PyMuPDF and Pillow are installed
- Run analyzer: Execute
scripts/analyze_ai_file.pywith the .ai file path - Review outputs: Read the markdown report and JSON data
- Analyze previews: Inspect generated preview images
- Extract insights: Identify key design elements for decision-making
Example workflow:
# Step 1: Analyze the AI file
python scripts/analyze_ai_file.py "existing_logo.ai" --output-dir ./logo_analysis
# Step 2: Read the summary report
cat ./logo_analysis/analysis_report.md
# Step 3: Check the color palette
cat ./logo_analysis/analysis_data.json | grep -A 10 '"colors"'
# Step 4: View preview images
ls ./logo_analysis/previews/
Extracted Information
Text Content
- All text elements from all artboards
- Unique text strings (brand names, slogans, etc.)
- Text organized by artboard
Example output:
{
"unique_texts": ["COMPANY NAME", "Est. 2022", "Quality Products"],
"total_text_elements": 5
}
Font Information
- Font family names
- Font sizes used
- All unique font/size combinations
Example output:
[
["Helvetica-Bold", 48.0],
["Arial-Regular", 12.0],
["CustomFont-Light", 24.0]
]
Color Palette
- Hex color codes (#RRGGBB)
- Usage frequency for each color
- Sorted by most-used colors first
Example output:
[
{"color": "#000000", "occurrences": 25},
{"color": "#ff6600", "occurrences": 12},
{"color": "#ffffff", "occurrences": 8}
]
Artboard Dimensions
- Width and height in points (pt)
- Width and height in millimeters (mm)
- Rotation angle
- Image count
Example output:
{
"artboard_number": 1,
"width": 612.0,
"height": 792.0,
"width_mm": 216.0,
"height_mm": 279.4
}
Preview Images
- PNG format with transparency
- 300 DPI resolution (print-quality)
- One image per artboard
Advanced Features
High-Resolution Previews
The analyzer generates 300 DPI previews, suitable for:
- Print quality inspection
- Design presentations
- Web mockups
- Client presentations
Color Frequency Analysis
Colors are ranked by usage, helping identify:
- Primary brand colors (most used)
- Accent colors (less frequent)
- Unused colors in palette
Design Complexity Score
The analyzer calculates complexity based on:
- Number of vector paths
- Number of text elements
- Number of embedded images
Higher scores indicate more complex designs.
Integration with Logo Design Workflows
Analyzing Existing Brand Logos
When creating a new logo based on existing brand assets:
Extract brand colors:
python scripts/analyze_ai_file.py "old_logo.ai" --output-dir ./brand_analysis # Review analysis_data.json for color paletteIdentify typography:
# Check fonts section in analysis_report.md cat ./brand_analysis/analysis_report.md | grep -A 20 "## Fonts Used"Review design elements:
# View preview images open ./brand_analysis/previews/artboard_1_preview.pngUse findings for new design:
- Maintain brand colors from palette
- Consider existing typography style
- Reference design complexity level
Brand Guidelines Extraction
For logo design contests requiring brand adherence:
- Analyze existing logo file
- Extract official brand colors → Use in new design
- Identify font styles → Match typography approach
- Review design simplicity → Maintain brand consistency
Troubleshooting
File Not Recognized
If the analyzer fails to open the .ai file:
# Verify file integrity
file logo.ai
# Check if it's truly a PDF-based AI file
pymupdf logo.ai
Older .ai files (pre-CS) may use EPS format and require conversion.
Missing Color Information
If few colors are detected:
- Colors may be defined as vector fill/stroke (not text)
- Consider manual inspection of preview images
- Some colors might be in embedded images
Large File Size
For very large .ai files (>50MB):
- Processing may take longer
- Preview generation is memory-intensive
- Consider processing individual artboards
Technical Details
Why PyMuPDF?
PyMuPDF (fitz) is ideal for .ai files because:
- ⚡ Fast performance (C++ backend)
- 📄 Native PDF handling (AI files are PDF-based)
- 🖼️ High-quality image rendering
- 💾 Low memory footprint
- 🔧 No external dependencies (like Ghostscript)
AI File Format Background
Since Adobe Creative Suite (CS):
- .ai files contain embedded PDF
- PDF portion is readable by standard PDF tools
- Proprietary AI data is in separate layer
- PyMuPDF accesses the PDF layer
Limitations
What the analyzer can extract:
- ✅ Text content and fonts
- ✅ Basic color information
- ✅ Artboard dimensions
- ✅ Visual previews (raster)
- ✅ Embedded images
What the analyzer cannot extract:
- ❌ Editable vector paths (proprietary format)
- ❌ Layer structure (AI-specific)
- ❌ Blend modes and effects (AI-specific)
- ❌ Symbols and brushes (AI-specific)
For full editing capabilities, Adobe Illustrator is still required.
Example Outputs
Logo Analysis for Contest
# AI File Analysis Report
## File Information
- **Filename**: company_logo.ai
- **Artboards**: 2
- **Creator**: Adobe Illustrator 27.0
- **Created**: 2024-08-02
## Artboards
### Artboard 1
- **Dimensions**: 500x500 pt (176.39x176.39 mm)
- **Images**: 0
### Artboard 2
- **Dimensions**: 1000x300 pt (352.78x105.83 mm)
- **Images**: 1
## Text Content
1. COMPANY NAME
2. Innovation Through Technology
## Fonts Used
- Montserrat-Bold (48.0pt)
- Montserrat-Regular (18.0pt)
## Color Palette
- `#1a1a1a` (used 15 times)
- `#ff6b35` (used 8 times)
- `#ffffff` (used 5 times)
## Design Analysis
- **Contains text**: Yes
- **Contains images**: Yes
- **Contains vector paths**: Yes
- **Complexity score**: 127
Integration Tips
For Logo Design Projects
After analyzing an existing brand logo:
- Color consistency: Use extracted hex codes in design tools
- Typography reference: Match font style and weight
- Size reference: Use artboard dimensions for aspect ratios
- Visual comparison: Compare new designs against preview images
For Brand Guidelines
After analyzing design assets:
- Document colors: Create palette from frequency data
- Typography specs: List fonts with sizes and weights
- Usage examples: Use preview images in guidelines
- File specifications: Include dimension data
For Design Handoff
Before submitting final designs:
- Analyze your own .ai file
- Verify all required elements present
- Check color consistency
- Generate previews for review
- Include analysis report with submission