[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CS6HWNBZJW2J9Z2M4WJDJA":3,"skill-same:01M7CS6HWNBZJW2J9Z2M4WJDJA":68},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":36,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M7CS6HWNBZJW2J9Z2M4WJDJA","glmv-pdf-to-ppt",null,"Convert a PDF (research paper, report, or any document) into a polished multi-slide HTML presentation with a structured outline JSON and summary markdown. Trigger this skill when the user mentions making slides or a PPT from a PDF — in Chinese or English.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills-v4\u002Fglmv-pdf-to-ppt\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: glmv-pdf-to-ppt\ndescription:\n  Convert a PDF (research paper, report, or any document) into a polished multi-slide\n  HTML presentation with a structured outline JSON and summary markdown. Trigger this\n  skill when the user mentions making slides or a PPT from a PDF — in Chinese or English.\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - python\n    emoji: \"📑\"\n    homepage: https:\u002F\u002Fgithub.com\u002Fzai-org\u002FGLM-V\u002Ftree\u002Fmain\u002Fskills\u002Fglmv-pdf-to-ppt\n---\n\n# PDF → HTML PPT Skill\n\nConvert any PDF into a multi-slide HTML presentation. Pages are converted to images at DPI 120, read sequentially to understand the content, then a structured `outline.json` is saved, images are cropped locally (no cloud upload), slides are rendered one by one, and finally a `summary.md` is generated.\n\n**Scripts are in:** `{SKILL_DIR}\u002Fscripts\u002F`\n\n## Dependencies\n\nPython packages (install once):\n```bash\npip install pymupdf pillow\n```\n\nSystem tools: `curl` (pre-installed on macOS\u002FLinux).\n\n## When to Use\n\nTrigger when the user asks to make slides or a presentation from a PDF — phrases like:\n\"make a PPT from a PDF\", \"convert PDF to slides\", \"create a presentation from this paper\", \"根据pdf做ppt\", \"根据论文做幻灯片\", \"做PPT\", \"做幻灯片\", \"生成演示文稿\", \"把这个pdf转成ppt\", or any similar intent in Chinese or English.\n\n## Output Directory Convention\n\nAll output goes under `{WORKSPACE}\u002Fppt\u002F\u003Cpdf_stem>_\u003Ctimestamp>\u002F`:\n\n```\nppt\u002F\n└── \u003Cpdf_stem>_\u003Ctimestamp>\u002F\n    ├── outline.json        ← structured slide plan (SlidesPlan schema)\n    ├── crops\u002F              ← locally-saved cropped images\n    │   ├── slide3_method_crop.png\n    │   └── slide5_results_crop.png\n    ├── slide_01.html\n    ├── slide_02.html\n    ├── ...\n    └── summary.md          ← final summary document\n```\n\n- `\u003Cpdf_stem>` = PDF filename without extension\n- `\u003Ctimestamp>` = format `YYYYMMDD_HHMMSS` (e.g. `20240119_143022`)\n- Cropped images go in `crops\u002F` subfolder\n- Each slide HTML references images via relative path `crops\u002F\u003Cname>.png`\n\n## Input\n\n`$ARGUMENTS` is the path to the PDF file (local) or an HTTP\u002FHTTPS URL.\n\n- If user provides a **URL**: download with curl first, then convert\n- If user provides a **local PDF path**: convert directly\n\n---\n\n## Workflow\n\n### Phase 0 — Create Output Directory\n\nCompute the output path:\n```python\nimport os, datetime\npdf_stem = os.path.splitext(os.path.basename(pdf_path))[0]\ntimestamp = datetime.datetime.now().strftime(\"%Y%m%d_%H%M%S\")\nout_dir = os.path.join(workspace, \"ppt\", f\"{pdf_stem}_{timestamp}\")\n```\n\nCreate it immediately:\n```bash\nmkdir -p \"\u003Cout_dir>\u002Fcrops\"\n```\n\nRecord `out_dir` — use it for all subsequent phases.\n\n---\n\n### Phase 1 — Convert PDF Pages to Images (DPI 120)\n\nIf the input is a URL, download it first:\n```bash\npdf_stem=$(basename \"$ARGUMENTS\" .pdf)\ncurl -L -o \"\u002Ftmp\u002F${pdf_stem}.pdf\" \"$ARGUMENTS\"\n```\nThen convert (pass either the downloaded path or the original local path):\n```bash\npython {SKILL_DIR}\u002Fscripts\u002Fpdf_to_images.py \"\u003Cpdf_path>\" --dpi 120\n```\n\nOutputs JSON to stdout:\n```json\n[{\"page\": 1, \"path\": \"\u002Fabs\u002Fpath\u002Fpage_001.png\"}, ...]\n```\n\nParse and store the full `page → path` map. These local paths are used for viewing pages and as `--path` input to `crop.py`.\n\n---\n\n### Phase 2 — Read All Pages in Order\n\nView **all page images** sequentially before planning anything. Your goal here is pure understanding — absorb the full structure, content, figures, and arguments of the document.\n\nWhile reading, note:\n- What figures, charts, or tables appear on which pages\n- The overall arc (intro → method → results → conclusion for papers; or logical structure for other doc types)\n- Candidate visuals worth cropping for slides (page number + rough region)\n\nDo NOT plan or write slides yet — just read and understand all pages first.\n\n---\n\n### Phase 3 — Plan Outline & Save outline.json\n\nAfter reading all pages, plan 8–15 slides (adapt freely for non-academic documents).\n\n| Slide | Typical purpose |\n|-------|----------------|\n| 1 | Title, authors, affiliation, venue\u002Fyear |\n| 2 | Motivation \u002F Problem statement |\n| 3 | Related Work (brief) |\n| 4–N-2 | Method \u002F Core contributions (one concept per slide) |\n| N-1 | Results & Experiments |\n| N | Conclusion & Future Work |\n\nFor each slide that needs a visual, identify:\n- Which page it comes from (the local page path from Phase 1)\n- A description of what the visual shows and why it belongs on this slide\n\n**Save the outline as `\u003Cout_dir>\u002Foutline.json`** using exactly this schema:\n\n```json\n{\n  \"presentation_title\": \"Paper Title Here\",\n  \"lang\": \"Chinese\",\n  \"total_slides\": 10,\n  \"slides_plan\": [\n    {\n      \"slide_index\": 1,\n      \"title\": \"Slide Title\",\n      \"main_content\": \"Key points and text content for this slide\",\n      \"template_id\": null,\n      \"required_crops\": [\n        {\n          \"url\": \"\u003Cpage_image_url_from_phase1>\",\n          \"visual_description\": \"Figure 3: architecture diagram showing encoder-decoder\",\n          \"usage_reason\": \"Illustrates the core model structure for slide 4\"\n        }\n      ]\n    }\n  ]\n}\n```\n\nField notes:\n- `lang`: `\"Chinese\"` or `\"English\"` — match the PDF language\n- `template_id`: always `null`\n- `required_crops`: empty array `[]` if this slide needs no images\n- `url` in each crop: the **local file path** of the source page image (from Phase 1 `path` field) — this is what crop.py will open and crop from\n- `visual_description`: what the visual shows, including figure\u002Ftable number if available\n- `usage_reason`: why this visual belongs on this particular slide\n\n- For images that need cropping, note the approximate region — exact crop boxes are determined in Phase 4\n\nWrite `outline.json` using the Write tool to `\u003Cout_dir>\u002Foutline.json`.\n\n---\n\n### Phase 4 — Crop Required Images (Grounding + Subagent)\n\n**IMPORTANT: You MUST delegate ALL cropping to a clean subagent using the Agent tool.** By this phase your context is very long (all page images + outline), which degrades visual coordinate accuracy. A fresh subagent with only the target image produces much more precise coordinates.\n\n**IMPORTANT: You MUST use the provided `{SKILL_DIR}\u002Fscripts\u002Fcrop.py` script for ALL image cropping. Do NOT write your own cropping code, do NOT use PIL\u002FPillow directly, do NOT use any other method.**\n\nRead `outline.json`. Collect all crops needed, then launch **one subagent per source page** (or one per crop if pages differ). The subagent uses **grounding-style localization** — it views the image, locates the target element, and outputs a precise bounding box in normalized 0–999 coordinates.\n\nUse the Agent tool like this:\n\n```\nAgent tool call:\n  description: \"Grounding crop page N\"\n  prompt: |\n    You are a visual grounding and cropping assistant. Your task is to precisely\n    locate specified visual elements in a page image and crop them out.\n\n    ## Grounding method\n\n    Use visual grounding to locate each target:\n    1. Read the source image using the Read tool to view it\n    2. Identify the target element described below\n    3. Determine its bounding box as normalized coordinates in the 0–999 range:\n       - 0 = left\u002Ftop edge of the image\n       - 999 = right\u002Fbottom edge of the image\n       - These are thousandths, NOT pixels, NOT percentages (0–100)\n       - Format: [x1, y1, x2, y2] where (x1,y1) is top-left, (x2,y2) is bottom-right\n       - Example: [0, 0, 500, 500] = top-left quarter of the image\n    4. Be precise: tightly bound the target element with a small margin (~10–20 units)\n       around it. Do NOT crop too wide or too narrow.\n\n    ## Source image\n    \u003Cpage_image_path>\n\n    ## Crops needed\n\n    For each crop below, first do grounding (locate the element), then crop:\n\n    1. Name: \"slide\u003CN>_\u003Cdescriptive_name>\"\n       Target: \"\u003Cvisual_description from outline.json>\"\n       Context: \"\u003Cusage_reason from outline.json>\"\n\n    ## Crop command\n\n    After determining the bounding box [X1, Y1, X2, Y2] for each target, run:\n    ```bash\n    python \u003CSKILL_DIR>\u002Fscripts\u002Fcrop.py \\\n        --path \"\u003Cpage_image_path>\" \\\n        --box X1 Y1 X2 Y2 \\\n        --name \"\u003Ccrop_name>\" \\\n        --out-dir \"\u003Cout_dir>\u002Fcrops\"\n    ```\n\n    ## Verification\n\n    After each crop, READ the output image to visually verify the correct region\n    was captured. If the crop missed the target or is too wide\u002Fnarrow, adjust the\n    coordinates and re-run crop.py.\n\n    ## Output\n\n    Report the final results as a list:\n    - crop_name: \u003Cname>, file: \u003Coutput_filename>, box: [X1, Y1, X2, Y2]\n```\n\nReplace `\u003Cpage_image_path>`, `\u003CSKILL_DIR>`, `\u003Cout_dir>`, and crop details with actual values from your context.\n\nThe crop.py script outputs JSON: `{\"path\": \"\u002Fabs\u002Fpath\u002Fslide3_method_crop.png\"}`\n\nCollect results from all subagents and build the mapping: `slide_index → [crop filename, ...]` to reference in HTML. The filename will be `\u003Cname>_crop.png`.\n\n**Launch subagents for independent pages in parallel** when possible. Wait for all to complete before proceeding.\n\n---\n\n### Phase 5 — Measure Cropped Image Dimensions\n\nAfter cropping, get pixel dimensions:\n\n```bash\npython3 -c \"\nfrom PIL import Image; import os, json\nd = '\u003Cout_dir>\u002Fcrops'\nsizes = {}\nfor f in sorted(os.listdir(d)):\n    if f.endswith('.png'):\n        w, h = Image.open(os.path.join(d, f)).size\n        sizes[f] = {'width': w, 'height': h, 'aspect': round(w\u002Fh, 2)}\nprint(json.dumps(sizes, indent=2))\n\"\n```\n\nUse aspect ratios to pick each slide's layout:\n\n| Aspect ratio | Layout recommendation |\n|---|---|\n| **\u003C 0.7** (tall\u002Fnarrow) | `text + image` side-by-side — `max-height: 600px` on image |\n| **0.7 – 1.3** (square-ish) | `text + image` — image takes ~50% width |\n| **> 1.3** (wide) | Image on top or bottom, text above\u002Fbelow |\n| **> 2.0** (very wide, e.g. tables) | `full-image` — spans full 1280px width, caption below |\n\n---\n\n### Phase 6 — Generate Slides One by One\n\nFor each slide, write the HTML, save it to a temp file, then call `generate_slide.py`.\n\n**Step A — Write HTML** to `\u002Ftmp\u002Fslide_N.html`\n\n- All `\u003Cimg src=\"...\">` must use **relative paths**: `crops\u002F\u003Cname>_crop.png`\n- Do NOT use absolute paths or URLs for cropped images\n- Navigation is click-area based — no buttons needed:\n  - Clicking the **left half** of the slide navigates to the previous slide\n  - Clicking the **right half** of the slide navigates to the next slide\n  - On slide 1, left click does nothing; on the last slide, right click does nothing\n  - Keyboard `←` \u002F `→` arrows also navigate\n  - Implement with two transparent `\u003Cdiv>` overlays covering each half, positioned absolute over the slide canvas\n\n**Step B — Save slide:**\n```bash\npython {SKILL_DIR}\u002Fscripts\u002Fgenerate_slide.py \\\n    --html-file \u002Ftmp\u002Fslide_N.html \\\n    --index N \\\n    --total \u003Ctotal> \\\n    --title \"\u003Cpresentation title>\" \\\n    --out-dir \"\u003Cout_dir>\u002F\"\n```\n\nRepeat until all slides are saved.\n\n---\n\n### Phase 7 — Generate summary.md\n\nWrite `\u003Cout_dir>\u002Fsummary.md` in the same language as the slides (`lang` from `outline.json`).\n\nInclude:\n- Document title and basic info (authors, venue, year if applicable)\n- Brief abstract\u002Foverview (2–3 sentences)\n- Per-slide breakdown table: slide number, title, 1–2 sentence summary\n- Main contributions or takeaways (bullet list)\n- Link to `slide_01.html` to open the first slide\n\nExample structure:\n```markdown\n# [Presentation Title]\n\n> **来源 \u002F Source:** [PDF filename] | **语言 \u002F Language:** Chinese | **幻灯片数 \u002F Slides:** 10\n\n## 摘要\n[2-3 sentence overview]\n\n## 幻灯片概览\n| # | 标题 | 主要内容 |\n|---|------|---------|\n| 1 | 标题页 | ... |\n...\n\n## 主要贡献\n- ...\n\n## 📂 打开演示文稿\n[▶ 开始播放](slide_01.html)\n```\n\n---\n\n## HTML Slide Spec\n\nEach slide is a **standalone HTML file** — full `\u003Chtml>…\u003C\u002Fhtml>` with embedded CSS only.\n\n**Canvas:** fixed `1280 × 720 px`, `overflow: hidden` — nothing scrolls.\n\n**Consistent design across all slides:**\n- Choose a visual style that fits the document's domain and tone — no fixed palette or font required\n- If the user specifies a style, follow it exactly; otherwise infer from the content (e.g. a ML paper → clean modern; a historical report → editorial serif; a product pitch → bold and branded)\n- Same fonts, colors, and spacing system applied uniformly to every slide\n- Every slide shows: slide title, page counter (bottom-right corner), presentation title (subtle footer)\n\n**Navigation on each slide:**\n- Two transparent click areas cover the full slide height: left 50% → previous slide, right 50% → next slide\n- On slide 1 the left area is inert; on the last slide the right area is inert\n- Keyboard `←` \u002F `→` arrows also navigate\n- No visible buttons needed — optionally show a subtle `‹` \u002F `›` hint at the edges that fades in on hover\n\n**Layout patterns:**\n- `title-card` — centered hero, large title, authors\u002Fvenue below\n- `text-only` — structured bullet points, max 5–6 items, generous whitespace\n- `text + image` — image right or left, text opposite\n- `full-image` — image fills canvas, minimal text overlay\n- `grid` — 2×2 or 3-column figures with captions\n\n**Images:**\n- Use relative paths: `crops\u002F\u003Cname>_crop.png`\n- Add `style=\"object-fit: contain; max-width: 100%; max-height: 100%;\"`\n- Add captions below in small italic text\n\n**Do NOT:**\n- Use external JS frameworks or icon CDNs\n- Use placeholder\u002Fstock images — only the cropped PDFs\n- Generate generic purple-gradient-on-white slides\n- Let content overflow the 720px height\n\n---\n\n## Quality Checklist\n\n- [ ] Output directory named `\u003Cpdf_stem>_\u003Ctimestamp>\u002F`\n- [ ] `outline.json` saved with valid SlidesPlan schema\n- [ ] All crops saved to `crops\u002F` (local only, no cloud upload)\n- [ ] Each slide fits within 1280×720, nothing overflows\n- [ ] Consistent theme across all slides\n- [ ] Crop images referenced via relative path `crops\u002F\u003Cname>_crop.png`\n- [ ] Slide number and presentation title visible on every slide\n- [ ] Left\u002Fright click-area navigation works, keyboard arrows work\n- [ ] `summary.md` written in the correct language, links to `slide_01.html`\n\n---\n\n## Language\n\nMatch the PDF language. Chinese PDF → Chinese slides and summary. English → English. No mixing.\n","# PDF → HTML PPT Skill\n\nConvert any PDF into a multi-slide HTML presentation. Pages are converted to images at DPI 120, read sequentially to understand the content, then a structured `outline.json` is saved, images are cropped locally (no cloud upload), slides are rendered one by one, and finally a `summary.md` is generated.\n\n**Scripts are in:** `{SKILL_DIR}\u002Fscripts\u002F`\n\n## Dependencies\n\nPython packages (install once):\n```bash\npip install pymupdf pillow\n```\n\nSystem tools: `curl` (pre-installed on macOS\u002FLinux).\n\n## When to Use\n\nTrigger when the user asks to make slides or a presentation from a PDF — phrases like:\n\"make a PPT from a PDF\", \"convert PDF to slides\", \"create a presentation from this paper\", \"根据pdf做ppt\", \"根据论文做幻灯片\", \"做PPT\", \"做幻灯片\", \"生成演示文稿\", \"把这个pdf转成ppt\", or any similar intent in Chinese or English.\n\n## Output Directory Convention\n\nAll output goes under `{WORKSPACE}\u002Fppt\u002F\u003Cpdf_stem>_\u003Ctimestamp>\u002F`:\n\n```\nppt\u002F\n└── \u003Cpdf_stem>_\u003Ctimestamp>\u002F\n    ├── outline.json        ← structured slide plan (SlidesPlan schema)\n    ├── crops\u002F              ← locally-saved cropped images\n    │   ├── slide3_method_crop.png\n    │   └── slide5_results_crop.png\n    ├── slide_01.html\n    ├── slide_02.html\n    ├── ...\n    └── summary.md          ← final summary document\n```\n\n- `\u003Cpdf_stem>` = PDF filename without extension\n- `\u003Ctimestamp>` = format `YYYYMMDD_HHMMSS` (e.g. `20240119_143022`)\n- Cropped images go in `crops\u002F` subfolder\n- Each slide HTML references images via relative path `crops\u002F\u003Cname>.png`\n\n## Input\n\n`$ARGUMENTS` is the path to the PDF file (local) or an HTTP\u002FHTTPS URL.\n\n- If user provides a **URL**: download with curl first, then convert\n- If user provides a **local PDF path**: convert directly\n\n---\n\n## Workflow\n\n### Phase 0 — Create Output Directory\n\nCompute the output path:\n```python\nimport os, datetime\npdf_stem = os.path.splitext(os.path.basename(pdf_path))[0]\ntimestamp = datetime.datetime.now().strftime(\"%Y%m%d_%H%M%S\")\nout_dir = os.path.join(workspace, \"ppt\", f\"{pdf_stem}_{timestamp}\")\n```\n\nCreate it immediately:\n```bash\nmkdir -p \"\u003Cout_dir>\u002Fcrops\"\n```\n\nRecord `out_dir` — use it for all subsequent phases.\n\n---\n\n### Phase 1 — Convert PDF Pages to Images (DPI 120)\n\nIf the input is a URL, download it first:\n```bash\npdf_stem=$(basename \"$ARGUMENTS\" .pdf)\ncurl -L -o \"\u002Ftmp\u002F${pdf_stem}.pdf\" \"$ARGUMENTS\"\n```\nThen convert (pass either the downloaded path or the original local path):\n```bash\npython {SKILL_DIR}\u002Fscripts\u002Fpdf_to_images.py \"\u003Cpdf_path>\" --dpi 120\n```\n\nOutputs JSON to stdout:\n```json\n[{\"page\": 1, \"path\": \"\u002Fabs\u002Fpath\u002Fpage_001.png\"}, ...]\n```\n\nParse and store the full `page → path` map. These local paths are used for viewing pages and as `--path` input to `crop.py`.\n\n---\n\n### Phase 2 — Read All Pages in Order\n\nView **all page images** sequentially before planning anything. Your goal here is pure understanding — absorb the full structure, content, figures, and arguments of the document.\n\nWhile reading, note:\n- What figures, charts, or tables appear on which pages\n- The overall arc (intro → method → results → conclusion for papers; or logical structure for other doc types)\n- Candidate visuals worth cropping for slides (page number + rough region)\n\nDo NOT plan or write slides yet — just read and understand all pages first.\n\n---\n\n### Phase 3 — Plan Outline & Save outline.json\n\nAfter reading all pages, plan 8–15 slides (adapt freely for non-academic documents).\n\n| Slide | Typical purpose |\n|-------|----------------|\n| 1 | Title, authors, affiliation, venue\u002Fyear |\n| 2 | Motivation \u002F Problem statement |\n| 3 | Related Work (brief) |\n| 4–N-2 | Method \u002F Core contributions (one concept per slide) |\n| N-1 | Results & Experiments |\n| N | Conclusion & Future Work |\n\nFor each slide that needs a visual, identify:\n- Which page it comes from (the local page path from Phase 1)\n- A description of what the visual shows and why it belongs on this slide\n\n**Save the outline as `\u003Cout_dir>\u002Foutline.json`** using exactly this schema:\n\n```json\n{\n  \"presentation_title\": \"Paper Title Here\",\n  \"lang\": \"Chinese\",\n  \"total_slides\": 10,\n  \"slides_plan\": [\n    {\n      \"slide_index\": 1,\n      \"title\": \"Slide Title\",\n      \"main_content\": \"Key points and text content for this slide\",\n      \"template_id\": null,\n      \"required_crops\": [\n        {\n          \"url\": \"\u003Cpage_image_url_from_phase1>\",\n          \"visual_description\": \"Figure 3: architecture diagram showing encoder-decoder\",\n          \"usage_reason\": \"Illustrates the core model structure for slide 4\"\n        }\n      ]\n    }\n  ]\n}\n```\n\nField notes:\n- `lang`: `\"Chinese\"` or `\"English\"` — match the PDF language\n- `template_id`: always `null`\n- `required_crops`: empty array `[]` if this slide needs no images\n- `url` in each crop: the **local file path** of the source page image (from Phase 1 `path` field) — this is what crop.py will open and crop from\n- `visual_description`: what the visual shows, including figure\u002Ftable number if available\n- `usage_reason`: why this visual belongs on this particular slide\n\n- For images that need cropping, note the approximate region — exact crop boxes are determined in Phase 4\n\nWrite `outline.json` using the Write tool to `\u003Cout_dir>\u002Foutline.json`.\n\n---\n\n### Phase 4 — Crop Required Images (Grounding + Subagent)\n\n**IMPORTANT: You MUST delegate ALL cropping to a clean subagent using the Agent tool.** By this phase your context is very long (all page images + outline), which degrades visual coordinate accuracy. A fresh subagent with only the target image produces much more precise coordinates.\n\n**IMPORTANT: You MUST use the provided `{SKILL_DIR}\u002Fscripts\u002Fcrop.py` script for ALL image cropping. Do NOT write your own cropping code, do NOT use PIL\u002FPillow directly, do NOT use any other method.**\n\nRead `outline.json`. Collect all crops needed, then launch **one subagent per source page** (or one per crop if pages differ). The subagent uses **grounding-style localization** — it views the image, locates the target element, and outputs a precise bounding box in normalized 0–999 coordinates.\n\nUse the Agent tool like this:\n\n```\nAgent tool call:\n  description: \"Grounding crop page N\"\n  prompt: |\n    You are a visual grounding and cropping assistant. Your task is to precisely\n    locate specified visual elements in a page image and crop them out.\n\n    ## Grounding method\n\n    Use visual grounding to locate each target:\n    1. Read the source image using the Read tool to view it\n    2. Identify the target element described below\n    3. Determine its bounding box as normalized coordinates in the 0–999 range:\n       - 0 = left\u002Ftop edge of the image\n       - 999 = right\u002Fbottom edge of the image\n       - These are thousandths, NOT pixels, NOT percentages (0–100)\n       - Format: [x1, y1, x2, y2] where (x1,y1) is top-left, (x2,y2) is bottom-right\n       - Example: [0, 0, 500, 500] = top-left quarter of the image\n    4. Be precise: tightly bound the target element with a small margin (~10–20 units)\n       around it. Do NOT crop too wide or too narrow.\n\n    ## Source image\n    \u003Cpage_image_path>\n\n    ## Crops needed\n\n    For each crop below, first do grounding (locate the element), then crop:\n\n    1. Name: \"slide\u003CN>_\u003Cdescriptive_name>\"\n       Target: \"\u003Cvisual_description from outline.json>\"\n       Context: \"\u003Cusage_reason from outline.json>\"\n\n    ## Crop command\n\n    After determining the bounding box [X1, Y1, X2, Y2] for each target, run:\n    ```bash\n    python \u003CSKILL_DIR>\u002Fscripts\u002Fcrop.py \\\n        --path \"\u003Cpage_image_path>\" \\\n        --box X1 Y1 X2 Y2 \\\n        --name \"\u003Ccrop_name>\" \\\n        --out-dir \"\u003Cout_dir>\u002Fcrops\"\n    ```\n\n    ## Verification\n\n    After each crop, READ the output image to visually verify the correct region\n    was captured. If the crop missed the target or is too wide\u002Fnarrow, adjust the\n    coordinates and re-run crop.py.\n\n    ## Output\n\n    Report the final results as a list:\n    - crop_name: \u003Cname>, file: \u003Coutput_filename>, box: [X1, Y1, X2, Y2]\n```\n\nReplace `\u003Cpage_image_path>`, `\u003CSKILL_DIR>`, `\u003Cout_dir>`, and crop details with actual values from your context.\n\nThe crop.py script outputs JSON: `{\"path\": \"\u002Fabs\u002Fpath\u002Fslide3_method_crop.png\"}`\n\nCollect results from all subagents and build the mapping: `slide_index → [crop filename, ...]` to reference in HTML. The filename will be `\u003Cname>_crop.png`.\n\n**Launch subagents for independent pages in parallel** when possible. Wait for all to complete before proceeding.\n\n---\n\n### Phase 5 — Measure Cropped Image Dimensions\n\nAfter cropping, get pixel dimensions:\n\n```bash\npython3 -c \"\nfrom PIL import Image; import os, json\nd = '\u003Cout_dir>\u002Fcrops'\nsizes = {}\nfor f in sorted(os.listdir(d)):\n    if f.endswith('.png'):\n        w, h = Image.open(os.path.join(d, f)).size\n        sizes[f] = {'width': w, 'height': h, 'aspect': round(w\u002Fh, 2)}\nprint(json.dumps(sizes, indent=2))\n\"\n```\n\nUse aspect ratios to pick each slide's layout:\n\n| Aspect ratio | Layout recommendation |\n|---|---|\n| **\u003C 0.7** (tall\u002Fnarrow) | `text + image` side-by-side — `max-height: 600px` on image |\n| **0.7 – 1.3** (square-ish) | `text + image` — image takes ~50% width |\n| **> 1.3** (wide) | Image on top or bottom, text above\u002Fbelow |\n| **> 2.0** (very wide, e.g. tables) | `full-image` — spans full 1280px width, caption below |\n\n---\n\n### Phase 6 — Generate Slides One by One\n\nFor each slide, write the HTML, save it to a temp file, then call `generate_slide.py`.\n\n**Step A — Write HTML** to `\u002Ftmp\u002Fslide_N.html`\n\n- All `\u003Cimg src=\"...\">` must use **relative paths**: `crops\u002F\u003Cname>_crop.png`\n- Do NOT use absolute paths or URLs for cropped images\n- Navigation is click-area based — no buttons needed:\n  - Clicking the **left half** of the slide navigates to the previous slide\n  - Clicking the **right half** of the slide navigates to the next slide\n  - On slide 1, left click does nothing; on the last slide, right click does nothing\n  - Keyboard `←` \u002F `→` arrows also navigate\n  - Implement with two transparent `\u003Cdiv>` overlays covering each half, positioned absolute over the slide canvas\n\n**Step B — Save slide:**\n```bash\npython {SKILL_DIR}\u002Fscripts\u002Fgenerate_slide.py \\\n    --html-file \u002Ftmp\u002Fslide_N.html \\\n    --index N \\\n    --total \u003Ctotal> \\\n    --title \"\u003Cpresentation title>\" \\\n    --out-dir \"\u003Cout_dir>\u002F\"\n```\n\nRepeat until all slides are saved.\n\n---\n\n### Phase 7 — Generate summary.md\n\nWrite `\u003Cout_dir>\u002Fsummary.md` in the same language as the slides (`lang` from `outline.json`).\n\nInclude:\n- Document title and basic info (authors, venue, year if applicable)\n- Brief abstract\u002Foverview (2–3 sentences)\n- Per-slide breakdown table: slide number, title, 1–2 sentence summary\n- Main contributions or takeaways (bullet list)\n- Link to `slide_01.html` to open the first slide\n\nExample structure:\n```markdown\n# [Presentation Title]\n\n> **来源 \u002F Source:** [PDF filename] | **语言 \u002F Language:** Chinese | **幻灯片数 \u002F Slides:** 10\n\n## 摘要\n[2-3 sentence overview]\n\n## 幻灯片概览\n| # | 标题 | 主要内容 |\n|---|------|---------|\n| 1 | 标题页 | ... |\n...\n\n## 主要贡献\n- ...\n\n## 📂 打开演示文稿\n[▶ 开始播放](slide_01.html)\n```\n\n---\n\n## HTML Slide Spec\n\nEach slide is a **standalone HTML file** — full `\u003Chtml>…\u003C\u002Fhtml>` with embedded CSS only.\n\n**Canvas:** fixed `1280 × 720 px`, `overflow: hidden` — nothing scrolls.\n\n**Consistent design across all slides:**\n- Choose a visual style that fits the document's domain and tone — no fixed palette or font required\n- If the user specifies a style, follow it exactly; otherwise infer from the content (e.g. a ML paper → clean modern; a historical report → editorial serif; a product pitch → bold and branded)\n- Same fonts, colors, and spacing system applied uniformly to every slide\n- Every slide shows: slide title, page counter (bottom-right corner), presentation title (subtle footer)\n\n**Navigation on each slide:**\n- Two transparent click areas cover the full slide height: left 50% → previous slide, right 50% → next slide\n- On slide 1 the left area is inert; on the last slide the right area is inert\n- Keyboard `←` \u002F `→` arrows also navigate\n- No visible buttons needed — optionally show a subtle `‹` \u002F `›` hint at the edges that fades in on hover\n\n**Layout patterns:**\n- `title-card` — centered hero, large title, authors\u002Fvenue below\n- `text-only` — structured bullet points, max 5–6 items, generous whitespace\n- `text + image` — image right or left, text opposite\n- `full-image` — image fills canvas, minimal text overlay\n- `grid` — 2×2 or 3-column figures with captions\n\n**Images:**\n- Use relative paths: `crops\u002F\u003Cname>_crop.png`\n- Add `style=\"object-fit: contain; max-width: 100%; max-height: 100%;\"`\n- Add captions below in small italic text\n\n**Do NOT:**\n- Use external JS frameworks or icon CDNs\n- Use placeholder\u002Fstock images — only the cropped PDFs\n- Generate generic purple-gradient-on-white slides\n- Let content overflow the 720px height\n\n---\n\n## Quality Checklist\n\n- [ ] Output directory named `\u003Cpdf_stem>_\u003Ctimestamp>\u002F`\n- [ ] `outline.json` saved with valid SlidesPlan schema\n- [ ] All crops saved to `crops\u002F` (local only, no cloud upload)\n- [ ] Each slide fits within 1280×720, nothing overflows\n- [ ] Consistent theme across all slides\n- [ ] Crop images referenced via relative path `crops\u002F\u003Cname>_crop.png`\n- [ ] Slide number and presentation title visible on every slide\n- [ ] Left\u002Fright click-area navigation works, keyboard arrows work\n- [ ] `summary.md` written in the correct language, links to `slide_01.html`\n\n---\n\n## Language\n\nMatch the PDF language. Chinese PDF → Chinese slides and summary. English → English. No mixing.\n",{"name":5,"metadata":24,"description":7},{"openclaw":25},{"emoji":26,"homepage":27,"requires":28},"📑","https:\u002F\u002Fgithub.com\u002Fzai-org\u002FGLM-V\u002Ftree\u002Fmain\u002Fskills\u002Fglmv-pdf-to-ppt",{"bins":29},[30],"python","main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills-v4\u002Fglmv-pdf-to-ppt",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill glmv-pdf-to-ppt",{"tool":46,"command":47},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill glmv-pdf-to-ppt",{"tool":49,"command":50},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill glmv-pdf-to-ppt","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills-v4\u002Fglmv-pdf-to-ppt\u002FSKILL.md",true,[54,60,64],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"scripts\u002Fcrop.py","SCRIPT","脚本",2631,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills-v4\u002Fglmv-pdf-to-ppt\u002Fscripts\u002Fcrop.py",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"scripts\u002Fgenerate_slide.py",4191,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills-v4\u002Fglmv-pdf-to-ppt\u002Fscripts\u002Fgenerate_slide.py",{"path":65,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":66,"sourceHtmlUrl":67},"scripts\u002Fpdf_to_images.py",2185,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills-v4\u002Fglmv-pdf-to-ppt\u002Fscripts\u002Fpdf_to_images.py",[69,76,83,90,97,104],{"skillNo":70,"name":71,"nameZh":6,"description":72,"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":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]