dsh-briefing-skill
No description
- Stars
- 0
- Language
- JavaScript
- Created
- Sep 1, 2026
- Updated
- Sep 1, 2026
Introduction
dsh-briefing-skill
日报/周报自动生成技能(DeepSeek Harness)| Daily/Weekly Work Briefing Skill (DeepSeek Harness)
A zero-dependency, pure-Markdown DeepSeek Harness (DSH) skill that auto-generates daily task briefings (日报) and weekly reports (周报) from DSH session logs: it scans every workspace's session.jsonl.zstd under DSH_HOME/sessions, decodes the zstd multi-frame JSONL on the fly, groups activity by workspace (project), and writes a structured Markdown briefing into docs/.
一个零依赖、纯 Markdown 的 DeepSeek Harness (DSH) 技能:从 DSH 会话日志自动生成当天任务简报(日报)与周报——扫描 DSH_HOME/sessions 下全部工作区的 session.jsonl.zstd,现场解码 zstd 多帧 JSONL,按工作区(项目)分组汇总任务活动,输出结构化 Markdown 简报并落盘到 docs/。
English
Features
- All workspaces covered: walks every workspace directory under
DSH_HOME/sessions(not just the current project); each session'scwdfield maps it back to its real project path - On-the-fly decoding:
session.jsonl.zstdis a zstd multi-frame JSONL (each frame independently compressed with checksums) — the skill embeds a complete decoder (Node 22+node:zlib), no external tools needed - Per-project grouping: daily/weekly briefings are organized by workspace (project): session topics, user requests, assistant replies, tool calls, written files (
filesWritten) and disk-level recent file changes (recentFiles, excludingnode_modules/.git/distnoise) - Time-based filtering: every log record carries a
timefield (epoch ms) — filter by any date range (today / this week / last week / custom) - Structured Markdown output: overview table → per-project details → file-change summary → failures/todos → next-step suggestions; saved as
docs/yyyy_MM_dd_HH_日报.md/docs/yyyy_MM_dd_HH_周报.md - Hot-reload: drop the file in, no DSH restart needed
- Ships with the extraction script
dsh_briefing.cjs(same code embedded in the skill, handy for scripting) and the standalone decoderdsh_session_decode.cjs
Requirements
- DeepSeek Harness (DSH)
- Node.js 22+ (the decoder relies on
node:zlibbuilt-in Zstandard support)
Install
Option A — user level (available in every project):
# Linux / macOS
mkdir -p ~/.dsh/skills
cp briefing.md ~/.dsh/skills/briefing.md
# Windows PowerShell
New-Item -ItemType Directory -Path "$env:USERPROFILE\.dsh\skills" -Force
Copy-Item briefing.md "$env:USERPROFILE\.dsh\skills\briefing.md"
Option B — project level (this project only, ships with the repo):
mkdir -p .dsh/skills
cp briefing.md .dsh/skills/briefing.md
DSH scans skill roots with hot reload: once the file is in place, the briefing skill appears in the session skill catalog (<available_skills>) and the / menu without restarting.
Optional: copy dsh_briefing.cjs / dsh_session_decode.cjs anywhere you like for standalone use.
Usage
/briefing 日报
/briefing 周报 # this week (Monday → today)
/briefing 上周周报
Type /briefing <日报|周报> in the DSH Web/TUI composer, or simply ask in natural language — e.g. "生成今天的日报" ("generate today's daily briefing"), "生成本周周报" ("generate this week's report"), "今天做了什么" ("what did I do today") — the model auto-loads this skill and runs the full flow: date range → decode all workspace logs → group by project → write Markdown into docs/.
Output
docs/2026_09_01_11_日报.md
docs/2026_09_01_11_周报.md
How it works
Each DSH session log record is a JSON object with a time timestamp (epoch ms); key record types: session (header: createdAt/cwd), session/title, user/message, assistant/message, tool/call, tool/result (isError marks failures), todo/write. The skill aggregates these per workspace and cross-checks against actual file mtimes on disk.
Compatibility
Frontmatter follows the DSH skill spec (name / description / whenToUse). DSH also scans .agents/skills roots, so with minor tweaks the same content works in other agents that honor SKILL.md conventions (Claude Code / Codex).
License
中文
功能
- 覆盖全部工作区:遍历
DSH_HOME/sessions下所有工作区目录(不只当前项目);每个会话头部的cwd字段把会话归回真实项目路径 - 现场解码:
session.jsonl.zstd是 zstd 多帧 JSONL(每帧独立压缩、带校验和)——技能内嵌完整解码器(Node 22+ 的node:zlib),无需外部工具 - 按项目分组:日报/周报按工作区(项目)组织:会话主题、用户请求、助手回复、工具调用、写过的文件(
filesWritten)与磁盘级近期文件变更(recentFiles,排除 node_modules/.git/dist 等噪音) - 按时间过滤:每条日志记录带
time时间戳(epoch 毫秒)——支持任意日期范围(今天 / 本周 / 上周 / 自定义) - 结构化 Markdown 输出:概览表 → 按项目详情 → 文件变更汇总 → 失败/待办 → 下一步建议;落盘为
docs/yyyy_MM_dd_HH_日报.md/docs/yyyy_MM_dd_HH_周报.md - 热加载:文件放入即生效,无需重启 DSH
- 附带提取脚本
dsh_briefing.cjs(与技能内嵌代码一致,便于单独脚本化使用)与独立解码器dsh_session_decode.cjs
环境要求
- DeepSeek Harness (DSH)
- Node.js 22+(解码依赖
node:zlib内置 Zstandard 支持)
安装
方式一:用户级(所有项目生效)
# Linux / macOS
mkdir -p ~/.dsh/skills
cp briefing.md ~/.dsh/skills/briefing.md
# Windows PowerShell
New-Item -ItemType Directory -Path "$env:USERPROFILE\.dsh\skills" -Force
Copy-Item briefing.md "$env:USERPROFILE\.dsh\skills\briefing.md"
方式二:项目级(仅当前项目生效,随仓库分发)
mkdir -p .dsh/skills
cp briefing.md .dsh/skills/briefing.md
DSH 技能目录热加载:文件放入后无需重启,下一次会话即可在技能目录(<available_skills>)与 / 菜单中看到 briefing。
可选:将 dsh_briefing.cjs / dsh_session_decode.cjs 复制到任意位置独立使用。
用法
/briefing 日报
/briefing 周报 # 本周(周一至今天)
/briefing 上周周报
在 DSH Web / TUI 输入框直接输入 /briefing <日报|周报>,或用自然语言触发(如「生成今天的日报」「生成本周周报」「今天做了什么」),模型自动加载本技能并执行完整流程:确认日期范围 → 解码全部工作区日志 → 按项目分组 → 生成 Markdown 落盘到 docs/。
生成的文件
docs/2026_09_01_11_日报.md
docs/2026_09_01_11_周报.md
原理简述
DSH 会话日志每条记录都是带 time 时间戳(epoch 毫秒)的 JSON 对象;关键记录类型:session(头部:createdAt/cwd)、session/title、user/message、assistant/message、tool/call、tool/result(isError 标记失败)、todo/write。技能按工作区聚合这些记录,并与磁盘上文件的实际修改时间交叉核对。
兼容性
frontmatter 符合 DSH 技能规范(name / description / whenToUse)。DSH 兼容扫描 .agents/skills 目录,同一份内容稍作调整亦可用于其他支持 SKILL.md 约定的 agent(Claude Code / Codex 等)。