commit 51fcfa795f8051a7dd453cc08d30646d5bd3c55f Author: wehub-skill-sync Date: Mon Jul 13 21:35:40 2026 +0800 chore: import zh skill github-dashboard diff --git a/README.wehub.md b/README.wehub.md new file mode 100644 index 0000000..3b255cd --- /dev/null +++ b/README.wehub.md @@ -0,0 +1,9 @@ +# WeHub 来源说明 + +- Skill 名称:`github-dashboard` +- 中文类目:仓库/团队管理仪表盘 +- 上游仓库:`nexu-io__open-design` +- 上游路径:`design-templates/github-dashboard/SKILL.md` +- 上游链接:https://github.com/nexu-io/open-design/blob/HEAD/design-templates/github-dashboard/SKILL.md +- 本仓库为 WeHub 中文 Skill 汉化包,基于 skill 市场筛选 Top200 清单整理 +- 原作者、版权和许可证信息以上游仓库为准 diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..d0ef180 --- /dev/null +++ b/SKILL.md @@ -0,0 +1,130 @@ +--- +name: github-dashboard +description: | + GitHub 仓库分析看板 —— 星标、复刻、贡献者、 + Issue、Pull Request、近期活动及主要贡献者。当需求中提及 + GitHub 仓库看板、开源项目增长报告、仓库健康页面或 + GitHub 分析视图时使用。 +triggers: + - "github dashboard" + - "repo dashboard" + - "repository dashboard" + - "github analytics" + - "open source dashboard" + - "github growth" + - "仓库看板" + - "GitHub 看板" +od: + mode: prototype + platform: desktop + scenario: operation + preview: + type: html + entry: index.html + design_system: + requires: true + sections: [color, typography, layout, components] + outputs: + primary: index.html + secondary: + - template.html + - data.json + - artifact.json + - provenance.json + capabilities_required: + - shell + - file_write + example_prompt: "Build a GitHub dashboard for nexu-io/open-design — stars, forks, contributors, issues, PRs, recent activity, and top contributors." +--- + +# GitHub 看板技能 + +以 FlowAI / Soft Paper Workspace 视觉风格创建单个屏幕的 GitHub 仓库分析看板:暖白画布、白色圆角面板、固定左侧边栏、紧凑的 KPI 卡片、柔和色块、密集表格以及低对比度细线。 + +## 资源结构 + +``` +github-dashboard/ +├── SKILL.md +├── example.html ← 渲染后的参考看板 +└── references/ + ├── template.html ← 兼容 live-artifact 的 HTML 模板 + ├── example-data.json ← 标准化的公开 GitHub 数据形态 + ├── artifact-example.json ← 最简 live-artifact 创建输入 + └── provenance-example.json ← 安全的数据来源/溯源示例 +``` + +## 何时使用此技能 + +当用户请求针对单个 GitHub 仓库的看板或报告时使用,例如: + +- 仓库增长看板 +- 开源项目健康报告 +- GitHub 星标 / 复刻 / 贡献者分析 +- Issue 与 Pull Request 活动页面 +- 维护者 / 贡献者看板 + +如果用户要求可刷新、来源可审计或定时更新,则生成 live-artifact 源文件集(`template.html`、`data.json`、`artifact.json`、`provenance.json`)并遵循 `live-artifact` 约定。如果仅需可视化产物,则生成独立自包含的 `index.html`。 + +## 工作流程 + +1. **确认仓库范围** + - 从需求中解析 `owner/repo`。 + - 本 v1 版技能仅针对单个仓库。如果请求多个仓库,请用户选择主仓库,或为每个仓库分别创建看板。 + - 如果仓库缺失,用一句话询问 GitHub URL 或 `owner/repo`。 + +2. **收集公开 GitHub 数据** + - 优先使用 GitHub CLI/API 获取公开仓库数据。 + - 当前星标/复刻/关注者/开放 Issue 数量:`GET /repos/{owner}/{repo}`(`stargazers_count`、`forks_count`、`watchers_count`、`open_issues_count`)。 + - 贡献者:分页请求 `GET /repos/{owner}/{repo}/contributors?per_page=100&page=N`,按 `contributions` 降序排列,取看板使用的前 N 名。如果只取到第 1 页,将总数标注为首页估算值。 + - Issue:使用 GitHub 搜索 API(`repo:{owner}/{repo} is:issue`)获取总数,或分页请求 `GET /repos/{owner}/{repo}/issues?state=all` 并过滤掉含有 `pull_request` 字段的条目。 + - Pull Request:使用 GitHub 搜索 API(`repo:{owner}/{repo} is:pr`)获取总数,或分页请求 `GET /repos/{owner}/{repo}/pulls?state=all` 并通过 `Link` 头部统计页数。 + - 近期活动:合并最新的 Issue 和 Pull Request,将其规范化为可直接展示的行,预览列表控制在 5–10 条。 + - 增长/增量指标:GitHub REST 不提供完整的历史星标/复刻增量。可使用 GraphQL、星标事件快照、Events API(可用时),或在 `provenance.json` 中明确标注增量为估算/合成数据。 + - 不得存储认证令牌、原始 HTTP 信封、Cookie、速率限制头部或私有元数据。 + +3. **标准化为看板数据** + - 必填 `repository`:`name`、`fullName`、`url`、`description`、`language`、`license`、`created`、`lastUpdated`。 + - 必填 `metrics`:星标、复刻、贡献者、Issue、Pull Request。存储可直接展示的总数及小幅增量或增长说明。 + - 必填 `contributors`:前 5–8 位贡献者,包含 `login`、`avatar` 和 `contributions`。 + - 必填 `recentActivity`:可直接展示的行,包含 `title`、`typeText`、`typeClass`、`label`、`labelClass`、`author`、`authorAvatar` 和 `updated`。不得依赖模板条件判断来处理 Issue/PR 切换。 + - 图表数据仅在 GitHub 未暴露精确历史数据时可为合成数据;在 provenance 中记录转换过程。 + +4. **应用视觉系统** + - 存在活跃的 `DESIGN.md` 令牌时优先使用。 + - 如果未提供设计系统,使用 `references/template.html` 中所反映的 Soft Paper 默认值:`#F2F2F0` 画布、白色卡片、`#ECECEA` 边框、`#0A0A0A` 墨色、Geist/Inter 字体、256px 侧边栏、48px 顶栏、16px 卡片圆角。 + - 颜色使用应克制且具有语义:绿色代表健康指标、琥珀色代表警告、蓝色代表功能/PR 标签,红色仅用于缺陷或风险。 + +5. **布局页面** + - 外壳:256px 侧边栏 + 主面板,均为白色、圆角 16px、1px 细线边框。 + - 顶栏:左侧为仓库上下文,右侧为刷新/导出/操作入口。 + - 头部:仓库名称、描述及日期/设置/操作行。 + - KPI 条:5 张紧凑卡片,分别展示星标、复刻、贡献者、Issue、PR。 + - 主网格:2fr/1fr 分割,左侧为增长图表或活动表格,右侧为热门贡献者/健康卡片。 + - 页脚:以小号浅色文字显示来源/最后更新时间。 + +6. **写入产物** + - 对于静态产物,写入一个独立的 `index.html`,内联 CSS,不依赖外部 JS 库。 + - 对于 live artifact,写入 `template.html`、`data.json`、`artifact.json` 和 `provenance.json`;`index.html` 由守护进程派生。 + - 用稳定的 `data-od-id` 值标记主要区域:`sidebar`、`topbar`、`repo-header`、`kpi-strip`、`growth-chart`、`contributors`、`activity`、`provenance`。 + +## 视觉规则 + +- 仅限浅色模式。 +- 桌面端 256px 固定侧边栏;窄屏幕时堆叠排列。 +- 第一行放置 4 或 5 张 KPI 卡片。 +- 所有计数使用表格衬线数字。 +- 头像为圆形,表格和贡献者列表中为 28–32px。 +- 表格正文 13px,列表列标签 11px 大写,行分隔线 1px。 +- 卡片使用细线边框,最多使用几乎不可见的阴影:`0 1px 2px rgba(10,10,10,.04), 0 1px 1px rgba(10,10,10,.02)`。 +- 除小型工作流/仓库图标占位符外,不使用渐变。 +- 页面不得看起来像 GitHub 本身。这是一个自定义运营看板,而非 GitHub UI 克隆。 + +## 自查清单 + +- 每个指标都有来源或溯源说明。 +- 不持久化任何私有数据或凭据。 +- 数据标签与具体仓库对应,而非占位符。 +- 在 50% 缩放比例下屏幕仍清晰可读。 +- 每个区域最多使用一个纯黑色主要操作按钮。 +- 状态标签和 Issue/PR 标签为柔和色块,而非高饱和度徽章。 diff --git a/example.html b/example.html new file mode 100644 index 0000000..9fd683a --- /dev/null +++ b/example.html @@ -0,0 +1,473 @@ + + + + + + open-design — GitHub 仪表盘 + + + +
+ + +
+
+
+ + + + open-design 仪表盘 +
+
+ + +
+
+ +
+
+
+

nexu-io/open-design

+
本地优先、开源的 Anthropic Claude Design 替代方案。19 个技能 · 71 个品牌级 Design System · 生成网页/桌面/移动端原型 · 幻灯片 · 图片 · 视频
+
+ +
+ +
+ + +
+
+
+ + Star +
+
29,070
+
本周 +2,847
+
+ +
+
+ + Fork +
+
3,167
+
本周 +218
+
+ +
+
+ + 贡献者 +
+
87
+
12 位活跃
+
+ +
+
+ + 未关闭 Issue +
+
230
+
共 450 个
+
+ +
+
+ + Pull Request +
+
5
+
共 653 个
+
+
+
+ +
+
+
Star 增长(最近 30 天)
+
+
+
+ 第 1 周 +
+
+ 第 2 周 +
+
+ 第 3 周 +
+
+ 第 4 周 +
+
+
+
+ + +
+ +
+
+
最近活动
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
类型标题状态作者更新时间
+ PR + 添加支付宝商家入驻技能 + feature + +
+ + leilei926524-tech + + leilei926524-tech +
+
2 小时前
ISSUE在设置中保存 API 密钥后添加明确的成功反馈bug +
+ shangxinyu1 + shangxinyu1 +
+
2 小时前
ISSUEhermes json-rpc id 2: Invalid paramsbug +
+ zlpawn + zlpawn +
+
3 小时前
PRfix: 修复0.4.0版本聊天窗口宽度溢出问题bug-fix +
+ 1119302165 + 1119302165 +
+
4 小时前
ISSUE修复 Open Design 未从 Codex CLI 读取最新模型列表的问题bug +
+ shangxinyu1 + shangxinyu1 +
+
5 小时前
+
+
+
+ +
+
+
Fork 趋势(最近 30 天)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
仓库统计
+
+ + + + + + + + + + + + + + + + + + + + + + + +
主要语言TypeScript
许可证Apache-2.0
创建时间2026 年 4 月 28 日
最后更新2026 年 5 月 6 日
仓库大小112 MB
+
+
+
+ 数据更新于 2026 年 5 月 6 日,来源于公开的 GitHub API 字段。估算的趋势数据记录在 provenance.json 中。 +
+
+
+
+ + diff --git a/references/README.md b/references/README.md new file mode 100644 index 0000000..a692a8b --- /dev/null +++ b/references/README.md @@ -0,0 +1,10 @@ +# GitHub Dashboard 参考资料 + +这些文件是从公开的 `nexu-io/open-design` dashboard 产物(artifact)中生成的示例。 + +- `template.html` —— 一个兼容实时产物(live-artifact)的模板,使用转义的 `{{data.path}}` 绑定。 +- `example-data.json` —— 精简且归一化的 GitHub Dashboard 数据。 +- `artifact-example.json` —— 用于可刷新的实时产物的最小化守护进程创建输入。 +- `provenance-example.json` —— 针对公开 GitHub API 来源及其转换操作的安全溯源说明。 + +请将这些文件作为实现时的参考,而非强制性输出。该技能(skill)可根据用户对可刷新性的需求,生成静态的 `index.html` 或实时产物源文件集。 diff --git a/references/artifact-example.json b/references/artifact-example.json new file mode 100644 index 0000000..cd2fe39 --- /dev/null +++ b/references/artifact-example.json @@ -0,0 +1,15 @@ +{ + "title": "Open Design GitHub Dashboard", + "slug": "open-design-github-dashboard", + "status": "active", + "preview": { + "type": "html", + "entry": "index.html" + }, + "document": { + "format": "html_template_v1", + "templatePath": "template.html", + "generatedPreviewPath": "index.html", + "dataPath": "data.json" + } +} diff --git a/references/example-data.json b/references/example-data.json new file mode 100644 index 0000000..adcb49c --- /dev/null +++ b/references/example-data.json @@ -0,0 +1,138 @@ +{ + "repository": { + "name": "open-design", + "fullName": "nexu-io/open-design", + "url": "https://github.com/nexu-io/open-design", + "description": "Local-first, open-source alternative to Anthropic's Claude Design. 19 Skills · 71 brand-grade Design Systems · Generate web/desktop/mobile prototypes · slides · images · videos", + "language": "TypeScript", + "license": "Apache-2.0", + "created": "Apr 28, 2026", + "lastUpdated": "May 6, 2026", + "size": "112 MB" + }, + "metrics": { + "stars": { + "total": "29,070", + "growth": "2,847" + }, + "forks": { + "total": "3,167", + "growth": "218" + }, + "contributors": { + "total": "87", + "active": "12" + }, + "issues": { + "open": "230", + "total": "450" + }, + "pullRequests": { + "open": "5", + "total": "653" + } + }, + "charts": { + "starGrowth": [ + { "label": "W1", "height": 45 }, + { "label": "W2", "height": 62 }, + { "label": "W3", "height": 78 }, + { "label": "W4", "height": 100 } + ], + "forkTrend": [ + { "height": 35 }, + { "height": 42 }, + { "height": 48 }, + { "height": 55 }, + { "height": 61 }, + { "height": 68 }, + { "height": 74 }, + { "height": 82 }, + { "height": 88 }, + { "height": 95 }, + { "height": 100 } + ] + }, + "contributors": [ + { + "login": "pftom", + "avatar": "https://avatars.githubusercontent.com/u/26423749?v=4", + "contributions": 26 + }, + { + "login": "lefarcen", + "avatar": "https://avatars.githubusercontent.com/u/20859779?v=4", + "contributions": 18 + }, + { + "login": "Sid-Qin", + "avatar": "https://avatars.githubusercontent.com/u/201593046?v=4", + "contributions": 17 + }, + { + "login": "nettee", + "avatar": "https://avatars.githubusercontent.com/u/3953668?v=4", + "contributions": 10 + }, + { + "login": "alchemistklk", + "avatar": "https://avatars.githubusercontent.com/u/56862773?v=4", + "contributions": 9 + } + ], + "recentActivity": [ + { + "typeText": "PR", + "typeClass": "pr", + "title": "Add Alipay merchant onboarding skill", + "label": "feature", + "labelClass": "feature-pill", + "author": "leilei926524-tech", + "authorAvatar": "https://avatars.githubusercontent.com/u/238133142?v=4", + "updated": "2 hours ago" + }, + { + "typeText": "ISSUE", + "typeClass": "issue", + "title": "Add clear success feedback after saving API keys in Settings", + "label": "bug", + "labelClass": "danger-pill", + "author": "shangxinyu1", + "authorAvatar": "https://avatars.githubusercontent.com/u/237175303?v=4", + "updated": "2 hours ago" + }, + { + "typeText": "ISSUE", + "typeClass": "issue", + "title": "hermes json-rpc id 2: Invalid params", + "label": "bug", + "labelClass": "danger-pill", + "author": "zlpawn", + "authorAvatar": "https://avatars.githubusercontent.com/u/42241934?v=4", + "updated": "3 hours ago" + }, + { + "typeText": "PR", + "typeClass": "pr", + "title": "fix: 修复0.4.0版本聊天窗口宽度溢出问题", + "label": "bug-fix", + "labelClass": "active-pill", + "author": "1119302165", + "authorAvatar": "https://avatars.githubusercontent.com/u/12208097?v=4", + "updated": "4 hours ago" + }, + { + "typeText": "ISSUE", + "typeClass": "issue", + "title": "Fix Open Design not reading the latest model list from Codex CLI", + "label": "bug", + "labelClass": "danger-pill", + "author": "shangxinyu1", + "authorAvatar": "https://avatars.githubusercontent.com/u/237175303?v=4", + "updated": "5 hours ago" + } + ], + "metadata": { + "lastUpdated": "May 6, 2026" + } +} diff --git a/references/provenance-example.json b/references/provenance-example.json new file mode 100644 index 0000000..7fc2466 --- /dev/null +++ b/references/provenance-example.json @@ -0,0 +1,92 @@ +{ + "sources": [ + { + "type": "github_api", + "description": "GitHub REST API v3", + "endpoints": [ + "GET /repos/nexu-io/open-design", + "GET /repos/nexu-io/open-design/contributors?per_page=100&page=1", + "GET /search/issues?q=repo:nexu-io/open-design+is:issue", + "GET /search/issues?q=repo:nexu-io/open-design+is:pr" + ], + "fetchedAt": "2026-05-06T09:30:00Z" + } + ], + "fields": [ + { + "path": "repository.fullName", + "source": "GET /repos/nexu-io/open-design", + "field": "full_name" + }, + { + "path": "metrics.stars.total", + "source": "GET /repos/nexu-io/open-design", + "field": "stargazers_count" + }, + { + "path": "metrics.forks.total", + "source": "GET /repos/nexu-io/open-design", + "field": "forks_count" + }, + { + "path": "metrics.contributors.total", + "source": "GET /repos/nexu-io/open-design/contributors?per_page=100&page=N", + "field": "paginated unique contributor count", + "note": "Display value may be capped or labelled as an estimate when only page 1 is available." + }, + { + "path": "metrics.issues.total", + "source": "GET /search/issues?q=repo:nexu-io/open-design+is:issue", + "field": "total_count" + }, + { + "path": "metrics.pullRequests.total", + "source": "GET /search/issues?q=repo:nexu-io/open-design+is:pr", + "field": "total_count" + }, + { + "path": "charts.starGrowth", + "source": "estimated", + "note": "GitHub REST does not expose full historical star deltas; heights are display-normalized from available recent growth signals." + }, + { + "path": "charts.forkTrend", + "source": "synthetic", + "note": "Generated as normalized 0-100% chart heights for visual trend preview." + } + ], + "transformations": [ + { + "step": "Data normalization", + "description": "Converted GitHub API responses to compact dashboard format", + "operations": [ + "Formatted large numbers with comma separators", + "Estimated star and fork growth trends and marked them as non-auditable estimates", + "Extracted top 5 contributors by contribution count", + "Selected most recent 5 issues and pull requests", + "Generated normalized chart-height values for star growth and fork trends" + ] + }, + { + "step": "Privacy filtering", + "description": "Applied safe data practices", + "operations": [ + "Preserved only public GitHub profile information", + "Used public avatar URLs", + "Excluded sensitive or internal repository metadata" + ] + } + ], + "notes": [ + "Current repository totals are sourced from public GitHub API endpoints; growth series are explicitly estimated or synthetic as documented in fields[].", + "No authentication tokens or credentials stored", + "Star growth is estimated from available recent growth signals, not directly auditable from GitHub REST alone", + "Fork growth is synthetic for preview purposes", + "Chart heights are normalized percentages for responsive display" + ], + "refreshPolicy": { + "recommended": "hourly", + "minInterval": "15 minutes", + "note": "GitHub API has rate limits; recommend caching for production use" + } +} diff --git a/references/template.html b/references/template.html new file mode 100644 index 0000000..01467c6 --- /dev/null +++ b/references/template.html @@ -0,0 +1,473 @@ + + + + + + {{data.repository.name}} — GitHub 仪表盘 + + + +
+ + +
+
+
+ + + + {{data.repository.name}} 仪表盘 +
+
+ + +
+
+ +
+
+
+

