feat: add initial skill authoring workspace

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
木炎
2026-04-02 18:34:56 +08:00
parent a461b0734e
commit 51913555ad
30 changed files with 7114 additions and 0 deletions

View File

@@ -0,0 +1,103 @@
---
name: zhihu-hotlist-screen
description: Use when the user wants to turn collected Zhihu hotlist data into an ECharts dashboard, leadership demo screen, or new-tab HTML presentation artifact.
version: 0.1.0
author: sgclaw
tags:
- zhihu
- browser
- hotlist
- echarts
- dashboard
---
# Zhihu Hotlist Screen
Convert an already collected Zhihu hotlist artifact into a local ECharts `.html` dashboard for leadership demos. This skill is downstream-only: it consumes the structured artifact from `zhihu-hotlist` and hands it to `screen_html_export`.
## When to Use
- The user asks for知乎热榜大屏、看板、dashboard、ECharts 演示页。
- The user wants a leadership demo artifact that can be opened in a 新标签页.
- An upstream collection step already produced ordered hotlist rows.
- The final deliverable should be a local `.html` page instead of Excel.
Do not use this skill for:
- recollecting Zhihu data from scratch when no hotlist artifact exists
- replacing `zhihu-hotlist` as the browser collection skill
- exporting Office files such as `.xlsx`
## Upstream Browser Contract
- Upstream Zhihu collection still belongs to `zhihu-hotlist`, which uses `superrpa_browser` inside the sgClaw browser host.
- Upstream browser calls must keep `expected_domain` as a bare hostname such as `www.zhihu.com`.
- Upstream selectors must remain valid CSS selectors only.
- This skill does not invent new browser steps. It transforms the collected artifact after upstream browser work is stable.
## Required Input Artifact
Use the ordered artifact produced by `zhihu-hotlist`:
```json
{
"source": "https://www.zhihu.com/hot",
"sheet_name": "知乎热榜",
"columns": ["rank", "title", "heat"],
"rows": [[1, "标题", "344万"]]
}
```
Rules:
- `rows` is the primary payload for this skill.
- Preserve the captured ranking order.
- Do not invent extra rows that were not collected upstream.
- If the upstream artifact is partial, keep that status visible in the final summary.
## Tool Contract
- Call `screen_html_export` to render the final ECharts dashboard.
- The tool result must include a local `.html` path.
- The tool result must include a `presentation` object for 新标签页 delivery.
- Prefer `presentation.url` as the browser-open target.
- Do not use `shell` as the primary rendering path.
## Workflow
1. Confirm that an upstream hotlist artifact with ordered `rows` already exists.
2. If the upstream artifact is missing, incomplete, or blocked by a login/verification condition, stop and report that upstream collection must be fixed first.
2. Load [render-flow.md](references/render-flow.md) and prepare the dashboard payload.
3. Call `screen_html_export`.
4. Return the final local `.html` path plus the `presentation` object.
5. State explicitly that the final呈现 should open `presentation.url` in a 新标签页.
Do not:
- recollect Zhihu browser data inside this downstream skill
- restart browser probing after the upstream artifact is already stable
- hide upstream partial-data or blocked-page status in the final dashboard summary
## Output
Return a concise result with:
- artifact type: `echarts_dashboard`
- source snapshot identifier
- local `.html` output path
- `presentation` object
- whether the data is complete or partial
- optional short demo summary after the artifact fields
## References
- Use [render-flow.md](references/render-flow.md) for the exact downstream handoff.
- Template assets for this skill belong under `assets/`.
- The base screen template is `assets/zhihu-hotlist-echarts.html`.
## Common Mistakes
- Recollecting Zhihu data inside this downstream presentation skill.
- Returning only prose instead of the local `.html` path.
- Dropping the `presentation` contract needed for 新标签页展示.
- Mixing Excel export requirements into this dashboard skill.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,44 @@
# Render Flow
Use this flow after `zhihu-hotlist` has already produced ordered hotlist rows.
1. Keep the upstream artifact as the source of truth:
```json
{
"source": "https://www.zhihu.com/hot",
"sheet_name": "知乎热榜",
"columns": ["rank", "title", "heat"],
"rows": [[1, "标题", "344万"]]
}
```
2. Call `screen_html_export` with at least:
```json
{
"snapshot_id": "zhihu-hotlist-20260329",
"generated_at_ms": 1774713600000,
"rows": [[1, "标题", "344万"]]
}
```
3. Expect the tool result to include:
```json
{
"output_path": "/abs/path/zhihu-hotlist-screen.html",
"presentation": {
"mode": "new_tab",
"title": "知乎热榜主题分类分析大屏",
"url": "file:///abs/path/zhihu-hotlist-screen.html",
"open_in_new_tab": true
}
}
```
4. Final delivery rules:
- The local `.html` path is the generated artifact.
- `presentation.url` is the browser-open target.
- Final wording should say the dashboard is ready for 新标签页展示.