Token导航 LogoToken导航

Agent Skill · 前端设计

c4-interactive-html(C4 interactive HTML 命令行)

c4-interactive-html 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

c4-interactive-html 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 8,476。

总安装 282周安装 12GitHub Stars 4下载 99核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:c4-interactive-html(C4 interactive HTML 命令行)
来源仓库:https://github.com/wghust/stark-skills
仓库路径:skills/c4-interactive-html
安装命令:
npx skills add https://github.com/wghust/stark-skills --skill c4-interactive-html
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wghust/stark-skills --skill c4-interactive-html

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于生成交互式 C4 架构查看器,支持多级导航。适用于 Codex、Claude、Cursor、Gemini CLI,匹配用户语言。提供 L1/L2/L3 层级展示和搜索功能。

安装方式:github,命令为 npx skills add https://github.com/wghust/stark-skills --skill c4-interactive-html。建议确认设计锚点和项目结构,确保交互准确。

来源仓库内路径:skills/c4-interactive-html

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wghust/stark-skills --skill c4-interactive-htm…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

c4-interactive-html 怎么安装?

在终端执行 npx skills add https://github.com/wghust/stark-skills --skill c4-interactive-html。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

c4-interactive-html 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

c4-interactive-html 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

c4-interactive-html 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

c4-interactive-html 用的人多吗?

公开数据是累计安装 282 次,近一周安装 12 次,下载 99 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

c4-interactive-html 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
c4-interactive-html

C4 interactive HTML 命令行 · 本页

2824操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

c4-interactive-html

Language: Match the user's language (中文提问则中文回复).

When this skill applies, the agent MUST analyze the user's current workspace project (the opened repo), then generate one self-contained HTML file that implements the interactive C4 viewer described below. Do not only describe the HTML—write the file to disk.


Architectural anchors (from design)

  • L1: The current product/repo is the core system (highlighted, only node that drills to L2).
  • L2: Containers arranged in a left-to-right columnar layout inside a dashed system boundary box; only the container that has L3 content shows the drill badge.
  • L3: Exactly one chosen core container (e.g. main API or main web app) is expanded; others stay at L2 only.
  • Evidence: Prefer facts from files; in the side panel, state inference basis when uncertain (e.g. "inferred from docker-compose.yml").

Step 1 · Analyze project architecture

Read enough of the repo to justify the diagram:

Build & package

  • pom.xml, build.gradle, package.json, go.mod, requirements.txt, Cargo.toml, etc.

Config & ops

  • application.yml, docker-compose.yml, Dockerfile, .env (or .env.example)

Entry & layout

  • App entry points, src/ or language-idiomatic structure, notable modules

C4 elements to identify

LevelWhat to capture
PeopleEnd users, admins, operators, integrators—who uses or operates the system
L1 Software systemThis system + external dependencies (DB, MQ, 3rd-party APIs, other microservices)
L2 ContainersDeployable/runnable units: web apps, APIs, workers, DB, cache, brokers, etc.
L3 ComponentsInside one core container: controllers/services/repositories/modules—only the most important slice

Large or unclear repos: Prefer a representative L3; merge minor pieces into grouped nodes; document scope in node sub or side panel.


Step 2 · Build the interactive HTML

Overall design

Navigation UI (unchanged): The top bar (project name + clickable breadcrumb L1 / L2 / L3) and the legend row (colored category dots below the breadcrumb) are fixed navigation elements—do not alter their appearance. All visual rules in the sections below apply exclusively to the SVG canvas drawing area that occupies the rest of the page.
  • Theme: Light, professional—white/light gray background, clean typography.
  • Top bar: Project name + breadcrumb L1 / L2 / L3 (each segment clickable to go back to that level). *Unchanged.*
  • Legend row: Colored dots for node categories (People / core / external / interface / domain / infra, etc.—align with your legends data). *Unchanged.*

Canvas drawing area

Everything below lives inside the SVG canvas drawing zone (below the navigation chrome).

Diagram title block (top-center of canvas)

