[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EJRVAJ6CC9FFCZY6JD2WWT":3,"skill-same:01M6EJRVAJ6CC9FFCZY6JD2WWT":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6EJRVAJ6CC9FFCZY6JD2WWT","ascii-preview-generate",null,"Use AI to create ASCII text-based preview of PDF page layout. Transforms visual and extracted data into structured ASCII representation for HTML generation.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fabejitsu\u002Fascii-preview-generate\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"generate","preview","ascii","ascii preview generate","PDF","create","data","text","page","use","html","visual","structured","generation","layout","transforms","2026-11-10 10:12:30",false,"---\nname: ascii-preview-generate\ndescription: Use AI to create ASCII text-based preview of PDF page layout. Transforms visual and extracted data into structured ASCII representation for HTML generation.\n---\n\n# ASCII Preview Generate Skill\n\n## Purpose\n\nThis skill uses **AI to create a meaningful ASCII text-based representation** of the PDF page layout. The AI:\n- Analyzes both the PDF page image and extracted text data\n- Creates a structured ASCII preview showing page organization\n- Represents heading hierarchy, paragraphs, lists, and tables visually\n- Provides clear structural context for downstream HTML generation\n\nThe ASCII preview serves as a **structured representation of page layout**, enabling the downstream AI-HTML generator to understand both visual layout and content structure.\n\n## What to Do\n\n1. **Load input files**\n   - Read `02_page_XX.png` (visual reference)\n   - Read `01_rich_extraction.json` (text spans with metadata)\n   - Verify all required fields present\n\n2. **Invoke AI to analyze and represent**\n   - Send PNG image to Claude (visual reference)\n   - Include extracted text data (JSON)\n   - Request ASCII layout representation\n   - AI determines structure and relationships\n\n3. **AI generates ASCII preview**\n   - AI analyzes heading hierarchy from extraction data\n   - AI identifies paragraphs and their relationships\n   - AI represents lists with proper formatting\n   - AI shows table layouts if present\n   - AI creates visual representation using ASCII characters\n\n4. **Validate ASCII output**\n   - Verify output is readable text\n   - Check that all content elements represented\n   - Confirm structure is clear and logical\n\n5. **Save to persistent file**\n   - Save to: `output\u002Fchapter_XX\u002Fpage_artifacts\u002Fpage_YY\u002F03_page_XX_ascii.txt`\n   - Include metadata (page number, chapter, timestamp)\n\n## Input Parameters\n\n```\nrich_extraction_file: \u003Cstr>  - Path to 01_rich_extraction.json\npage_png: \u003Cstr>               - Path to 02_page_XX.png (optional, for visual validation)\noutput_file: \u003Cstr>            - Path to save ASCII preview\nbook_page: \u003Cint>              - Book page number (for display)\nchapter: \u003Cint>                - Chapter number (for display)\n```\n\n## Output Format\n\n### ASCII Preview Structure\n\nThe ASCII preview uses this structure:\n\n```\n================================================================================\n                        PAGE XX ASCII LAYOUT PREVIEW\n================================================================================\nBook Page: YY | Chapter: Z | PDF Index: XX | Dimensions: 612x792px\n--------------------------------------------------------------------------------\n\n[PAGE CONTENT WITH ASCII ART AND ANNOTATIONS]\n\nSTRUCTURE SUMMARY:\n[Element counts and types]\n\n================================================================================\n```\n\n### Example Output\n\n```\n================================================================================\n                        PAGE 16 ASCII LAYOUT PREVIEW\n================================================================================\nBook Page: 17 | Chapter: 2 | PDF Index: 16 | Dimensions: 612x792px\n--------------------------------------------------------------------------------\n\n┌─────────────────────────────────────────────────────────────────────────┐\n│                                                                         │\n│  [H1 Heading - 27pt Bold]                                              │\n│  ████████████████████████████████                                      │\n│  █ Rights in Real Estate █                                             │\n│  ████████████████████████████████                                      │\n│                                                                         │\n│  ─────────────────────────────────────────────────────────────────     │\n│  [Divider]                                                              │\n│                                                                         │\n│  [H2 Section Heading - 11pt Bold All-Caps]                             │\n│  REAL PROPERTY RIGHTS                                                  │\n│                                                                         │\n│  [Paragraph 1 - 11pt Regular]                                          │\n│  Real property consists of physical land and the legal rights          │\n│  associated with ownership. These rights form what is commonly         │\n│  referred to as the \"bundle of rights.\"                                │\n│                                                                         │\n│  [H4 Subsection - 11pt Bold]                                           │\n│  Physical characteristics.                                             │\n│                                                                         │\n│  [Paragraph 2 - 11pt Regular]                                          │\n│  Land has unique physical characteristics that distinguish it from    │\n│  other types of assets. The most important characteristics include:   │\n│                                                                         │\n│  [Bullet List - 3 items]                                               │\n│    ▶ Immobility - Land cannot be moved from one location to           │\n│      another. This fact has significant legal and economic            │\n│      implications.                                                     │\n│    ▶ Indestructibility - Land is permanent and cannot be              │\n│      destroyed. Although structures on land can be destroyed,          │\n│      the land itself endures.                                          │\n│    ▶ Uniqueness - Each parcel of land is unique due to its            │\n│      location. \"Not two parcels of land are exactly alike due to       │\n│      their geographic location.\"                                       │\n│                                                                         │\n│  [H4 Subsection - 11pt Bold]                                           │\n│  Interdependence.                                                      │\n│                                                                         │\n│  [Paragraph 3 - 11pt Regular]                                          │\n│  All land exists in relation to other land. Therefore, the value      │\n│  of land is dependent on the land around it...                        │\n│                                                                         │\n└─────────────────────────────────────────────────────────────────────────┘\n\nSTRUCTURE SUMMARY:\n─────────────────\nPage Type: Chapter Continuation\nTotal Elements: 12\n\nHeadings (3):\n  • H1: 1 instance (27pt, bold) - \"Rights in Real Estate\"\n  • H2: 1 instance (11pt, bold, all-caps) - \"REAL PROPERTY RIGHTS\"\n  • H4: 2 instances (11pt, bold) - \"Physical characteristics\", \"Interdependence\"\n\nParagraphs (3):\n  • Body text: 3 paragraphs total\n  • Average paragraph length: ~45 words\n  • Text flow: Top to bottom, left to right\n\nLists (1):\n  • Bullet list with 3 items\n  • Indentation: 2em from left margin\n  • Separator: \"▶\" character\n\nTables: 0\n\nImages: 0\n\nFont Summary:\n  • 27pt: 1 instance (heading)\n  • 11pt: 7 instances (body, subsections, lists)\n  • Total unique fonts: 2 (Arial-Bold, Times-Regular)\n\nConfidence Assessment:\n  • Heading hierarchy: 100% confident\n  • Element types: 95% confident\n  • Content flow: 90% confident\n  • (Lower confidence = ambiguous or unusual formatting)\n\n================================================================================\n```\n\n## AI Prompt Template\n\nThe prompt sent to Claude to generate ASCII preview:\n\n```\nYou are creating an ASCII text-based layout preview of a PDF page.\n\nVISUAL REFERENCE (PDF Page):\n[PNG Image Attached]\n\nEXTRACTED TEXT DATA:\n[JSON Attached]\n\nTASK:\nGenerate an ASCII text representation of this page's layout and structure.\n\nREQUIREMENTS:\n\n1. ASCII Format:\n   - Use box drawing characters for visual clarity (┌─┐│└┘)\n   - Show page boundaries\n   - Use spacing to represent actual layout\n\n2. Element Representation:\n   - Headings: Show in ASCII, mark with [H1], [H2], [H3], [H4]\n   - Paragraphs: Show first line, indicate continuation\n   - Lists: Use ▶ or • characters, maintain structure\n   - Tables: Show column alignment and structure\n   - Spacing: Represent actual gaps between elements\n\n3. Annotations:\n   - Label each element type [Heading], [Paragraph], [List], etc.\n   - Show font size context (11pt, 27pt, etc.)\n   - Note text styling (Bold, All-Caps, etc.)\n\n4. Summary Statistics:\n   - Count headings by level (h1, h2, h3, h4)\n   - Count paragraphs\n   - Count lists and items\n   - Note any tables or images\n\n5. Readability:\n   - Keep lines under 80 characters\n   - Use clear visual separation\n   - Make structure obvious at a glance\n\nOUTPUT:\n\n```\n================================================================================\n                        PAGE XX ASCII LAYOUT PREVIEW\n================================================================================\nBook Page: YY | Chapter: Z | PDF Index: XX\n--------------------------------------------------------------------------------\n\n[ASCII representation with visual structure]\n\nSTRUCTURE SUMMARY:\n[Element counts and types]\n================================================================================\n```\n\nVALIDATION:\n- ASCII must be readable text\n- All major content elements must be represented\n- Structure must be clear and logical\n- Total elements count must match data\n```\n\n## AI Generation Process\n\n1. **Load inputs**\n   - `02_page_XX.png` - Visual reference\n   - `01_rich_extraction.json` - Text spans with metadata\n\n2. **Invoke Claude API**\n   - Send image as multi-modal input\n   - Include extracted data in prompt\n   - Request ASCII layout preview\n\n3. **Extract and validate output**\n   - Parse ASCII from response\n   - Verify readability\n   - Check element representation\n\n4. **Save to file**\n   - Write to `output\u002Fchapter_XX\u002Fpage_artifacts\u002Fpage_YY\u002F03_page_XX_ascii.txt`\n\n## Quality Checks\n\nBefore declaring ASCII preview complete:\n\n1. **File output**\n   - [ ] Output file created and readable\n   - [ ] File is valid text (UTF-8 encoding)\n   - [ ] File size meaningful (> 500 bytes)\n\n2. **Content representation**\n   - [ ] All major page elements represented\n   - [ ] Heading hierarchy shown clearly\n   - [ ] Paragraphs indicated and readable\n   - [ ] Lists properly formatted with bullets\u002Fmarkers\n   - [ ] Tables (if present) shown with alignment\n\n3. **Accuracy against source data**\n   - [ ] Structure matches rich_extraction.json\n   - [ ] Element counts reasonable\n   - [ ] Text content accurate (no changes)\n   - [ ] Layout represents visual (PNG) appearance\n\n4. **Readability and format**\n   - [ ] ASCII art is clear and clean\n   - [ ] Line length reasonable (\u003C 100 chars)\n   - [ ] Box drawing characters render properly\n   - [ ] Annotations are clear and helpful\n   - [ ] Summary section present and accurate\n\n## Output Metadata\n\n```json\n{\n  \"preview_file\": \"03_page_16_ascii.txt\",\n  \"page\": 16,\n  \"book_page\": 17,\n  \"chapter\": 2,\n  \"generated_at\": \"2025-11-08T14:31:00Z\",\n  \"source_file\": \"01_rich_extraction.json\",\n  \"elements_detected\": {\n    \"headings\": 4,\n    \"paragraphs\": 3,\n    \"lists\": 1,\n    \"tables\": 0,\n    \"images\": 0\n  },\n  \"confidence_scores\": {\n    \"overall\": 0.93,\n    \"heading_hierarchy\": 1.0,\n    \"element_types\": 0.95,\n    \"content_flow\": 0.90\n  }\n}\n```\n\n## Use in Downstream Processing\n\nThe ASCII preview is used by **Skill 3 (ai-html-generate)** as one of three inputs:\n\n1. `02_page_XX.png` - Visual reference (pixel data)\n2. `01_rich_extraction.json` - Parsed text with metadata\n3. `03_page_XX_ascii.txt` - **Structural representation** ← This skill creates\n\nTogether, these three inputs give the AI complete context for accurate HTML generation.\n\n## Error Handling\n\n**If PNG image fails to load:**\n- Fall back to text-only analysis using rich_extraction.json\n- AI still generates ASCII but without visual reference\n- Note in metadata: \"Image unavailable\"\n- Proceed (text data is sufficient for structure)\n\n**If rich_extraction.json is invalid:**\n- Use PNG image and AI visual analysis\n- Attempt ASCII generation from visual alone\n- Log warning about missing text data\n- Proceed with AI best judgment\n\n**If AI response is not valid text:**\n- Validate encoding and line breaks\n- Retry request if necessary\n- Escalate if repeated failures\n\n**If ASCII structure seems incomplete:**\n- AI may have missed elements due to image quality\n- Downstream HTML generation has visual reference for verification\n- Quality gates will catch if output is insufficient\n\n## Success Criteria\n\n✓ ASCII preview file created successfully\n✓ File contains all page elements in structured format\n✓ Heading hierarchy is clear and logical\n✓ All text content included and readable\n✓ Summary statistics accurate\n✓ File is well-formatted and unambiguous\n✓ Ready for AI HTML generation with complete context\n\n## Next Steps\n\nOnce ASCII preview is complete:\n1. **Skill 3** (ai-html-generate) uses this + PNG + extraction for HTML\n2. AI has maximum context: visual (PNG) + text (extraction) + structure (ASCII)\n3. Result is accurate, semantically correct HTML\n\n## Troubleshooting\n\n**ASCII preview is incomplete**: Check source rich_extraction.json has all text spans\n**Heading hierarchy looks wrong**: Verify font sizes in extraction data\n**Lists not detected**: Check for bullet character encoding issues\n**Spacing is off**: Ensure coordinate system matches PDF (top-left origin)\n\n## Design Notes\n\n- This skill is **AI-powered** (probabilistic generation)\n- Output is **human-readable** (for debugging and validation)\n- Output is **machine-parseable** (for downstream processing)\n- Input is **multi-modal** (visual image + structured text data)\n- AI understands context to create meaningful layout preview\n- Critical bridge between visual and textual representations\n- Enables downstream HTML generation with complete context\n","# ASCII Preview Generate Skill\n\n## Purpose\n\nThis skill uses **AI to create a meaningful ASCII text-based representation** of the PDF page layout. The AI:\n- Analyzes both the PDF page image and extracted text data\n- Creates a structured ASCII preview showing page organization\n- Represents heading hierarchy, paragraphs, lists, and tables visually\n- Provides clear structural context for downstream HTML generation\n\nThe ASCII preview serves as a **structured representation of page layout**, enabling the downstream AI-HTML generator to understand both visual layout and content structure.\n\n## What to Do\n\n1. **Load input files**\n   - Read `02_page_XX.png` (visual reference)\n   - Read `01_rich_extraction.json` (text spans with metadata)\n   - Verify all required fields present\n\n2. **Invoke AI to analyze and represent**\n   - Send PNG image to Claude (visual reference)\n   - Include extracted text data (JSON)\n   - Request ASCII layout representation\n   - AI determines structure and relationships\n\n3. **AI generates ASCII preview**\n   - AI analyzes heading hierarchy from extraction data\n   - AI identifies paragraphs and their relationships\n   - AI represents lists with proper formatting\n   - AI shows table layouts if present\n   - AI creates visual representation using ASCII characters\n\n4. **Validate ASCII output**\n   - Verify output is readable text\n   - Check that all content elements represented\n   - Confirm structure is clear and logical\n\n5. **Save to persistent file**\n   - Save to: `output\u002Fchapter_XX\u002Fpage_artifacts\u002Fpage_YY\u002F03_page_XX_ascii.txt`\n   - Include metadata (page number, chapter, timestamp)\n\n## Input Parameters\n\n```\nrich_extraction_file: \u003Cstr>  - Path to 01_rich_extraction.json\npage_png: \u003Cstr>               - Path to 02_page_XX.png (optional, for visual validation)\noutput_file: \u003Cstr>            - Path to save ASCII preview\nbook_page: \u003Cint>              - Book page number (for display)\nchapter: \u003Cint>                - Chapter number (for display)\n```\n\n## Output Format\n\n### ASCII Preview Structure\n\nThe ASCII preview uses this structure:\n\n```\n================================================================================\n                        PAGE XX ASCII LAYOUT PREVIEW\n================================================================================\nBook Page: YY | Chapter: Z | PDF Index: XX | Dimensions: 612x792px\n--------------------------------------------------------------------------------\n\n[PAGE CONTENT WITH ASCII ART AND ANNOTATIONS]\n\nSTRUCTURE SUMMARY:\n[Element counts and types]\n\n================================================================================\n```\n\n### Example Output\n\n```\n================================================================================\n                        PAGE 16 ASCII LAYOUT PREVIEW\n================================================================================\nBook Page: 17 | Chapter: 2 | PDF Index: 16 | Dimensions: 612x792px\n--------------------------------------------------------------------------------\n\n┌─────────────────────────────────────────────────────────────────────────┐\n│                                                                         │\n│  [H1 Heading - 27pt Bold]                                              │\n│  ████████████████████████████████                                      │\n│  █ Rights in Real Estate █                                             │\n│  ████████████████████████████████                                      │\n│                                                                         │\n│  ─────────────────────────────────────────────────────────────────     │\n│  [Divider]                                                              │\n│                                                                         │\n│  [H2 Section Heading - 11pt Bold All-Caps]                             │\n│  REAL PROPERTY RIGHTS                                                  │\n│                                                                         │\n│  [Paragraph 1 - 11pt Regular]                                          │\n│  Real property consists of physical land and the legal rights          │\n│  associated with ownership. These rights form what is commonly         │\n│  referred to as the \"bundle of rights.\"                                │\n│                                                                         │\n│  [H4 Subsection - 11pt Bold]                                           │\n│  Physical characteristics.                                             │\n│                                                                         │\n│  [Paragraph 2 - 11pt Regular]                                          │\n│  Land has unique physical characteristics that distinguish it from    │\n│  other types of assets. The most important characteristics include:   │\n│                                                                         │\n│  [Bullet List - 3 items]                                               │\n│    ▶ Immobility - Land cannot be moved from one location to           │\n│      another. This fact has significant legal and economic            │\n│      implications.                                                     │\n│    ▶ Indestructibility - Land is permanent and cannot be              │\n│      destroyed. Although structures on land can be destroyed,          │\n│      the land itself endures.                                          │\n│    ▶ Uniqueness - Each parcel of land is unique due to its            │\n│      location. \"Not two parcels of land are exactly alike due to       │\n│      their geographic location.\"                                       │\n│                                                                         │\n│  [H4 Subsection - 11pt Bold]                                           │\n│  Interdependence.                                                      │\n│                                                                         │\n│  [Paragraph 3 - 11pt Regular]                                          │\n│  All land exists in relation to other land. Therefore, the value      │\n│  of land is dependent on the land around it...                        │\n│                                                                         │\n└─────────────────────────────────────────────────────────────────────────┘\n\nSTRUCTURE SUMMARY:\n─────────────────\nPage Type: Chapter Continuation\nTotal Elements: 12\n\nHeadings (3):\n  • H1: 1 instance (27pt, bold) - \"Rights in Real Estate\"\n  • H2: 1 instance (11pt, bold, all-caps) - \"REAL PROPERTY RIGHTS\"\n  • H4: 2 instances (11pt, bold) - \"Physical characteristics\", \"Interdependence\"\n\nParagraphs (3):\n  • Body text: 3 paragraphs total\n  • Average paragraph length: ~45 words\n  • Text flow: Top to bottom, left to right\n\nLists (1):\n  • Bullet list with 3 items\n  • Indentation: 2em from left margin\n  • Separator: \"▶\" character\n\nTables: 0\n\nImages: 0\n\nFont Summary:\n  • 27pt: 1 instance (heading)\n  • 11pt: 7 instances (body, subsections, lists)\n  • Total unique fonts: 2 (Arial-Bold, Times-Regular)\n\nConfidence Assessment:\n  • Heading hierarchy: 100% confident\n  • Element types: 95% confident\n  • Content flow: 90% confident\n  • (Lower confidence = ambiguous or unusual formatting)\n\n================================================================================\n```\n\n## AI Prompt Template\n\nThe prompt sent to Claude to generate ASCII preview:\n\n```\nYou are creating an ASCII text-based layout preview of a PDF page.\n\nVISUAL REFERENCE (PDF Page):\n[PNG Image Attached]\n\nEXTRACTED TEXT DATA:\n[JSON Attached]\n\nTASK:\nGenerate an ASCII text representation of this page's layout and structure.\n\nREQUIREMENTS:\n\n1. ASCII Format:\n   - Use box drawing characters for visual clarity (┌─┐│└┘)\n   - Show page boundaries\n   - Use spacing to represent actual layout\n\n2. Element Representation:\n   - Headings: Show in ASCII, mark with [H1], [H2], [H3], [H4]\n   - Paragraphs: Show first line, indicate continuation\n   - Lists: Use ▶ or • characters, maintain structure\n   - Tables: Show column alignment and structure\n   - Spacing: Represent actual gaps between elements\n\n3. Annotations:\n   - Label each element type [Heading], [Paragraph], [List], etc.\n   - Show font size context (11pt, 27pt, etc.)\n   - Note text styling (Bold, All-Caps, etc.)\n\n4. Summary Statistics:\n   - Count headings by level (h1, h2, h3, h4)\n   - Count paragraphs\n   - Count lists and items\n   - Note any tables or images\n\n5. Readability:\n   - Keep lines under 80 characters\n   - Use clear visual separation\n   - Make structure obvious at a glance\n\nOUTPUT:\n\n```\n================================================================================\n                        PAGE XX ASCII LAYOUT PREVIEW\n================================================================================\nBook Page: YY | Chapter: Z | PDF Index: XX\n--------------------------------------------------------------------------------\n\n[ASCII representation with visual structure]\n\nSTRUCTURE SUMMARY:\n[Element counts and types]\n================================================================================\n```\n\nVALIDATION:\n- ASCII must be readable text\n- All major content elements must be represented\n- Structure must be clear and logical\n- Total elements count must match data\n```\n\n## AI Generation Process\n\n1. **Load inputs**\n   - `02_page_XX.png` - Visual reference\n   - `01_rich_extraction.json` - Text spans with metadata\n\n2. **Invoke Claude API**\n   - Send image as multi-modal input\n   - Include extracted data in prompt\n   - Request ASCII layout preview\n\n3. **Extract and validate output**\n   - Parse ASCII from response\n   - Verify readability\n   - Check element representation\n\n4. **Save to file**\n   - Write to `output\u002Fchapter_XX\u002Fpage_artifacts\u002Fpage_YY\u002F03_page_XX_ascii.txt`\n\n## Quality Checks\n\nBefore declaring ASCII preview complete:\n\n1. **File output**\n   - [ ] Output file created and readable\n   - [ ] File is valid text (UTF-8 encoding)\n   - [ ] File size meaningful (> 500 bytes)\n\n2. **Content representation**\n   - [ ] All major page elements represented\n   - [ ] Heading hierarchy shown clearly\n   - [ ] Paragraphs indicated and readable\n   - [ ] Lists properly formatted with bullets\u002Fmarkers\n   - [ ] Tables (if present) shown with alignment\n\n3. **Accuracy against source data**\n   - [ ] Structure matches rich_extraction.json\n   - [ ] Element counts reasonable\n   - [ ] Text content accurate (no changes)\n   - [ ] Layout represents visual (PNG) appearance\n\n4. **Readability and format**\n   - [ ] ASCII art is clear and clean\n   - [ ] Line length reasonable (\u003C 100 chars)\n   - [ ] Box drawing characters render properly\n   - [ ] Annotations are clear and helpful\n   - [ ] Summary section present and accurate\n\n## Output Metadata\n\n```json\n{\n  \"preview_file\": \"03_page_16_ascii.txt\",\n  \"page\": 16,\n  \"book_page\": 17,\n  \"chapter\": 2,\n  \"generated_at\": \"2025-11-08T14:31:00Z\",\n  \"source_file\": \"01_rich_extraction.json\",\n  \"elements_detected\": {\n    \"headings\": 4,\n    \"paragraphs\": 3,\n    \"lists\": 1,\n    \"tables\": 0,\n    \"images\": 0\n  },\n  \"confidence_scores\": {\n    \"overall\": 0.93,\n    \"heading_hierarchy\": 1.0,\n    \"element_types\": 0.95,\n    \"content_flow\": 0.90\n  }\n}\n```\n\n## Use in Downstream Processing\n\nThe ASCII preview is used by **Skill 3 (ai-html-generate)** as one of three inputs:\n\n1. `02_page_XX.png` - Visual reference (pixel data)\n2. `01_rich_extraction.json` - Parsed text with metadata\n3. `03_page_XX_ascii.txt` - **Structural representation** ← This skill creates\n\nTogether, these three inputs give the AI complete context for accurate HTML generation.\n\n## Error Handling\n\n**If PNG image fails to load:**\n- Fall back to text-only analysis using rich_extraction.json\n- AI still generates ASCII but without visual reference\n- Note in metadata: \"Image unavailable\"\n- Proceed (text data is sufficient for structure)\n\n**If rich_extraction.json is invalid:**\n- Use PNG image and AI visual analysis\n- Attempt ASCII generation from visual alone\n- Log warning about missing text data\n- Proceed with AI best judgment\n\n**If AI response is not valid text:**\n- Validate encoding and line breaks\n- Retry request if necessary\n- Escalate if repeated failures\n\n**If ASCII structure seems incomplete:**\n- AI may have missed elements due to image quality\n- Downstream HTML generation has visual reference for verification\n- Quality gates will catch if output is insufficient\n\n## Success Criteria\n\n✓ ASCII preview file created successfully\n✓ File contains all page elements in structured format\n✓ Heading hierarchy is clear and logical\n✓ All text content included and readable\n✓ Summary statistics accurate\n✓ File is well-formatted and unambiguous\n✓ Ready for AI HTML generation with complete context\n\n## Next Steps\n\nOnce ASCII preview is complete:\n1. **Skill 3** (ai-html-generate) uses this + PNG + extraction for HTML\n2. AI has maximum context: visual (PNG) + text (extraction) + structure (ASCII)\n3. Result is accurate, semantically correct HTML\n\n## Troubleshooting\n\n**ASCII preview is incomplete**: Check source rich_extraction.json has all text spans\n**Heading hierarchy looks wrong**: Verify font sizes in extraction data\n**Lists not detected**: Check for bullet character encoding issues\n**Spacing is off**: Ensure coordinate system matches PDF (top-left origin)\n\n## Design Notes\n\n- This skill is **AI-powered** (probabilistic generation)\n- Output is **human-readable** (for debugging and validation)\n- Output is **machine-parseable** (for downstream processing)\n- Input is **multi-modal** (visual image + structured text data)\n- AI understands context to create meaningful layout preview\n- Critical bridge between visual and textual representations\n- Enables downstream HTML generation with complete context\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fabejitsu\u002Fascii-preview-generate",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill ascii-preview-generate",{"tool":55,"command":56},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill ascii-preview-generate",{"tool":58,"command":59},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill ascii-preview-generate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fabejitsu\u002Fascii-preview-generate\u002FSKILL.md",true,[63],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"skill-report.json","REFERENCE","参考文档",11186,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fabejitsu\u002Fascii-preview-generate\u002Fskill-report.json",[70,79,88,97,103,109],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":35},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[76,77,78],"model","model hierarchy","model hierarchy skill",{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":35},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[85,86,87],"MCP","zoom","zoom mcp",{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":35},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[94,95,96,86],"sdk","zoom apps sdk","apps",{"skillNo":98,"name":99,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":35},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[99],{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":35},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[105],{"skillNo":110,"name":111,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":35},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[111]]