Agent skill

Yida Ppt Slider

by openyida in openyida/openyida

宜搭全屏幻灯片页面开发,兼容旧 yida-ppt / PPT / 演示 / 幻灯片触发词,使用 React hooks 管理翻页、URL hash、键盘/演讲笔、全屏和副作用清理。支持浅色简约与 dark-tech 主题。平台 JSX 组件生命周期模式仅用于对应运行时维护。

MITAuto-check passedFrontend & Design

Install Yida Ppt Slider

skills CLI
$ npx skills add openyida/openyida --skill yida-ppt-slider -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install openyida/openyida yida-ppt-slider --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/openyida/openyida.git skills-src && mkdir -p .claude/skills && cp -r skills-src/yida-skills/skills/yida-ppt-slider .claude/skills/yida-ppt-slider && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
yida-ppt-slider
GitHub stars
221
Token cost
~1.6k tokens
SKILL.md length
284 words
Files
4 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

宜搭全屏幻灯片页面开发,兼容旧 yida-ppt / PPT / 演示 / 幻灯片触发词,使用 React hooks 管理翻页、URL hash、键盘/演讲笔、全屏和副作用清理。支持浅色简约与 dark-tech 主题。平台 JSX 组件生命周期模式仅用于对应运行时维护。

  • Works in 8 steps: 源码格式正确:不得把 .oyd.jsx、renderJsx、didMount… → 状态归 hooks:翻页、导航、语言、主题、全屏状态用 React hooks。 → 副作用必须清理:键盘、触摸、鼠标、hash、fullscreen、定时器和图表副作… → …
  • Tasks that involve React components
  • SKILL.md covers 核心定位, 适用场景, 致命规则 and 开发流程, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Yida Ppt Slider is an agent skill from openyida/openyida. 宜搭全屏幻灯片页面开发,兼容旧 yida-ppt / PPT / 演示 / 幻灯片触发词,使用 React hooks 管理翻页、URL hash、键盘/演讲笔、全屏和副作用清理。支持浅色简约与 dark-tech 主题。平台 JSX 组件生命周期模式仅用于对应运行时维护。

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/dark-tech-theme.md`, `references/echarts-race-example.md` and `references/examples.md`).

It sits in Frontend & Design, covering React components. It works with React. The repository describes itself as: Your own personal YiDA AI assistant! The licence is MIT.

When your agent uses it

  • Tasks that involve React components

Example prompts

  • “/yida-ppt-slider”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. 源码格式正确:不得把 .oyd.jsx、renderJsx、didMount 写成默认页面实现。
  2. 状态归 hooks:翻页、导航、语言、主题、全屏状态用 React hooks。
  3. 副作用必须清理:键盘、触摸、鼠标、hash、fullscreen、定时器和图表副作用均在 useEffect cleanup。
  4. 事件真实可触发:禁止 onClick={foo()}、小写 onclick;可见按钮必须有 handler 或 disabled。
  5. 图片完整展示:默认 object-fit: contain,不得裁掉关键演示素材。
  6. hash 双向同步:初始页读取 hash;翻页更新 hash;浏览器前进/后退能恢复页码。
  7. 全屏由用户手势触发:监听 fullscreenchange 同步 UI;卸载时移除监听。
  8. 页面级隐藏导航:演示页发布后配置 isRenderNav=false 并验证最终 URL;这不等同于应用导航隐藏。

What it can do on your machine

Read from SKILL.md and the folder at commit 4932d0b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Yida Ppt Slider loads about 1.6k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 38 tokens; SKILL.md has 284 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from openyida/openyida at commit 4932d0b, republished under its MIT licence (© openyida). 284 words, ~1,648 tokens.

Download SKILL.mdSave it as .claude/skills/yida-ppt-slider/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
yida-ppt-slider
description
宜搭全屏幻灯片页面开发,兼容旧 yida-ppt / PPT / 演示 / 幻灯片触发词,使用 React hooks 管理翻页、URL hash、键盘/演讲笔、全屏和副作用清理。支持浅色简约与 dark-tech 主题。平台 JSX 组件生命周期模式仅用于对应运行时维护。

宜搭 PPT 幻灯片开发指南

核心定位

本技能用于在宜搭内交付全屏演示页:

  • .canvas.jsx / .canvas.tsx + YidaComp 函数组件。
  • useState 管当前页、主题、语言、导航显隐和全屏状态。
  • useEffect 管键盘、hash、触摸、定时器和 cleanup。
  • useMemo 派生当前页与页码数据。
  • 常规图表默认交 yida-rechart;明确 ECharts/复杂 option 时才使用 yida-chart。

已有 .oyd.jsx / .oyb.jsx 或深度依赖平台实例桥时,按平台 JSX 组件运行时维护。

适用场景

用户意图触发条件处理方式
在宜搭内创建演示文稿"PPT"、"yida-ppt"、"幻灯片"、"演示页面"、"产品路演"使用本技能
需要读取宜搭数据的演示演示页要接入表单、权限或宜搭页面能力YidaCodeCanvas 组件 + yida-canvas-data-binding
纯静态演讲稿不依赖宜搭发布、不读取宜搭数据优先改用独立 HTML 幻灯片能力
维护已有 renderJsx / didMount PPT已有平台 JSX 组件页面或强依赖平台实例桥按平台 JSX 组件运行时维护

致命规则

  1. 源码格式正确:不得把 .oyd.jsx、renderJsx、didMount 写成默认页面实现。
  2. 状态归 hooks:翻页、导航、语言、主题、全屏状态用 React hooks。
  3. 副作用必须清理:键盘、触摸、鼠标、hash、fullscreen、定时器和图表副作用均在 useEffect cleanup。
  4. 事件真实可触发:禁止 onClick={foo()}、小写 onclick;可见按钮必须有 handler 或 disabled。
  5. 图片完整展示:默认 object-fit: contain,不得裁掉关键演示素材。
  6. hash 双向同步:初始页读取 hash;翻页更新 hash;浏览器前进/后退能恢复页码。
  7. 全屏由用户手势触发:监听 fullscreenchange 同步 UI;卸载时移除监听。
  8. 页面级隐藏导航:演示页发布后配置 isRenderNav=false 并验证最终 URL;这不等同于应用导航隐藏。

开发流程

bash
# 1. 只读检测
openyida env --json
openyida login --check-only --json

# 2. 已获授权后创建应用/页面(已有则跳过)
openyida create-app "<应用名>"
openyida create-page <appType> "<页面名>"

# 3. 编写 `.canvas.jsx` 源码
# project/pages/src/<页面名>.canvas.jsx

# 4. 本地快检(以 yida-canvas-custom-page 的 compileCanvasLocal 为准)

# 5. 用户确认内容与主题后发布
openyida publish project/pages/src/<页面名>.canvas.jsx <appType> <formUuid>

# 6. 隐藏宜搭导航并回读验证
openyida update-form-config <appType> <formUuid> false "<页面名>"
openyida get-schema <appType> <formUuid>

openyida check-page / openyida compile 是平台 JSX 组件页面校验,不是使用 YidaCodeCanvas 组件实现页面的默认验证步骤。

技术骨架

jsx
import React, { useCallback, useEffect, useMemo, useState } from 'react';

function clampPage(value, total) {
  return Math.max(0, Math.min(total - 1, value));
}

function readHashPage(total) {
  const raw = Number(window.location.hash.replace(/^#/, ''));
  return Number.isFinite(raw) && raw >= 1 ? clampPage(raw - 1, total) : 0;
}

function YidaComp() {
  const total = SLIDES.length;
  const [current, setCurrent] = useState(() => readHashPage(total));
  const [navVisible, setNavVisible] = useState(false);
  const [isFullscreen, setIsFullscreen] = useState(Boolean(document.fullscreenElement));

  const goTo = useCallback((next) => {
    setCurrent((previous) => clampPage(
      typeof next === 'function' ? next(previous) : next,
      total,
    ));
  }, [total]);

  useEffect(() => {
    const handleKeyDown = (event) => {
      if (['ArrowRight', 'ArrowDown', 'PageDown', ' '].includes(event.key)) {
        event.preventDefault();
        goTo((page) => page + 1);
      } else if (['ArrowLeft', 'ArrowUp', 'PageUp'].includes(event.key)) {
        event.preventDefault();
        goTo((page) => page - 1);
      } else if (event.key === 'Home') {
        goTo(0);
      } else if (event.key === 'End') {
        goTo(total - 1);
      }
    };
    window.addEventListener('keydown', handleKeyDown);
    return () => window.removeEventListener('keydown', handleKeyDown);
  }, [goTo, total]);

  useEffect(() => {
    const handleHashChange = () => setCurrent(readHashPage(total));
    window.addEventListener('hashchange', handleHashChange);
    return () => window.removeEventListener('hashchange', handleHashChange);
  }, [total]);

  useEffect(() => {
    const hash = '#' + String(current + 1);
    if (window.location.hash !== hash) history.replaceState(null, '', hash);
  }, [current]);

  useEffect(() => {
    const handleFullscreen = () => setIsFullscreen(Boolean(document.fullscreenElement));
    document.addEventListener('fullscreenchange', handleFullscreen);
    return () => document.removeEventListener('fullscreenchange', handleFullscreen);
  }, []);

  const slide = useMemo(() => SLIDES[current], [current]);
  return (
    <PresentationShell
      slide={slide}
      current={current}
      total={total}
      navVisible={navVisible}
      isFullscreen={isFullscreen}
      onNavigate={goTo}
      onNavVisibleChange={setNavVisible}
    />
  );
}

export default YidaComp;

触摸手势、鼠标底部热区、数字键缓冲和自动播放也分别放进 useEffect,每个 effect 独立 cleanup;不要把所有事件塞进一个难以维护的大 effect。

幻灯片数据与类型

SLIDES 放在组件外作为静态数据,或通过 props/数据桥加载;不要把全部文案硬编码在 JSX 分支中。

类型用途
cover封面
toc目录
chapter章节过渡
key-points要点列表
image-text图文混排
scene-image场景展示
two-images双图对比
chart业务图表,默认 yida-rechart
ending结束页

主题

theme风格适合场景
default浅色简约、内容优先技术分享、产品路演、培训
dark-tech深色、粒子/网格、电影级转场科技发布、沉浸演示

粒子背景用 <canvas> 时,在 React ref + useEffect 中初始化 requestAnimationFrame,cleanup 必须 cancelAnimationFrame、移除 resize 监听并释放引用。不要用固定 setTimeout 等 DOM。

响应式与交互

  • 响应式优先 CSS media query / matchMedia hook,不使用一次性 this.utils.isMobile()。
  • 页面根节点固定覆盖视口:position: fixed; inset: 0; overflow: hidden。
  • 键盘支持方向键、PageDown/PageUp、Home/End;演讲笔通常映射到这些键。
  • 数字键跳页用独立 hook 管缓冲与定时器,并在 cleanup 清除。
  • 底部导航默认隐藏,鼠标靠近底部或触摸时显示;移动端触控目标不少于 44px。
  • 图片使用 max-width/max-height: 100% + object-fit: contain。
  • prefers-reduced-motion 时关闭粒子、自动播放和大幅转场。

图表边界

  • 常规折线、柱、面积、饼/环、组合图:use_skill("yida-rechart", "在 Canvas 幻灯片中实现业务图表")。
  • 只有用户明确要求 ECharts、复杂 ECharts option、bar chart race 或旧 native ECharts 演示时,调用 yida-chart。
  • references/echarts-race-example.md 是明确 ECharts 的专项/legacy 参考,不是默认幻灯片骨架。

平台 JSX 组件维护注意事项

维护平台 JSX 组件页面或必须使用页面实例桥时:

  • 状态可用 _customState + forceUpdate。
  • 生命周期使用 didMount / didUnmount。
  • 移动端可用 this.utils.isMobile()。
  • 源码使用 .oyd.jsx,校验走 openyida check-page / openyida compile。

references/examples.md 和 references/dark-tech-theme.md 中标记为平台 JSX 组件/native 的代码只用于对应运行时维护;同等能力优先用 hooks 表达。

验收

  • Canvas 本地编译通过,发布后回读到非空 runtimeCode。
  • 方向键、PageUp/PageDown、hash 前进后退、全屏按钮、触摸翻页实际可用。
  • 离开页面后不再响应事件、轮询或动画。
  • 图片无关键裁切,手机竖屏可读,reduced-motion 有降级。
  • 平台导航隐藏,分享 URL 定位页码有效。
  • 使用 ECharts 时已明确记录命中的例外条件;否则图表默认 yida-rechart。

参考文档

文档用途
核心示例hooks 示例优先;旧 native 完整示例明确标记 legacy
dark-tech 主题粒子/转场原则;旧 renderJsx 框架只作 legacy
ECharts race 示例仅明确 ECharts/bar chart race 或维护旧实现时阅读
yida-canvas-data-binding演示页真实数据桥

© openyida, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in yida-skills/skills/yida-ppt-slider of openyida/openyida.

  • SKILL.md
  • references/dark-tech-theme.md
  • references/echarts-race-example.md
  • references/examples.md

Open the folder on GitHubat commit 4932d0b

Compare with similar skills

Yida Ppt Slider next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Yida Ppt Slider compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Yida Ppt Slider this skillopenyida/openyida221—~1.6kAutomated safety check: PassMIT
Web Artifacts Builderanthropics/skills180k40 repos~769Automated safety check: PassApache-2.0
React Router Developmentremix-run/react-router57k1 repos~1.5kAutomated safety check: PassMIT
React UI State PatternsChrisWiles/claude-code-showcase6.1k8 repos~1.6kAutomated safety check: PassNone
Chakra UI v3 Builderchakra-ui/chakra-ui41k—~3.1kAutomated safety check: PassMIT
React Component PerformanceDimillian/Skills4k5 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 40 repos~769 tokens
    Frontend & DesignAuto-check passed
  • React Router Development

    remix-run/react-router

    Guides work on React Router apps by first identifying whether the app uses Framework, Data or Declarative mode, then loading the matching reference and the installed package docs.

    57k GitHub starsUsed in 1 repo~1.5k tokens
    Frontend & DesignAuto-check passed
  • React UI State Patterns

    ChrisWiles/claude-code-showcase

    Sets patterns for React interfaces: when to show loading spinners or skeletons, how to surface errors, how to disable buttons during async work and how to handle empty lists.

    6.1k GitHub starsUsed in 8 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • Analyze and optimize React component performance issues (slow renders, re-render thrash, laggy lists, expensive computations).

    4k GitHub starsUsed in 5 repos~1.2k tokens
    Frontend & DesignAuto-check passed
  • React View Transitions Guide

    vercel-labs/next-beats

    Official

    Guides implementing animated page and state transitions in React with the native View Transition API, covering shared elements, list reorders and directional navigation.

    168 GitHub starsUsed in 10 repos~3.1k tokens
    Frontend & DesignAuto-check passed

More from openyida/openyida

All 59 skills in this repo
  • Yida Canvas Custom Page

    openyida/openyida

    宜搭自定义页面开发规范,使用 YidaCodeCanvas 组件实现现代 React18 自定义页面。用于官网、看板、工作台、列表、详情、门户壳、可视化、hooks 交互、表单入口,以及需要门户组件、数据管理视图、成员、部门或上传组件的场景;发布层自动注入 yida/utils window 桥。

    221 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Openyida Release

    openyida/openyida

    快速发布 OpenYida npm 正式版或测试版。用户说“发布正式版”“发布测试版”“发 beta”或要求按当天日期生成版本 tag 时使用;不用于宜搭应用或自定义页面发布。

    221 GitHub stars~520 tokensUpdated today
    Auto-check passed
  • Yida Design Plan

    openyida/openyida

    Plan 模式的视觉设计分支。基于需求选择视觉方向,再结合业务页面规划维护 build-plan.json 的 visualStyle,供 CLI 派生 design.md。

    221 GitHub stars~756 tokensUpdated today
    Auto-check passed
  • Prevent stale local OpenYida custom page source from overwriting live designer edits.

    221 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Codemap

    openyida/openyida

    Generate, update, or drift-check agent-facing CodeMaps as progressive code terrain indexes for projects, features, capabilities, functions, modules, or bug chains.

    221 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Sdd Riper One Light

    openyida/openyida

    面向 GPT-5.5 等强模型和熟练用户的轻量 AI Agent Harness / checkpoint-driven coding skill。默认用户已经把任务切到基本可执行的最小混沌单元;模型自行分解、探索与推进,人类通过最终目标、最小 spec、复述、checkpoint、证据验证与回写来低干扰控盘。

    221 GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Works with

Questions about Yida Ppt Slider

What does Yida Ppt Slider do?

宜搭全屏幻灯片页面开发,兼容旧 yida-ppt / PPT / 演示 / 幻灯片触发词,使用 React hooks 管理翻页、URL hash、键盘/演讲笔、全屏和副作用清理。支持浅色简约与 dark-tech 主题。平台 JSX 组件生命周期模式仅用于对应运行时维护。. Yida Ppt Slider is an agent skill from openyida/openyida.

When should I use Yida Ppt Slider?

Yida Ppt Slider fits situations like: tasks that involve React components.

How do I install Yida Ppt Slider in Claude Code?

Run `npx skills add openyida/openyida --skill yida-ppt-slider -a claude-code`. Or copy the skill folder (yida-skills/skills/yida-ppt-slider in openyida/openyida) into .claude/skills/yida-ppt-slider in your project. Claude Code loads it when a task matches its description.

How do I install Yida Ppt Slider in Codex?

Run `npx skills add openyida/openyida --skill yida-ppt-slider -a codex`. Or copy the skill folder (yida-skills/skills/yida-ppt-slider in openyida/openyida) into .agents/skills/yida-ppt-slider in your project. Codex loads it when a task matches its description.

Can I use Yida Ppt Slider in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add openyida/openyida --skill yida-ppt-slider -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/yida-ppt-slider, .gemini/skills/yida-ppt-slider, .github/skills/yida-ppt-slider and .opencode/skills/yida-ppt-slider in your project.

What does Yida Ppt Slider need to run?

SKILL.md names no scripts, command-line tools or credentials: Yida Ppt Slider is instructions for the agent only.

Does Yida Ppt Slider access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Yida Ppt Slider safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Yida Ppt Slider use?

Yida Ppt Slider is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Yida Ppt Slider use?

About 1.6k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.6k tokens, read only when the agent opens those files.

What are the alternatives to Yida Ppt Slider?

Skills that share tags, products or a category with Yida Ppt Slider: Web Artifacts Builder (anthropics/skills, 180k stars), React Router Development (remix-run/react-router, 57k stars), React UI State Patterns (ChrisWiles/claude-code-showcase, 6.1k stars) and Chakra UI v3 Builder (chakra-ui/chakra-ui, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Yida Ppt Slider?

openyida (a GitHub organization) maintains it in openyida/openyida, which has 221 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 10, 2026.

Source: openyida/openyida on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.