Render a centered title block at the very top of the SVG/canvas area—not as the browser <title> tag:

  • Bold title (large): Container View: <project-name> for L2; System Context: <project-name> for L1; Component View: <container-name> for L3.
  • Subtitle (small, gray): one-sentence architectural scope derived from the project README first sentence, or composed by the agent (e.g. "展示接口层、应用层、领域层、基础设施层的分层架构。"). Keep ≤ 80 characters.

Three canvases

1) L1 System Context (default)

  • Layout: People (left), core system (center, highlighted, clickable → L2), external systems (right).
  • SVG curved edges between nodes; label protocol when known (HTTP, gRPC, MQ, JDBC, etc.).
  • Only the core system shows a "点击下钻" (or "Drill down ↓") badge; all other nodes use opacity: 0.5 (dimmed).
  • Click core → switch canvas to L2.
  • Click dimmed node → open right panel (relationships + description); do not change level.

2) L2 Containers

System boundary box: Draw a dashed/dotted rectangle around all internal containers. At its top-center place a label <system-name> [system]. This box is only on L2—not on L1 or L3.

Left-to-right columnar layout (People outside boundary, internal layers inside):

[Outside boundary, left]       [Inside dashed boundary box]

People / External          ┌─接口层──┬──应用层──┬──领域层──┬──基础设施层─┐
trigger systems            │         │          │          │             │
(边界框外左侧)              │  nodes  │  nodes   │  nodes   │   nodes     │
                           └─────────┴──────────┴──────────┴─────────────┘
  • People and external trigger systems sit outside the boundary box, to its left; their edges cross the box border into the interface-layer containers.
  • Internal containers are arranged as vertical columns left → right: interface layer → application layer → domain layer → infrastructure layer (or detected equivalents).
  • Each column has a small gray column-header label at the top (e.g. 接口层, 应用层); columns are separated by a subtle visual gap.
  • Infrastructure layer with 6+ nodes MAY wrap into two rows instead of stretching horizontally.
  • Canvas min-width: 1200px; allow horizontal scrolling so the layout is never clipped on narrow screens.
  • SVG curved edges for calls/data flow.
  • Only the container that has L3 content: colored border + drill badge + cursor: pointer.
  • Containers without L3: dimmed (opacity: 0.5), no badge; click opens panel only.
  • Click drillable container → L3.

3) L3 Components

  • Components grouped by function; SVG edges for dependencies.
  • Every node click opens the side panel (no further drill level required).

Right panel

  • Fixed width 380px, slides in from the right.
  • Shows: name, level badge (L1/L2/L3), description, related relationships (list of edges touching the node).
  • ESC or × closes the panel.

Node styling

Each node card uses a three-part layout (matches the c4.png reference design):

┌──────────────────────────────────┐
│  REST API                        │  ← bold name  (label)
│  [Spring Boot REST]              │  ← [tech]  italic / secondary-gray
│                                  │
│  对外提供 HTTP 接口,包含 AI、     │  ← multi-line description (sub)
│  标签 6 个 Controller。          │    small font, wraps naturally
└──────────────────────────────────┘
  • label: bold, top of card.
  • tech *(new, optional)*: rendered as [<tech>] in italic or secondary-gray on line 2. Omit the line entirely if tech is absent or empty.
  • sub: small multi-line description. Truncate with … if it overflows the card max height; show full text in the side panel.
  • Node minimum height should accommodate ~3 lines of text.

Drill / dim / select states:

  • Drillable: colored border/background treatment + top-right badge "点击下钻 ↓" + cursor: pointer.
  • Non-drillable: opacity: 0.5, no badge; click → panel only.
  • Selected: blue glow/shadow; incident edges emphasized; other edges and nodes fade.

Edge label convention

Render all edge protocol/call-style labels enclosed in square brackets: [HTTPS], [Java Method], [Spring Event], [Feign/HTTP], [JDBC], etc.

  • The renderer wraps the protocol value in brackets automatically—do not include brackets in the data field.
  • Position the label mid-edge, small font, with sufficient contrast (e.g. light-background pill or gray text on white).
  • If protocol is absent, draw the arrow but show no label.

Data shape (embed in HTML)

Use one object per level (names L1, L2, L3—be consistent in JS):