{{data.repository.fullName}}

+
{{data.repository.description}}
+
+ +
+ +
+ + +
+
+
+ + Stars +
+
{{data.metrics.stars.total}}
+
本周 +{{data.metrics.stars.growth}}
+
+ +
+
+ + Forks +
+
{{data.metrics.forks.total}}
+
本周 +{{data.metrics.forks.growth}}
+
+ +
+
+ + 贡献者 +
+
{{data.metrics.contributors.total}}
+
{{data.metrics.contributors.active}} 活跃
+
+ +
+
+ + 开放的 Issue +
+
{{data.metrics.issues.open}}
+
共 {{data.metrics.issues.total}} 个
+
+ +
+
+ + Pull Request +
+
{{data.metrics.pullRequests.open}}
+
共 {{data.metrics.pullRequests.total}} 个
+
+
+
+ +
+
+
Star 增长(近 30 天)
+
+
+
+ {{data.charts.starGrowth.0.label}} +
+
+ {{data.charts.starGrowth.1.label}} +
+
+ {{data.charts.starGrowth.2.label}} +
+
+ {{data.charts.starGrowth.3.label}} +
+
+
+
+ + +
+ +
+
+
近期活动
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
类型标题状态作者更新于
+ {{data.recentActivity.0.typeText}} + {{data.recentActivity.0.title}} + {{data.recentActivity.0.label}} + +
+ + {{data.recentActivity.0.author}} + + {{data.recentActivity.0.author}} +
+
{{data.recentActivity.0.updated}}
{{data.recentActivity.1.typeText}}{{data.recentActivity.1.title}}{{data.recentActivity.1.label}} +
+ {{data.recentActivity.1.author}} + {{data.recentActivity.1.author}} +
+
{{data.recentActivity.1.updated}}
{{data.recentActivity.2.typeText}}{{data.recentActivity.2.title}}{{data.recentActivity.2.label}} +
+ {{data.recentActivity.2.author}} + {{data.recentActivity.2.author}} +
+
{{data.recentActivity.2.updated}}
{{data.recentActivity.3.typeText}}{{data.recentActivity.3.title}}{{data.recentActivity.3.label}} +
+ {{data.recentActivity.3.author}} + {{data.recentActivity.3.author}} +
+
{{data.recentActivity.3.updated}}
{{data.recentActivity.4.typeText}}{{data.recentActivity.4.title}}{{data.recentActivity.4.label}} +
+ {{data.recentActivity.4.author}} + {{data.recentActivity.4.author}} +
+
{{data.recentActivity.4.updated}}
+
+
+
+ +
+
+
Fork 趋势(近 30 天)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
仓库统计
+
+ + + + + + + + + + + + + + + + + + + + + + + +
主要语言{{data.repository.language}}
许可证{{data.repository.license}}
创建时间{{data.repository.created}}
最后更新{{data.repository.lastUpdated}}
仓库大小{{data.repository.size}}
+
+
+ +
+
+
+ +