Skip to content
Development
Skill

/eisland-dev-add-guide-step

创建 eIsland 引导配置窗口的新步骤页面。当用户要求在引导界面(Guide)中新增配置步骤、引导页面、引导分页时使用此 skill。 触发关键词:guide 步骤、引导页面、引导分页、Guide step、新建引导页、添加引导配置。 适用于 src/renderer/components/components/ 目录下的 Guide 模块。

From plugin
eisland
3559 skills8 commands

Claude Code

$ npx -y skills add JNTMTMTM/eIsland --skill eisland-dev-add-guide-step --agent claude-code

SKILL.md

eisland-dev-add-guide-step.SKILL.md
name: eisland-dev-add-guide-step
description: |
  创建 eIsland 引导配置窗口的新步骤页面。当用户要求在引导界面(Guide)中新增配置步骤、引导页面、引导分页时使用此 skill。
  触发关键词:guide 步骤、引导页面、引导分页、Guide step、新建引导页、添加引导配置。
  适用于 src/renderer/components/components/ 目录下的 Guide 模块。

Guide Step — 引导配置步骤创建

概述

eIsland 引导配置窗口采用分步架构,每个步骤是一个独立模块,位于 `src/renderer/components/components/Guide/<stepName>/`。

目录结构

每个步骤模块必须包含以下子目录(参考已有的 `language` 和 `smtc` 步骤):

Guide/<stepName>/
├── index.ts                    # 公共导出(仅导出主组件)
├── components/<StepName>.tsx   # 步骤组件
├── config/<stepName>Config.ts  # 常量配置
├── hooks/use<StepName>.ts      # 逻辑 Hook
├── types/index.ts              # 类型定义(Props 等)
└── utils/                      # 工具函数(可为空占位)

创建步骤

1. 创建目录与文件

在 `src/renderer/components/components/Guide/<stepName>/` 下创建完整模块结构。

2. 类型定义 (`types/index.ts`)

所有步骤组件必须接受 `StepProps`,包含 `onNext` 和 `onPrev` 回调:

export interface XxxStepProps {
  onNext: () => void;
  onPrev: () => void;
}

3. Hook (`hooks/useXxx.ts`)

将业务逻辑抽离到 Hook 中,组件只负责渲染。Hook 返回状态和操作函数。

4. 组件 (`components/XxxStep.tsx`)

组件使用标准布局结构:

export function XxxStep({ onNext, onPrev }: XxxStepProps): ReactElement {
  const { t } = useTranslation();

  return (
    <div className="guide-step">
      <div className="guide-step-header">
        <h2>{t('guide.xxx.title')}</h2>
        <p>{t('guide.xxx.subtitle')}</p>
      </div>
      {/* 步骤内容区域 */}
      <div className="guide-xxx-content">
        {/* ... */}
      </div>
      <div className="guide-step-footer">
        <button className="guide-prev-btn" onClick={onPrev}>
          {t('guide.actions.prev')}
        </button>
        <button className="guide-next-btn" onClick={onNext}>
          {t('guide.actions.next')}
        </button>
      </div>
    </div>
  );
}

5. 公共导出 (`index.ts`)

export { XxxStep } from './components/XxxStep';

6. i18n 翻译

在 `i18n/zh-CN.json` 和 `i18n/en-US.json` 的 `guide` 对象下添加步骤翻译键:

{
  "guide": {
    "xxx": {
      "title": "中文标题",
      "subtitle": "中文副标题"
    }
  }
}

所有用户可见文案必须使用 `t()` 包裹,禁止硬编码。

7. CSS 样式

在 `src/renderer/styles/guide/<stepName>.css` 中编写步骤专属样式,然后在 `src/renderer/styles/guide.css` 入口中添加 `@import`:

@import './guide/<stepName>.css';

样式命名规范:`.guide-<stepName>-*`,按钮复用 `.guide-next-btn` 和 `.guide-prev-btn`。

8. 接入引导流程

在 `src/renderer/guideMain.tsx` 中:

1. 导入新步骤组件 2. 在 `GuideStep` 联合类型中添加新步骤名 3. 在 JSX 中添加条件渲染 4. 连接 `onNext` / `onPrev` 回调切换步骤

type GuideStep = 'language' | 'smtc' | 'xxx';

// JSX 中:
{step === 'xxx' && <XxxStep onNext={handleXxxNext} onPrev={handleXxxPrev} />}

参考实现

已有步骤可作为参考:

  • `Guide/language/` — 语言选择步骤(含图标、禁用态、i18n 切换)
  • `Guide/smtc/` — SMTC 检查步骤(含检测状态机)

注意事项

  • 文件头必须包含 GPL-3.0 版权声明(参考已有文件)
  • 组件使用 `ReactElement` 返回类型(从 `react` 导入)
  • Hook 使用 `useCallback` / `useMemo` 优化性能
  • CSS 使用 rgba 白色透明色系,与 maxExpand 设置页风格一致
Read more
@jntmtmtm
Ships witheisland

eIsland - A sleek, Apple Dynamic Island inspired floating widget for Windows, built with Electron and Tauri.

Stars on GitHub

Momentum

stars in total
355
Star history of JNTMTMTM/eIsland on GitHub, a chart by star-history.com

Other skills on eisland.

eisland-dev-add-empty-state

eisland-dev-add-empty-…

为 eIsland 灵动岛添加一个新的空白状态机(IslandState)。当用户要求创建新状态、新页面、 新界面(如登录页、设置子页面、独立面板)时使用此 skill。即使用户只说"加个新状态"或 "创建一个 XX 页面",也应触发。此 skill…

@jntmtmtm@jntmtmtmInstall Skill
eisland-dev-add-maxexpand-tab

eisland-dev-add-maxexp…

为 eIsland 灵动岛的 MaxExpand(全展开)模式添加一个新的 Tab 页面。当用户要求创建新的 MaxExpand 页面、添加全展开界面组件(如计算器、时钟、天气面板、便签、日历等)时使用此 skill。 即使用户只说"新建一个…

@jntmtmtm@jntmtmtmInstall Skill
eisland-dev-add-svg-icon

eisland-dev-add-svg-ic…

Add a new SVG icon to the project's icon enum system with matching test assertions. Use this skill whenever the user asks to "add…

@jntmtmtm@jntmtmtmInstall Skill
eisland-dev-git-commit

eisland-dev-git-commit

Analyze the current git status, review all staged and unstaged changes, and create a commit with a proper English commit message…

@jntmtmtm@jntmtmtmInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react10d252k
@facebook@facebookInstall Skill

Questions about eisland-dev-add-guide-step.

Which coding agents can use eisland-dev-add-guide-step?
eisland-dev-add-guide-step installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.