const L1 = {
  nodes: [
    {
      id: 'unique-id',
      label: '显示名称',          // bold node name
      tech: 'Spring Boot REST',   // optional — rendered as [Spring Boot REST]
      sub: '描述 / 推断依据',      // multi-line description
      c: 'color-key',
      x: 0,
      y: 0,
      w: 200,
      drill: true,
      drillTo: 'L2',
    },
  ],
  edges: [
    { f: 'from-id', t: 'to-id', c: 'color-key', protocol: 'HTTP' },
    // protocol value is auto-wrapped as [HTTP] by the renderer
  ],
  layers: [{ y: 120, label: '层名称', color: '#ccc' }],
  legends: [{ c: 'core', l: '核心系统' }],
};
  • c: maps to the palette / CSS class for node category.
  • No external JSON fetch—all data inline in the same file.

Color palette (light mode)

  • Background #f5f7fa, cards #ffffff, hover #f0f2f5
  • Core: #1168BD · Domain/data: #2b8a3e · External/AI: #6f42c1 · Interface: #d4620a · Governance: #b8860b

Fonts

  • Allowed external dependency: Google Fonts CDN (e.g. a Latin + CJK-friendly stack). If CDN is undesirable, use a system font stack that supports Chinese: e.g. system-ui, "PingFang SC", "Microsoft YaHei", sans-serif.

Canvas legend (bottom-right, C4 notation)

Place a compact C4 notation legend in the bottom-right corner of the canvas (inside the SVG drawing area, separate from the navigation legend row above):

SymbolVisualLabel
PersonPerson-silhouette SVG icon (circle head + body outline) or 👤 Unicode fallbackperson
Software SystemPlain rectangle outlinesystem
ContainerFilled / shaded rectanglecontainer

Prefer inline SVG paths for cross-browser consistency; use Unicode + CSS as fallback. Ensure the legend does not overlap nodes or edges.


Layout quality

  • Avoid overlapping nodes; keep edge labels readable; use canvas size / coordinates so the diagram fits a typical laptop viewport with scroll as fallback.

Step 3 · Output path

  1. Default filename: c4-<dirname>-architecture.html where <dirname> is the basename of the workspace root (e.g. workspace at /projects/my-app → c4-my-app-architecture.html). Sanitize <dirname>: replace spaces and non-alphanumeric characters with -; lowercase preferred. Save at the workspace root.
  2. User override (same turn): if the user specifies a filename or path, honor it exactly and skip the dynamic naming rule.
  3. Multi-root workspace: if several folders are open and the user did not specify a project, use the root that was the focus of architecture analysis, or ask which root to use before writing.
  4. Unknown root or not writable: do not silently fall back to ~/Downloads or elsewhere. Ask the user for an explicit directory or full file path and state the reason (e.g. permission, ambiguous root).
  5. After writing, confirm the absolute path in the assistant message.

Acceptance checklist (before finishing)

  • Single file, opens in a normal browser; no npm/build step.
  • Navigation UI unchanged: top bar breadcrumb and legend dot row look the same as the base skill spec.
  • Canvas title block (bold title + subtitle) visible at top of drawing area.
  • L2: system dashed boundary box present; People nodes outside boundary to the left; left→right column layout with column-header labels.
  • Nodes show three-part layout: bold name + [tech] (if present) + multi-line description.
  • Edge labels appear as [protocol] mid-edge; no label when protocol absent.
  • Canvas bottom-right C4 legend symbols (person / system / container) present and not obscuring nodes.
  • Breadcrumb, L1/L2/L3 drill behavior, panel, ESC close, selection highlight—all functional.
  • Core system-only drill on L1; single L3 target; dimmed nodes behave as specified.
  • Chinese labels render correctly (<meta charset="utf-8"> + fonts).
  • Filename is c4-<dirname>-architecture.html (or user-specified); absolute path confirmed in reply.

Related doc

See USAGE.md in this folder for FAQs (path override, minimal backends, offline fonts).

平台分布

Codex

37.15%
按下载量换算37

Claude

32.61%
按下载量换算32

Cursor

16.99%
按下载量换算17

Gemini CLI

9.36%
按下载量换算9

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills