Skip to content

feat(skills): downloads count/sort, update scope, and Skills Hub docs - #91

Open
TreeTreeDi wants to merge 13 commits into
DTStack:masterfrom
TreeTreeDi:feat_skill_pr90_base
Open

feat(skills): downloads count/sort, update scope, and Skills Hub docs#91
TreeTreeDi wants to merge 13 commits into
DTStack:masterfrom
TreeTreeDi:feat_skill_pr90_base

Conversation

@TreeTreeDi

@TreeTreeDi TreeTreeDi commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

摘要

基于 feat_skill(PR #90 相关基线)的增量改动:

  • 下载量:仅在 zip 成功下发时计次(Web 与 Registry controller 同一 seam);市场列表支持按下载量排序;技能包汇总走公共 skill-stats
  • update 作用域dt-skill update 对齐 vercel 的 project / global / both(-g / -p、交互选择、非 TTY 下 hasProjectSkills 兜底)
  • 文档:Skills Hub wiki(docs/docsify/.../dt-skill.md)+ 市场帮助入口(skillsHelpDocUrl
  • review 收尾buildSkillZip 纯打包、测试类型收敛、去掉计数兜底 / 计次 seam 不一致

测试计划

  • 单测 / 契约:registry contract + integration;dt-skill skills.test.ts(scope 解析)
  • E2E(本地 npm run dev + ego-lite):列表按下载量排序、详情计次/时间、zip 计次 seam
  • CLI 手跑:交互 update → 选择 Globalupdate -g 命中 ~/.agents
  • 评审:docsify 发布后确认 skillsHelpDocUrl 路径(当前 GH 页 404)

说明

  • 基线分支:feat_skill(非 master/dev)
  • E2E 截图未提交到本分支,见 PR 评论
  • 本地设计草稿 CONTEXT.md / update-scope design 已从本 PR 移除

liuxy0551 and others added 10 commits August 4, 2026 10:32
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add copy link button next to download .zip button with tooltip
- Use terminal style (BASH) for all command displays
- Simplify human install section to single command
- Remove SOON badge from install section

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add lodash debounce (300ms) to search input to prevent excessive API calls
- Fix pagination/sort/category not fetching by calling fetchSkills in updateQueryAndFetch
- Remove dead code renderInlineCommand function
- Remove orphaned CSS selectors .human-command-card and .human-command-title

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Track successful zip deliveries on skills_items.downloads (web download
and registry CLI install), surface counts in the market UI, and support
sortBy=downloads. Aligns registry stats.downloads with the real counter.
Add Project/Global/Both selection for update (-g/-p, interactive prompt,
named-slug both, -y auto-detect), with design docs and domain glossary.
Document install/list/update/uninstall/upload with screenshots, and open
the docsify guide from the skills page help icon (same pattern as proxy).
Extract shared count helpers, use MySQL errno for duplicate index, drop
as-assertions in scope prompts, and tighten count display defaults.
Move download counting out of buildSkillZip into the registry controller
so CLI and web share one seam. Prefer coerceCount and typed mocks over
truthy fallbacks and as const in tests.
@TreeTreeDi

TreeTreeDi commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

E2E / 手跑验证(截图不进 PR 提交)

环境:本地 npm run dev(Herdr)+ ego-lite UI + dt-skill 指向 http://127.0.0.1:7001
截图仅放在 fork release tag e2e-pr91-screenshots未提交到本分支。

市场 UI — 下载量排序与展示

用例 结果
列表「按下载量排序」 PASS — e2e-node18-skill 置顶且下载量最高
列表最近更新时间格式 PASS — YYYY-MM-DD HH:mm:ss
详情下载量 + 时间 PASS — hero「下载 N」+ 最近更新完整时间
Web zip /api/skills/download 计次 PASS — 成功下发 +1
Registry zip /api/v1/download 计次 PASS — +1;与 Web 同一 controller seam
CLI dt-skill install 计次 PASS — 3 → 4

列表 · 按下载量排序

13-sorted-by-downloads

列表 · 最终状态

14-final-list

详情 · zip 后 downloads=3

10-detail

详情 · CLI install 后 downloads=4

15-detail

dt-skill update · 全局路径(Herdr TTY 手跑)

  1. dt-skill --global install e2e-node18-skill -y~/.agents/skills/e2e-node18-skill
  2. update -g e2e-node18-skill → 命中全局 skill,EXIT 0
  3. 交互式 bare update → 提示 Update scope → 选择 Global
    • 只处理全局 lock(e2e-node18-skillhuaiju-test
    • 处理项目 lock(如 my-hash-skill / zentao-api
    • e2e-node18-skill: up to datehuaiju-test 因本地 registry 无该技能失败(全局残留,非 scope 选错)

已知残留

  • 市场帮助入口能打开 skillsHelpDocUrl,但 GH docsify 页仍 404(待文档发布):

11-wiki-404

完整笔记:E2E-REPORT.md

Remove CONTEXT.md and the update-scope design draft; keep product code only.
@TreeTreeDi TreeTreeDi changed the title feat(skills): downloads sort/count, update scope, Skills Hub docs feat(skills): 下载量统计排序、update 作用域、Skills Hub 文档 Aug 4, 2026
Align changed sources with repo prettier/stylelint so GitHub CI passes.
@TreeTreeDi

Copy link
Copy Markdown
Contributor Author

本地流水线自查(对齐 .github/workflows/CI.yml

已在 Node 18 + NODE_OPTIONS=--openssl-legacy-provider 下跑完再推:

步骤 结果
yarn prettier PASS(仓库内变更文件;本地 .agents/.scratch 未提交)
yarn eslint PASS(0 error,仅既有 warning)
yarn stylelint PASS(修了 skills/style.scsscolor-hex-case#fff#FFF
yarn check-types PASS
yarn build PASS
registry contract + integration 50 pass
dt-skill skills.test.ts 49 pass

自查修复提交:5657a63 style: fix prettier and stylelint for CI

@TreeTreeDi TreeTreeDi changed the title feat(skills): 下载量统计排序、update 作用域、Skills Hub 文档 feat(skills): downloads count/sort, update scope, and Skills Hub docs Aug 4, 2026
@@ -0,0 +1,17 @@
# dt-skill update scope Implementation Plan

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件可移除

},
{
label: '下载',
value: String(detail.downloads),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String(detail.downloads || 0) ,参考 String(detail.stars || 0)

},
{
label: '下载',
value: String(detail.downloads),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String(detail.downloads || 0) ,参考 String(detail.stars || 0)

Match detail downloads fallback to stars (|| 0) and drop the local
update-scope plan file from the branch.
@TreeTreeDi

Copy link
Copy Markdown
Contributor Author

Review 已跟进

评论 处理
docs/superpowers/plans/2026-08-03-dt-skill-update-scope.md 可移除 已删除
SkillDetailHero / SkillSummaryModalContent 下载量参考 stars 用 String(… || 0) 已改

本地流水线:prettier / eslint(改动文件)/ stylelint / check-types / build 均通过后提交。

提交:9dd37fd fix(skills): address PR review on downloads display and plans

@liuxy0551
liuxy0551 changed the base branch from feat_skill to master August 5, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants