diff --git a/skills/zhihu-hotlist-screen/SKILL.md b/skills/zhihu-hotlist-screen/SKILL.md index 632cc47..a8c24fe 100644 --- a/skills/zhihu-hotlist-screen/SKILL.md +++ b/skills/zhihu-hotlist-screen/SKILL.md @@ -1,6 +1,6 @@ --- 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 author: sgclaw tags: @@ -13,31 +13,31 @@ tags: # 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 wants a leadership demo artifact that can be opened in a 新标签页. +- The user asks for 知乎热榜大屏、看板、dashboard、或 ECharts 演示页。 +- The user wants a local artifact for presentation or handoff. - 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 -- replacing `zhihu-hotlist` as the browser collection skill +- recollecting Zhihu data from scratch when no upstream artifact exists +- replacing `zhihu-hotlist` with this downstream presenter - 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. -- 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. +- `zhihu-hotlist` remains the collection owner; this skill only transforms artifacts. +- Upstream browser calls remain in sgClaw with `expected_domain` like `www.zhihu.com`. +- Selectors in upstream work must remain CSS-only. +- This skill must not create new browser extraction steps. ## Required Input Artifact -Use the ordered artifact produced by `zhihu-hotlist`: +Input shape (primary payload): ```json { @@ -48,56 +48,43 @@ Use the ordered artifact produced by `zhihu-hotlist`: } ``` -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. +- `rows` is required and ordering must be preserved. +- Do not invent rows or reorder collected data. +- Preserve upstream partial status 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. +- Call `screen_html_export` to render the dashboard. +- Return value must include local `.html` path. +- Return value must include a `presentation` object for demo handoff. +- Prefer `presentation.url` as browser-open target. ## 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 +1. Verify ordered `rows` artifact exists. +2. If the artifact is missing, incomplete, blocked, or explicit login failure, report that upstream collection must be fixed first. +3. Load [render-flow.md](references/render-flow.md). +4. Call `screen_html_export`. +5. Return local `.html` path and `presentation` object. +6. State that the final view should open `presentation.url`. ## 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 +- data completeness (`complete`/`partial`) +- optional short demo summary after 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`. +- [render-flow.md](references/render-flow.md) +- `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. +- recollecting data in downstream presentation step +- returning prose only instead of `.html` path +- dropping `presentation` contract for tab delivery +- mixing Excel export requirement into dashboard flow diff --git a/skills/zhihu-hotlist-screen/assets/zhihu-hotlist-echarts.html b/skills/zhihu-hotlist-screen/assets/zhihu-hotlist-echarts.html index 22cb79d..1c864d8 100644 --- a/skills/zhihu-hotlist-screen/assets/zhihu-hotlist-echarts.html +++ b/skills/zhihu-hotlist-screen/assets/zhihu-hotlist-echarts.html @@ -1,1431 +1,637 @@ - - -
- -