Communitygithub.com

前端投影片

從無到有製作或將 PowerPoint 檔案轉換成動畫豐富的 HTML 簡報。當使用者想建立簡報、將 PPT/PPTX 轉為網頁,或為演講/提案建立投影片時使用。幫助非設計師透過視覺探索而非抽象選擇來發現自己的美學風格。

前端投影片 是什麼?

前端投影片是一項 AI 代理技能,專為建立零依賴、動畫豐富的 HTML 簡報而設計,所有內容完全在瀏覽器中執行。它支援三種主要模式:從頭建立新簡報、從 .ppt/.pptx 檔案轉換,以及強化現有 HTML 簡報。該技能採用「視覺探索」方式來幫助使用者發現設計偏好,透過生成三份風格預覽投影片供使用者選擇,而非要求使用者從抽象選項中挑選。它嚴格要求每個投影片必須完全符合視窗大小(viewport fit),禁止內部捲動,並透過 clamp() 函式確保所有文字與間距可隨畫面縮放。輸出為單一自包含的 HTML 檔案,內嵌 CSS 與 JavaScript,包含鍵盤、觸控、滑鼠滾輪導航、進度指示器以及進入視窗動畫觸發器。支援 PowerPoint 轉換時偏好使用 python3 與 python-pptx 以保持跨平台相容性,並能保留投影片順序、備忘稿與提取的素材。該技能也注重無障礙設計,支援語意化 HTML 結構、鍵盤導航與 prefers-reduced-motion。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/frontend-slides

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

前端投影片 是做什麼的?

建立零依賴、動畫豐富的 HTML 簡報,完全在瀏覽器中執行。

靈感來自 zarazhangrui 作品中所展示的視覺探索方法(致謝:@zarazhangrui)。

何時啟用

  • 建立演講投影片組、提案投影片組、工作坊投影片組或內部簡報
  • 將 .ppt 或 .pptx 檔案轉換為 HTML 簡報
  • 改善現有 HTML 簡報的版面、動畫或排版
  • 與不確定設計偏好的使用者一起探索簡報風格

不可妥協的原則

  1. 零依賴:預設為單一自包含的 HTML 檔案,內嵌 CSS 和 JS。
  2. 視窗適應為強制要求:每個投影片必須完全符合一個視窗大小,不得有內部捲動。
  3. 展示,而非告知:使用視覺預覽而非抽象風格問卷。
  4. 獨特的設計:避免使用通用的紫色漸層、Inter 字體搭白背景、樣板化的投影片組。
  5. 成品品質:保持程式碼有註解、可無障礙存取、響應式且效能良好。

在產生內容之前,請先閱讀 STYLE_PRESETS.md 以了解視窗安全 CSS 基礎、密度限制、預設目錄及 CSS 陷阱。

工作流程

1. 偵測模式

選擇以下其中一個路徑:

  • 新簡報:使用者有主題、筆記或完整草稿
  • PPT 轉換:使用者有 .ppt 或 .pptx 檔案
  • 強化:使用者已有 HTML 投影片並希望改善

2. 發掘內容

只詢問最少必要的資訊:

  • 用途:提案、教學、會議演講、內部更新
  • 長度:短(5-10 頁)、中(10-20 頁)、長(20 頁以上)
  • 內容狀態:完成文稿、粗略筆記、僅有主題

如果使用者有內容,請他們在設定樣式前貼上內容。

3. 發掘風格

預設使用視覺探索。

如果使用者已經知道想要的預設樣式,則跳過預覽,直接使用。

否則:

  1. 詢問使用者希望投影片組傳達什麼感覺:印象深刻、活力充沛、專注、啟發靈感。
  2. 在 .ecc-design/slide-previews/ 目錄中產生 3 份單頁預覽檔案。
  3. 每個預覽必須是自包含的,清楚顯示排版 / 色彩 / 動畫,且投影片內容保持在約 100 行以內。
  4. 詢問使用者要保留哪個預覽,或想要混合哪些元素。

在將情緒對應到樣式時,請使用 STYLE_PRESETS.md 中的預設樣式指南。

4. 建立簡報

輸出以下其中一個檔案:

  • presentation.html
  • [簡報名稱].html

只有在簡報包含擷取或使用者提供的圖片時,才使用 assets/ 資料夾。

必要的結構:

  • 語意化的投影片區段
  • 來自 STYLE_PRESETS.md 的視窗安全 CSS 基礎
  • 用於主題值的 CSS 自訂屬性
  • 用於鍵盤、滾輪和觸控導覽的簡報控制器類別
  • 用於顯示動畫的 Intersection Observer
  • 減少動畫支援

5. 強制視窗適應

將此視為嚴格關卡。

規則:

  • 每個 .slide 必須使用 height: 100vh; height: 100dvh; overflow: hidden;
  • 所有字型和間距必須使用 clamp() 縮放
  • 當內容無法容納時,分割成多個投影片
  • 絕不透過將文字縮小到無法閱讀的大小來解決溢出問題
  • 絕不允許投影片內部出現捲軸

請使用 STYLE_PRESETS.md 中的密度限制和強制 CSS 區塊。

6. 驗證

在以下尺寸檢查完成的投影片組:

  • 1920x1080
  • 1280x720
  • 768x1024
  • 375x667
  • 667x375

如果瀏覽器自動化工具可用,使用它來驗證沒有投影片溢出,且鍵盤導覽正常運作。

7. 交付

在交接時:

  • 刪除暫存預覽檔案,除非使用者希望保留它們
  • 在適用的情況下,使用平台合適的開啟器開啟投影片組
  • 摘要說明檔案路徑、使用的預設樣式、投影片數量以及易於自訂主題的點

使用目前作業系統的正確開啟器:

  • macOS:open file.html
  • Linux:xdg-open file.html
  • Windows:start "" file.html

PPT / PPTX 轉換

針對 PowerPoint 轉換:

  1. 優先使用 python3 搭配 python-pptx 來擷取文字、圖片和備忘稿。
  2. 如果 python-pptx 不可用,詢問使用者是要安裝它,還是改用手動 / 匯出為主的工作流程。
  3. 保留投影片順序、備忘稿和擷取的素材。
  4. 擷取後,執行與新簡報相同的樣式選擇工作流程。

保持轉換跨平台。當 Python 可以完成工作時,不要依賴僅限 macOS 的工具。

實作需求

HTML / CSS

  • 除非使用者明確希望使用多檔案專案,否則使用內嵌 CSS 和 JS。
  • 字體可以來自 Google Fonts 或 Fontshare。
  • 偏好使用氛圍背景、強烈的字型層級和清晰的視覺方向。
  • 使用抽象形狀、漸層、網格、噪點和幾何圖案,而非插圖。

JavaScript

包含:

  • 鍵盤導覽
  • 觸控 / 滑動導覽
  • 滑鼠滾輪導覽
  • 進度指示器或投影片索引
  • 進入視窗動畫觸發器

無障礙

  • 使用語意化結構(main、section、nav)
  • 保持對比度可閱讀
  • 支援僅鍵盤導覽
  • 尊重 prefers-reduced-motion

內容密度限制

除非使用者明確要求更密集的投影片且可讀性仍然成立,否則使用以下最大值:

投影片類型限制
標題投影片1 個標題 + 1 個副標題 + 可選標語
內容投影片1 個標題 + 4-6 個要點或 2 個短段落
功能網格最多 6 張卡片
程式碼最多 8-10 行
引言1 段引言 + 出處
圖片1 張受視窗限制的圖片

反模式

  • 沒有視覺識別度的通用新創公司漸層
  • 系統字型投影片組,除非刻意追求編輯風格
  • 長篇要點牆
  • 需要捲動的程式碼區塊
  • 在短螢幕上會壞掉的固定高度內容區塊
  • 無效的否定 CSS 函式,如 -clamp(...)

相關 ECC 技能

  • frontend-patterns:用於圍繞投影片組的元件和互動模式
  • liquid-glass-design:當簡報刻意借用 Apple 玻璃美學時
  • e2e-testing:如果需要對最終投影片組進行自動化瀏覽器驗證

交付檢查清單

  • 簡報可從本機檔案在瀏覽器中執行
  • 每個投影片都符合視窗大小,無需捲動
  • 風格獨特且有目的性
  • 動畫有意義,而非雜亂
  • 減少動畫已受尊重
  • 交接時說明檔案路徑和自訂點

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

相關技能