一键导入
worklog
从多个数据源收集用户活动轨迹 → 分析并区分工作与个人内容 → 排版为 PDF → 投递到邮箱。触发词:「发日报」「生成日报」「发我的今天」「今日汇总」「日记 PDF」「每天总结」「保存日志」「生成日报发邮件」。当你发现用户需要做每日回顾、日志汇总、生成日报 PDF 并发送时触发。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
从多个数据源收集用户活动轨迹 → 分析并区分工作与个人内容 → 排版为 PDF → 投递到邮箱。触发词:「发日报」「生成日报」「发我的今天」「今日汇总」「日记 PDF」「每天总结」「保存日志」「生成日报发邮件」。当你发现用户需要做每日回顾、日志汇总、生成日报 PDF 并发送时触发。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
将所有机器上的 Pi 和 OMP 会话整理成主题聚合的结构化日报,可选写入 Obsidian 工作日志。
往 pi 的 models.json 新增/适配 provider 模型,含取参、思考三层合成、capture.ts 实测验证与固定。
按需求从 npm pi-package 生态检索符合的 Pi Agent 扩展/技能/主题/prompt 包,采集 npm 元数据与 GitHub 信号,质量评估后整理成表格。与 pi-trending 互补(后者做热度发现)。
Free up disk space on Arch Linux WSL through layered cleanup: cache purge, orphan removal, package audit, and large file scanning. Use whenever the user mentions disk space, cleanup, storage, package review, or wants to shrink their WSL footprint — even if they just say "空间不够", "磁盘满了", "WSL 太大了", or "clean up my system". Prefer this skill over ad-hoc cleanup commands on Arch WSL.
Search and rewrite code by AST structure across 25 languages with ast-grep (sg). Use when the task is structural - find function calls shaped like X, rewrite console.log to logger.info, find all `as any`, migrate require() to import, find empty catch blocks, missing await, codemod a class hierarchy, scan project against YAML rules. Preferred over grep when the user mentions code SHAPE or needs deterministic refactoring across many files. Triggers: 'ast-grep', 'sg', 'ast grep', 'astgrep', 'find all functions that', 'find every call to', 'codemod', 'structural search', 'pattern match code', 'replace pattern across files', 'rename function everywhere', 'find usages of pattern', 'apply this transformation to all', 'migrate X to Y'.
Audit installed Hermes Agent skills for usage frequency and generates an interactive XLSX with Chinese descriptions, dropdown decision columns, and color-coded recommendations. Supports apply mode: reads decisions from XLSX and executes cleanup (delete/disable/enable) after user confirmation, with automatic backup. Smart filtering: already-disabled skills are not re-suggested for cleanup. Uses hermes internal API for authoritative skill classification (builtin/hub/local/external). Use when the user asks about Hermes skill usage statistics, wants to clean up unused Hermes skills, needs to disable low-usage skills, or mentions "技能审计", "清理技能", "不用的技能", "哪些技能可以删", "技能热度", "技能使用频率", "audit hermes skills". This skill is specific to Hermes Agent — do not use for other agents. Make sure to load this skill whenever Hermes skill management, cleanup, or usage analysis is mentioned.
| name | worklog |
| description | 从多个数据源收集用户活动轨迹 → 分析并区分工作与个人内容 → 排版为 PDF → 投递到邮箱。触发词:「发日报」「生成日报」「发我的今天」「今日汇总」「日记 PDF」「每天总结」「保存日志」「生成日报发邮件」。当你发现用户需要做每日回顾、日志汇总、生成日报 PDF 并发送时触发。 |
| metadata | {"internal":true} |
端到端流水线:从多个数据源收集今日活动轨迹,自动区分工作与个人内容,排版为 PDF 文档,投递到邮箱。
收集活动轨迹(4 个数据源)
↓
分析:区分工作 vs 个人内容
↓
结构化:写日志正文(含时间线 + 专业复盘 + 个人点评)
↓
排版:Kami 风格 PDF
↓
投递:邮件发送
默认范围:昨晚 8 点到今晚 8 点(覆盖完整的一天,含睡前活动)。
如果用户指定的范围不同,使用用户提供的范围。
使用 worklog 技能的提取脚本,extract.py 现已自动包含 pi agent 数据源:
uv run --script scripts/extract.py --since today
输出包含今日所有 OpenCode、Qwen Code 和 Pi Agent 会话。Pi Agent 会话标记 (pi) 前缀,包含工作目录、用户提问序列和工具调用摘要。
# 查看近期 Hermes 会话
session_search()
根据时间范围筛选会话,记录每个会话的:时间、来源(Telegram/WebUI/TUI/飞书/Cron)、主题。
find /mnt/c/Obsidian/工作 -name "*.md" -newermt "2026-04-27 20:00" ! -newermt "2026-04-29 00:00" -type f
find /mnt/c/Obsidian/个人 -name "*.md" -newermt "2026-04-27 20:00" ! -newermt "2026-04-29 00:00" -type f
注意:时间条件根据 Step 0 确定的范围动态调整。用 find -newermt(按修改时间)获取今天变更的日记文件,读取关键内容。
数据收集完成后,必须交叉验证时间线:
开始分类前先判当日日期:
day_context = holidayday_context = holidayday_context = workday法定假期参考:元旦(1/1)、春节(除夕初六)、清明(4/44/6)、五一(5/15/5)、端午、中秋、国庆(10/110/7)。
对每条活动提取核心主题词,比较在工作日志/个人日记两个目录中的命中文件数:
# 工作日志目录命中数
work_hits=$(grep -rlc "$主题词" /mnt/c/Obsidian/工作/工作日志/ --include='*.md' 2>/dev/null || echo 0)
# 个人日记目录命中数
personal_hits=$(grep -rlc "$主题词" /mnt/c/Obsidian/个人/个人日记/ --include='*.md' 2>/dev/null || echo 0)
| 结果 | 归属 |
|---|---|
| 工作日志目录命中数 > 个人日记目录 | 工作 |
| 个人日记目录命中数 > 工作日志目录 | 个人 |
| 相等或都为零 | 走信号 2 |
示例:「FRP TLS 加密配置」→ 搜
FRP,个人日记目录命中更多 → 个人 「OneReason 数据库修复」→ 搜OneReason,工作日志目录命中更多 → 工作
holiday 模式 → 个人(所有模糊项归个人)workday 模式 → 工作(所有模糊项归工作)每一条活动记录都必须明确归属,不能混淆。
10:00-11:00)### 标题按子系统分组(如 ### aigene.org.cn 域名迁移)### 标题按主题分组(如 ### Honcho 记忆架构排查)> 潭渊的今天
# {{日期}} 星期X
覆盖范围:{{时间范围}}
## 工作日志
### {{子系统/项目名}}
{{时间线 + 核心事件}}
#### 待完成
| 优先级 | 项目 |
|--------|------|
## 个人日记
### {{主题}}
### {{主题}}
## 点评
### 工作线
(专业角度复盘:技术选型合理性、执行效率、值得注意的经验教训)
### 个人线
(朋友视角点评:节奏感、值得记录的小细节、建议)
工作线点评 — 从专业角度评判:
innodb_flush_log_at_trx_commit=0 是生产级导入的标准方案)autocommit=0 单事务在 7.1G 量级下 undo 爆炸是经典教训)个人线点评 — 从朋友角度评价:
.done-tag、.bug-tag)使用 long-doc 模板(多页 A4 长文),但去掉封面和目录。直接从 <h1> 开始。
/* 用纯 CSS 标签替代 emoji */
.done-tag {
display: inline-block;
background: #E4ECF5;
color: #1B365D;
font-size: 9pt;
font-weight: 500;
padding: 1pt 5pt;
border-radius: 3pt;
margin-right: 3pt;
}
.bug-tag {
display: inline-block;
background: #faf0f0;
color: #a83737;
font-size: 9pt;
font-weight: 500;
padding: 1pt 5pt;
border-radius: 3pt;
margin-right: 3pt;
}
~/.hermes/skills/kami/assets/fonts/,用绝对路径 @font-face 或确保 HTML 在同目录0.8pt 避免中文拥挤cd {{output_dir}}
uv run --with weasyprint --with pypdf python3 -c "
from weasyprint import HTML
HTML('{{html_file}}').write_pdf('{{pdf_file}}')
from pypdf import PdfReader
print(f'PDF: {len(PdfReader(\"{{pdf_file}}\").pages)} pages')
"
| 问题 | 解决 |
|---|---|
| emoji 乱码 | 用纯 CSS 标签替代(见上方 done-tag/bug-tag) |
| 字距太挤 | body { letter-spacing: 0.8pt; } |
| 页面溢出 | 调小 font-size 或 margin |
| WeasyPrint 未安装 | uv run --with weasyprint 自动安装 |
| 内容太长单页装不下 | 多页是正常的,long-doc 模板支持分页 |
| 场景 | 收件地址 |
|---|---|
| 工作日/综合内容 | CNife@vip.qq.com(用户个人邮箱) |
| 仅工作内容 | CNife@vip.qq.com |
| 用户指定了其他地址 | 按用户指定 |
cat << 'MAIL_EOF' | himalaya template send
From: Hermes Agent <hermes-agent@cnife.cn>
To: {{收件地址}}
Subject: 潭渊的今天 — {{日期}}
<#multipart type=mixed>
<#part type=text/plain>
PDF 已生成,请查收附件。
内容概要:
{{2-3 行工作线概要}}
{{2-3 行个人线概要}}
此邮件由 Hermes Agent 自动生成。
<#part filename={{pdf_path}} name={{pdf_name}}><#/part>
<#/multipart>
MAIL_EOF
template send 使用管道输入,无需打开编辑器cannot find UID of appended IMAP message 错误是已知兼容问题——邮件实际已发送,忽略即可排版和投递完成后,保留以下文件,路径格式统一:
~/hermes-workspace/diary/YYYY/MM/
├── YYYY-MM-DD.md # Markdown 源文件
├── diary-YYYY-MM-DD.html # HTML 排版文件
└── YYYY-MM-DD.pdf # PDF 附件
如果目录不存在则创建。
| 数据源 | 位置 |
|---|---|
| 工作日志 | /mnt/c/Obsidian/工作/工作日志/YYYY/MM/YYYY年M月D日星期X.md |
| 个人日记 | /mnt/c/Obsidian/个人/个人日记/YYYY/MM/YYYY年M月D日星期X.md |
| 迁移执行日志 | /mnt/c/Obsidian/工作/工作文档/202604 aigene.org.cn域名迁移/ |
| OpenCode DB | ~/.local/share/opencode/opencode.db |
| OpenCode 日志 | ~/.local/share/opencode/log/ |
| Qwen Code 会话 | ~/.qwen/tmp/*/logs.json |
| Qwen Code 对话 | ~/.qwen/projects/*/chats/*.jsonl |
| Hermes 会话 | session_search 工具 |
| Kami 字体 | ~/.hermes/skills/kami/assets/fonts/ |
| Worklog 脚本 | scripts/extract.py(从技能目录运行) |
| Pi Agent 会话 | ~/.pi/agent/sessions/*/*.jsonl |