feat: redesign zhihu hotlist dashboard

This commit is contained in:
zhaoyilun
2026-04-10 17:09:19 +08:00
parent 6158f720a7
commit a5d31d5337
3 changed files with 619 additions and 1426 deletions

View File

@@ -1,6 +1,6 @@
--- ---
name: zhihu-hotlist-screen 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. description: Use when the user wants to turn collected Zhihu hotlist data into a leadership demo dashboard or local HTML presentation artifact.
version: 0.1.0 version: 0.1.0
author: sgclaw author: sgclaw
tags: tags:
@@ -13,31 +13,31 @@ tags:
# Zhihu Hotlist Screen # 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`. Convert an already collected Zhihu hotlist artifact into a local驾驶舱风格 `.html` dashboard for leadership demo use.
## When to Use ## Use Cases
- The user asks for知乎热榜大屏、看板、dashboard、ECharts 演示页。 - The user asks for 知乎热榜大屏、看板、dashboard、ECharts 演示页。
- The user wants a leadership demo artifact that can be opened in a 新标签页. - The user wants a local artifact for presentation or handoff.
- An upstream collection step already produced ordered hotlist rows. - An upstream collection step already produced ordered hotlist rows.
- The final deliverable should be a local `.html` page instead of Excel. - The output deliverable should be `.html`, not `.xlsx`.
Do not use this skill for: ## Not This Skill
- recollecting Zhihu data from scratch when no hotlist artifact exists - recollecting Zhihu data from scratch when no upstream artifact exists
- replacing `zhihu-hotlist` as the browser collection skill - replacing `zhihu-hotlist` with this downstream presenter
- exporting Office files such as `.xlsx` - exporting Office files such as `.xlsx`
## Upstream Browser Contract ## Runtime Contract
- Upstream Zhihu collection still belongs to `zhihu-hotlist`, which uses `superrpa_browser` inside the sgClaw browser host. - `zhihu-hotlist` remains the collection owner; this skill only transforms artifacts.
- Upstream browser calls must keep `expected_domain` as a bare hostname such as `www.zhihu.com`. - Upstream browser calls remain in sgClaw with `expected_domain` like `www.zhihu.com`.
- Upstream selectors must remain valid CSS selectors only. - Selectors in upstream work must remain CSS-only.
- This skill does not invent new browser steps. It transforms the collected artifact after upstream browser work is stable. - This skill must not create new browser extraction steps.
## Required Input Artifact ## Required Input Artifact
Use the ordered artifact produced by `zhihu-hotlist`: Input shape (primary payload):
```json ```json
{ {
@@ -48,56 +48,43 @@ Use the ordered artifact produced by `zhihu-hotlist`:
} }
``` ```
Rules: - `rows` is required and ordering must be preserved.
- Do not invent rows or reorder collected data.
- `rows` is the primary payload for this skill. - Preserve upstream partial status in the final summary.
- 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 ## Tool Contract
- Call `screen_html_export` to render the final ECharts dashboard. - Call `screen_html_export` to render the dashboard.
- The tool result must include a local `.html` path. - Return value must include local `.html` path.
- The tool result must include a `presentation` object for 新标签页 delivery. - Return value must include a `presentation` object for demo handoff.
- Prefer `presentation.url` as the browser-open target. - Prefer `presentation.url` as browser-open target.
- Do not use `shell` as the primary rendering path.
## Workflow ## Workflow
1. Confirm that an upstream hotlist artifact with ordered `rows` already exists. 1. Verify ordered `rows` artifact 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. If the artifact is missing, incomplete, blocked, or explicit login failure, report that upstream collection must be fixed first.
2. Load [render-flow.md](references/render-flow.md) and prepare the dashboard payload. 3. Load [render-flow.md](references/render-flow.md).
3. Call `screen_html_export`. 4. Call `screen_html_export`.
4. Return the final local `.html` path plus the `presentation` object. 5. Return local `.html` path and `presentation` object.
5. State explicitly that the final呈现 should open `presentation.url` in a 新标签页. 6. State that the final view should open `presentation.url`.
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 ## Output
Return a concise result with:
- artifact type: `echarts_dashboard` - artifact type: `echarts_dashboard`
- source snapshot identifier - source snapshot identifier
- local `.html` output path - local `.html` output path
- `presentation` object - `presentation` object
- whether the data is complete or partial - data completeness (`complete`/`partial`)
- optional short demo summary after the artifact fields - optional short demo summary after artifact fields
## References ## References
- Use [render-flow.md](references/render-flow.md) for the exact downstream handoff. - [render-flow.md](references/render-flow.md)
- Template assets for this skill belong under `assets/`. - `assets/zhihu-hotlist-echarts.html`
- The base screen template is `assets/zhihu-hotlist-echarts.html`.
## Common Mistakes ## Common Mistakes
- Recollecting Zhihu data inside this downstream presentation skill. - recollecting data in downstream presentation step
- Returning only prose instead of the local `.html` path. - returning prose only instead of `.html` path
- Dropping the `presentation` contract needed for 新标签页展示. - dropping `presentation` contract for tab delivery
- Mixing Excel export requirements into this dashboard skill. - mixing Excel export requirement into dashboard flow

File diff suppressed because it is too large Load Diff

View File

@@ -41,4 +41,4 @@ Use this flow after `zhihu-hotlist` has already produced ordered hotlist rows.
- The local `.html` path is the generated artifact. - The local `.html` path is the generated artifact.
- `presentation.url` is the browser-open target. - `presentation.url` is the browser-open target.
- Final wording should say the dashboard is ready for 新标签页展示. - Final wording should say the dashboard is ready for新标签页展示.