yy-create-report
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseyy-create-report
yy-create-report
描述
Description
本技能自动读取指定时间范围内指定或默认 Git 账号的提交记录,按类型分类归纳,生成结构化工作报告。支持通过参数指定任意账号,未指定时默认使用当前电脑配置的 Git 账号。
This skill automatically reads the commit records of the specified or default Git account within the specified time range, categorizes and summarizes them by type, and generates a structured work report. It supports specifying any account via parameters; if no account is specified, it defaults to the Git account configured on the current computer.
使用场景
Usage Scenarios
- 用户说"生成工作报告"、"写工作报告"、"汇总工作"、"生成工作总结"
- 用户要求"生成本周/上周工作报告"
- 用户要求"生成指定日期范围的工作报告"
- 用户要求"生成 xxx 账号的工作报告"
不应触发:
- 用户只是查询 Git 提交记录,未提及报告
- 用户要求直接执行
git log - 用户要求提交代码
- Users say "Generate work report", "Write work report", "Summarize work", "Generate work summary"
- Users request "Generate this week/last week's work report"
- Users request "Generate a work report for a specified date range"
- Users request "Generate a work report for the xxx account"
Should not trigger:
- Users only query Git commit records without mentioning reports
- Users request to directly execute
git log - Users request to submit code
操作步骤
Operation Steps
1. 获取当前 Git 账号信息
1. Get Current Git Account Information
bash
git config user.name
git config user.email如果未配置 Git 用户信息,提示用户先配置。
bash
git config user.name
git config user.emailIf Git user information is not configured, prompt the user to configure it first.
2. 解析指定账号参数
2. Parse Specified Account Parameters
检查用户输入中是否包含指定账号的信息,支持以下格式:
--author "张三"作者:张三账号:zhangsan@example.com
如果用户未指定,则使用步骤 1 获取的 作为默认账号。
git config user.name最终确定的账号值将用于步骤 4 的 参数。
--authorCheck if the user input contains specified account information, supporting the following formats:
--author "Zhang San"Author: Zhang SanAccount: zhangsan@example.com
If the user does not specify an account, use obtained in Step 1 as the default account.
git config user.nameThe final determined account value will be used for the parameter in Step 4.
--author3. 确定日期范围
3. Determine Date Range
- 本周:从本周一到今天
- 上周:从上周一到上周日
- 自定义:按用户指定的日期范围
用户未指定时,默认查询本周(从本周一到今天)。
- This week: From Monday of this week to today
- Last week: From Monday to Sunday of last week
- Custom: According to the date range specified by the user
If the user does not specify a date range, it defaults to querying this week (from Monday of this week to today).
4. 读取 Git 提交记录
4. Read Git Commit Records
bash
git log --since="YYYY-MM-DD" --until="YYYY-MM-DD" --author="用户名" --pretty=format:"%h | %ad | %s" --date=short --no-merges参数说明:
- :开始日期
--since - :结束日期
--until - :只统计指定作者的提交(来源:步骤 2 确定的账号,默认为当前 Git 账号)
--author - :排除合并提交
--no-merges
bash
git log --since="YYYY-MM-DD" --until="YYYY-MM-DD" --author="Username" --pretty=format:"%h | %ad | %s" --date=short --no-mergesParameter Explanation:
- : Start date
--since - : End date
--until - : Only count commits from the specified author (source: the account determined in Step 2, defaults to the current Git account)
--author - : Exclude merge commits
--no-merges
5. 分类归纳
5. Categorization and Summarization
根据提交信息关键词分类:
- 功能开发:feat, 新增, 添加, feature
- 代码优化:refactor, 优化, 调整, improve
- 问题修复:fix, 修复, bug, hotfix, 解决
- 配置相关:config, chore, 依赖, build
- 文档更新:docs, 文档, readme
- 其他:无法归类的提交
注意:合并相似的提交内容,使用中文输出。
Categorize based on commit message keywords:
- Feature Development: feat, add, feature
- Code Optimization: refactor, optimize, adjust, improve
- Bug Fixes: fix, bug, hotfix, resolve
- Configuration Related: config, chore, dependency, build
- Documentation Updates: docs, readme
- Others: Uncategorizable commits
Note: Merge similar commit contents and output in Chinese.
6. 输出结构化工作报告
6. Output Structured Work Report
按以下格式输出:
markdown
undefinedOutput in the following format:
markdown
undefined工作报告标题(日期范围)
Work Report Title (Date Range)
MR建议标题: 用简短的话描述核心工作内容
Suggested MR Title: Briefly describe the core work content
一、功能开发
I. Feature Development
- 功能点1
- 功能点2
- Feature 1
- Feature 2
二、代码优化
II. Code Optimization
- 优化项1
- Optimization Item 1
三、问题修复
III. Bug Fixes
- 修复项1
- Fix Item 1
四、配置相关
IV. Configuration Related
- 配置项1
- Configuration Item 1
五、文档更新
V. Documentation Updates
- 文档项1
- Documentation Item 1
六、其他
VI. Others
- 其他工作
undefined- Other Work
undefined输出示例
Output Examples
有提交记录
With Commit Records
markdown
undefinedmarkdown
undefined本周工作报告(2024-01-15 ~ 2024-01-19)
This Week's Work Report (2024-01-15 ~ 2024-01-19)
MR建议标题: 实现用户登录、个人中心及消息通知功能
Suggested MR Title: Implemented user login, personal center and message notification features
一、功能开发
I. Feature Development
- 用户登录功能 - 实现基于 JWT 的用户认证,支持 Token 刷新
- 个人中心页面 - 新增用户资料编辑、头像上传功能
- 消息通知系统 - 实现 WebSocket 实时消息推送
- User Login Feature - Implemented JWT-based user authentication with Token refresh support
- Personal Center Page - Added user profile editing and avatar upload features
- Message Notification System - Implemented WebSocket real-time message push
二、代码优化
II. Code Optimization
- 优化 API 请求拦截器,减少重复代码
- 重构状态管理模块,提升性能
- Optimized API request interceptor to reduce duplicate code
- Refactored state management module to improve performance
三、问题修复
III. Bug Fixes
- 修复 iOS 软键盘弹起时布局错位问题
- 修复深色模式下部分组件显示异常
- Fixed layout misalignment issue when iOS soft keyboard pops up
- Fixed abnormal display of some components in dark mode
四、配置相关
IV. Configuration Related
- 更新依赖包版本(vue@3.4、vite@5.0)
- 配置 CI/CD 自动化流程
- Updated dependency package versions (vue@3.4, vite@5.0)
- Configured CI/CD automation process
五、文档更新
V. Documentation Updates
- 更新 API 接口文档
- Updated API interface documentation
六、其他
VI. Others
- 参与代码评审 3 次
undefined- Participated in 3 code reviews
undefined无提交记录
Without Commit Records
markdown
undefinedmarkdown
undefined本周工作报告(2024-01-15 ~ 2024-01-19)
This Week's Work Report (2024-01-15 ~ 2024-01-19)
MR建议标题: 无提交记录
本周暂无提交记录。
可能原因:
- 尚未开始新任务
- 工作内容为会议/文档相关
- 变更尚未提交
- 提交作者与当前 Git 账号不匹配
undefinedSuggested MR Title: No Commit Records
No commit records this week.
Possible reasons:
- Haven't started new tasks yet
- Work content is meeting/document related
- Changes haven't been submitted yet
- Submitted author does not match the current Git account
undefined注意事项
Notes
- 使用正斜杠作为路径分隔符,路径包含空格时使用引号包裹
- 如果指定时间范围无提交,提示用户"暂无提交记录"
- 保持格式整洁美观
- 如果项目不在 git 仓库中,提示用户
- 默认统计当前 Git 账号的提交记录,可通过参数指定其他账号(支持用户名或邮箱)
- 输出后询问用户是否需要调整格式或补充内容
- Use forward slashes as path separators; wrap paths containing spaces in quotes
- If there are no commits in the specified time range, prompt the user "No commit records available"
- Keep the format clean and neat
- If the project is not in a Git repository, prompt the user
- By default, count the commit records of the current Git account; other accounts can be specified via parameters (supports username or email)
- After outputting, ask the user if they need to adjust the format or add content
验收清单
Acceptance Checklist
执行技能后检查:
- 报告标题包含正确的日期范围
- 分类归纳准确(功能开发、代码优化、问题修复等)
- 提交内容已合并相似项,无重复
- MR 建议标题简洁概括核心工作
- 使用中文输出,格式整洁美观
After executing the skill, check:
- The report title includes the correct date range
- Categorization is accurate (Feature Development, Code Optimization, Bug Fixes, etc.)
- Commit contents have merged similar items with no duplicates
- The suggested MR title concisely summarizes the core work
- Output is in Chinese with a clean and neat format