daily-report
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDaily Report Skill
日报生成技能
Summarize @i9wa4's GitHub and Jira activities and post as a GitHub Issue.
汇总@i9wa4的GitHub和Jira活动,并作为GitHub Issue发布。
1. Prerequisites
1. 前置要求
- gh CLI installed
- jq installed
- acli available via (for Jira)
nix run nixpkgs#acli
- 已安装gh CLI
- 已安装jq
- 可通过使用acli(用于访问Jira)
nix run nixpkgs#acli
2. Workflow
2. 工作流程
2.1. Get GitHub Activities
2.1. 获取GitHub活动
Use dedicated script to fetch activities.
Defaults to fetching 24 hours of activities from current time
(calculated in UTC).
使用专用脚本拉取活动,默认拉取当前时间起往前24小时的活动(按UTC计算)。
2.1.1. Script Location
2.1.1. 脚本路径
text
${CLAUDE_CONFIG_DIR}/skills/daily-report/scripts/get-activities.shtext
${CLAUDE_CONFIG_DIR}/skills/daily-report/scripts/get-activities.sh2.1.2. Command Examples
2.1.2. 命令示例
bash
undefinedbash
undefinedDefault: 24 hours ago to now (local repos only via ghq list)
默认:过去24小时至今(仅通过ghq list获取本地仓库)
${CLAUDE_CONFIG_DIR}/skills/daily-report/scripts/get-activities.sh --no-url
${CLAUDE_CONFIG_DIR}/skills/daily-report/scripts/get-activities.sh --no-url
Specify hours: N hours ago to now
指定时长:N小时前至今
${CLAUDE_CONFIG_DIR}/skills/daily-report/scripts/get-activities.sh --hours 48 --no-url
${CLAUDE_CONFIG_DIR}/skills/daily-report/scripts/get-activities.sh --hours 48 --no-url
Specify datetime directly (ISO8601, UTC)
直接指定日期范围(ISO8601格式,UTC时区)
${CLAUDE_CONFIG_DIR}/skills/daily-report/scripts/get-activities.sh --from 2025-12-16T15:00:00Z --to 2025-12-17T15:00:00Z --no-url
undefined${CLAUDE_CONFIG_DIR}/skills/daily-report/scripts/get-activities.sh --from 2025-12-16T15:00:00Z --to 2025-12-17T15:00:00Z --no-url
undefined2.1.3. Options
2.1.3. 可选参数
| Option | Description |
|---|---|
| --no-url | Output without URLs (prevents mention notifications) |
| --hours N | Fetch activities from N hours ago to now |
| --from | Start datetime (ISO8601, e.g., 2025-12-17T00:00:00Z) |
| --to | End datetime (ISO8601, e.g., 2025-12-17T23:59:59Z) |
| --hostname | GitHub Enterprise Server hostname |
| --exclude-owner | Exclude repos by owner (comma-separated, default: i9wa4) |
| --include-personal | Include personal repos (overrides --exclude-owner) |
| Option | Description |
|---|---|
| --no-url | 输出不带URL(避免触发提及通知) |
| --hours N | 拉取过去N小时至今的活动 |
| --from | 起始时间(ISO8601格式,例如2025-12-17T00:00:00Z) |
| --to | 结束时间(ISO8601格式,例如2025-12-17T23:59:59Z) |
| --hostname | GitHub Enterprise Server 域名 |
| --exclude-owner | 按所有者排除仓库(逗号分隔,默认值:i9wa4) |
| --include-personal | 包含个人仓库(覆盖--exclude-owner参数) |
2.1.4. Output Format
2.1.4. 输出格式
markdown
undefinedmarkdown
undefinedrepository-owner/repository-name
repository-owner/repository-name
- [Issue] Issue title
- [IssueComment] Issue title
- [PullRequest] PR title
- [PullRequestComment] PR title
- [ReviewedPR] PR title (PRs reviewed by me, excludes my own PRs)
Note: Use `--no-url` option to omit URLs and prevent mention notifications.
Note: Personal repos (i9wa4/\*) are excluded by default.- [Issue] Issue标题
- [IssueComment] Issue标题
- [PullRequest] PR标题
- [PullRequestComment] PR标题
- [ReviewedPR] PR标题(我评审过的PR,排除我自己提交的PR)
注意:使用`--no-url`参数省略URL,避免触发提及通知。
注意:个人仓库(i9wa4/*)默认被排除。2.2. Get Jira Activities
2.2. 获取Jira活动
Use acli to fetch Jira activities.
sh
undefined使用acli拉取Jira活动。
sh
undefinedToday's activities
今日活动
nix run nixpkgs#acli -- jira workitem search
--jql "updated >= startOfDay() AND (assignee = currentUser() OR reporter = currentUser()) ORDER BY updated DESC"
--fields "key,summary,status"
--jql "updated >= startOfDay() AND (assignee = currentUser() OR reporter = currentUser()) ORDER BY updated DESC"
--fields "key,summary,status"
nix run nixpkgs#acli -- jira workitem search
--jql "updated >= startOfDay() AND (assignee = currentUser() OR reporter = currentUser()) ORDER BY updated DESC"
--fields "key,summary,status"
--jql "updated >= startOfDay() AND (assignee = currentUser() OR reporter = currentUser()) ORDER BY updated DESC"
--fields "key,summary,status"
Specific date range
指定日期范围
nix run nixpkgs#acli -- jira workitem search
--jql "updated >= 'YYYY-MM-DD' AND updated < 'YYYY-MM-DD' AND (assignee = currentUser() OR reporter = currentUser()) ORDER BY updated DESC"
--fields "key,summary,status"
--jql "updated >= 'YYYY-MM-DD' AND updated < 'YYYY-MM-DD' AND (assignee = currentUser() OR reporter = currentUser()) ORDER BY updated DESC"
--fields "key,summary,status"
undefinednix run nixpkgs#acli -- jira workitem search
--jql "updated >= 'YYYY-MM-DD' AND updated < 'YYYY-MM-DD' AND (assignee = currentUser() OR reporter = currentUser()) ORDER BY updated DESC"
--fields "key,summary,status"
--jql "updated >= 'YYYY-MM-DD' AND updated < 'YYYY-MM-DD' AND (assignee = currentUser() OR reporter = currentUser()) ORDER BY updated DESC"
--fields "key,summary,status"
undefined2.3. Get Meetings from Google Calendar
2.3. 从Google Calendar获取会议信息
Fetch today's meetings from Google Calendar via Slack DM.
通过Slack私信从Google Calendar拉取今日会议。
2.3.1. Prerequisites
2.3.1. 前置要求
Environment variables required:
sh
export SLACK_GCAL_DM_URL="https://app.slack.com/client/E.../D..."
export SLACK_MCP_XOXC_TOKEN="xoxc-..."
export SLACK_MCP_XOXD_TOKEN="xoxd-..."需要配置以下环境变量:
sh
export SLACK_GCAL_DM_URL="https://app.slack.com/client/E.../D..."
export SLACK_MCP_XOXC_TOKEN="xoxc-..."
export SLACK_MCP_XOXD_TOKEN="xoxd-..."2.3.2. Fetch Messages from Last 24 Hours
2.3.2. 拉取过去24小时的消息
sh
undefinedsh
undefinedExtract channel ID from URL
从URL中提取频道ID
CHANNEL=$(echo "$SLACK_GCAL_DM_URL" | sed -n 's|./client/[^/]/([^/]).|\1|p')
CHANNEL=$(echo "$SLACK_GCAL_DM_URL" | sed -n 's|./client/[^/]/([^/]).|\1|p')
Fetch messages
拉取消息
FILE=$(mkoutput --dir tmp --label output)
curl -s -X POST "https://slack.com/api/conversations.history"
-H "Authorization: Bearer $SLACK_MCP_XOXC_TOKEN"
-H "Cookie: d=$SLACK_MCP_XOXD_TOKEN"
-d "channel=${CHANNEL}"
-d "limit=200" > "$FILE"
-H "Authorization: Bearer $SLACK_MCP_XOXC_TOKEN"
-H "Cookie: d=$SLACK_MCP_XOXD_TOKEN"
-d "channel=${CHANNEL}"
-d "limit=200" > "$FILE"
FILE=$(mkoutput --dir tmp --label output)
curl -s -X POST "https://slack.com/api/conversations.history"
-H "Authorization: Bearer $SLACK_MCP_XOXC_TOKEN"
-H "Cookie: d=$SLACK_MCP_XOXD_TOKEN"
-d "channel=${CHANNEL}"
-d "limit=200" > "$FILE"
-H "Authorization: Bearer $SLACK_MCP_XOXC_TOKEN"
-H "Cookie: d=$SLACK_MCP_XOXD_TOKEN"
-d "channel=${CHANNEL}"
-d "limit=200" > "$FILE"
Filter messages from last 24 hours
筛选过去24小时的消息
NOW=$(date +%s)
YESTERDAY=$((NOW - 86400))
jq -r --argjson yesterday "$YESTERDAY"
'.messages[] | select(.ts | tonumber > $yesterday)' "$FILE"
'.messages[] | select(.ts | tonumber > $yesterday)' "$FILE"
undefinedNOW=$(date +%s)
YESTERDAY=$((NOW - 86400))
jq -r --argjson yesterday "$YESTERDAY"
'.messages[] | select(.ts | tonumber > $yesterday)' "$FILE"
'.messages[] | select(.ts | tonumber > $yesterday)' "$FILE"
undefined2.3.3. Extract Today's Schedule
2.3.3. 提取今日日程
Look for the "Today" summary message in 24-hour messages.
This message contains all meetings for the day in attachments array.
Key indicators:
- Message text starts with
*Today*-<!date^... - Attachments contain meeting info with Unix timestamps
在24小时消息中查找「今日」汇总消息,该消息的attachments数组中包含当日所有会议信息。
关键特征:
- 消息文本以开头
*Today*-<!date^... - 附件包含带Unix时间戳的会议信息
2.3.4. Parse Meeting Times from Timestamps
2.3.4. 从时间戳解析会议时间
Meetings use Unix timestamp format:
<!date^UNIX_TIMESTAMP^{time}|...>Convert timestamps to local time:
sh
date -r UNIX_TIMESTAMP "+%H:%M"会议使用Unix时间戳格式:
<!date^UNIX_TIMESTAMP^{time}|...>将时间戳转换为本地时间:
sh
date -r UNIX_TIMESTAMP "+%H:%M"2.3.5. Output Format
2.3.5. 输出格式
Extract from attachments:
- Meeting title: From link text (e.g., )
|Meeting Name>* - Start/End time: Convert Unix timestamps to HH:MM format
- Skip cancelled meetings (indicated by strike-through in separate messages)
Format as:
- Meeting name (HH:MM-HH:MM)从附件中提取以下信息:
- 会议标题:从链接文本提取(例如)
|会议名称>* - 开始/结束时间:将Unix时间戳转换为HH:MM格式
- 跳过已取消的会议(由单独消息中的删除线标记)
格式为:
- 会议名称 (HH:MM-HH:MM)2.4. Create Draft
2.4. 生成草稿
Create file:
bash
FILE=$(mkoutput --dir tmp --label "daily-$(whoami)")NOTE: Keep command blocks in "Today's AI Activities" section.
Execute commands and paste results below the command block.
Template:
markdown
---
title: "YYYY-MM-DD $(whoami)"
labels:
- name: "日報"
color: "0887b9"
---创建文件:
bash
FILE=$(mkoutput --dir tmp --label "daily-$(whoami)")注意:保留「今日AI活动」板块中的命令块,执行命令后将结果粘贴到命令块下方。
模板:
markdown
---
title: "YYYY-MM-DD $(whoami)"
labels:
- name: "日報"
color: "0887b9"
---1. Reflection
1. 复盘
2. Today's Activities
2. 今日活动
2.1. GitHub
2.1. GitHub
Organize gh-furik output. Classify as follows:
整理gh-furik输出,按以下类别归类:
2.1.1. Created Issues
2.1.1. 已创建Issue
- [repo-name] Issue title
- [仓库名] Issue标题
2.1.2. Created PRs
2.1.2. 已创建PR
- [repo-name] PR title
- [repo-name] PR title (merged)
- Add supplementary comments indented
- [仓库名] PR标题
- [仓库名] PR标题(已合并)
- 缩进添加补充说明
2.1.3. Reviewed PRs
2.1.3. 已评审PR
- [repo-name] PR title
- [仓库名] PR标题
2.1.4. Commented Issues/PRs
2.1.4. 已评论的Issue/PR
- [repo-name] Issue/PR title
- [仓库名] Issue/PR标题
2.2. Jira
2.2. Jira
- [KEY-123] Issue summary (status)
- [KEY-123] Issue概要(状态)
2.3. Meetings
2.3. 会议
- Meeting name
- Supplementary comments
undefined- 会议名称
- 补充说明
undefined2.5. Wait for User Edit
2.5. 等待用户编辑
Display draft and wait for user edits. User adds reflections.
展示草稿并等待用户编辑,用户可添加复盘内容。
2.6. Post Issue
2.6. 发布Issue
Post with :
gh issue createbash
gh issue create --title "YYYY-MM-DD $(whoami)" --label "日報" --body "$(cat <<'EOF'
[body]
EOF
)"Display Issue URL after posting.
使用发布:
gh issue createbash
gh issue create --title "YYYY-MM-DD $(whoami)" --label "日報" --body "$(cat <<'EOF'
[body]
EOF
)"发布后展示Issue的URL。
3. Important Rules
3. 重要规则
- No direct links: Do not link PRs/Issues directly (triggers mentions), use titles only
- PR/Issue numbers: Use with space, not
(# 123). Without space, GitHub auto-links to unintended repos.(#123) - Draft review: Always show draft to user and wait for edits
- Issue posting: Post after user confirms draft is ready
- 禁止直接链接:不要直接关联PR/Issue(会触发提及通知),仅使用标题
- PR/Issue编号:使用带空格的格式,不要用
(# 123),没有空格的话GitHub会自动关联到错误的仓库(#123) - 草稿审核:始终先向用户展示草稿,等待编辑
- Issue发布:用户确认草稿完成后再发布
4. Output Type Classification
4. 输出类型分类
Classify script output as follows:
| Output Type | Classification |
|---|---|
| Issue | Created Issues |
| PullRequest | Created PRs |
| ReviewedPR | Reviewed PRs |
| IssueComment | Commented Issues/PRs |
| PullRequestComment | Commented Issues/PRs |
Note: Consolidate multiple comments on same Issue/PR into one.
Note: ReviewedPR only includes PRs authored by others (my own PRs excluded).
将脚本输出按以下规则分类:
| 输出类型 | 分类 |
|---|---|
| Issue | 已创建Issue |
| PullRequest | 已创建PR |
| ReviewedPR | 已评审PR |
| IssueComment | 已评论的Issue/PR |
| PullRequestComment | 已评论的Issue/PR |
注意:同一Issue/PR下的多条评论合并为一条。
注意:ReviewedPR仅包含他人提交的PR(排除自己提交的PR)。