Files
omoolab-project/.claude/skills/oflow/SKILL.md
nan b9bbcf131e Add custom font styles and theme enhancements
- Created a new CSS file for font imports and defined font families for base, mono, strong, em, and h1 elements.
- Added a new JavaScript file to extend the default VitePress theme, incorporating a custom layout and a Vue component for enhanced functionality.
- Integrated Mermaid diagram support and included the necessary styles for it.
2026-06-02 13:03:25 +08:00

103 lines
3.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: oflow
description: 用 git 记录创作过程和团队协作的指令集,适用于创意团队。
---
## 工作流程
采用简化版的 Github Flow 工作流,适用于创意团队的协作和创作过程记录:
- 仅在自己的「个人分支」工作,互不干扰
- 通过「提交」,有选择地确认改动到个人分支
- 不时地更新其他人在「主分支」的改动
- 通过「合并请求」,有监督地确认改动到主分支
## 规范、术语
### 主分支
也就是`main`分支。
- 应该保持稳定和可用,不在主分支上进行创作和修改。
### 个人分支
创作者在此分支上进行创作和修改。
- 以创作者名字命名的分支,或斜杠加工作内容(例如`alice`、`alice/dev`、`alice/design`)
### 提交
也就是 Commit,用于确认改动,保存时间节点。
- 提交前询问用户哪些改动需要添加到暂存区。
- 提交说明用中文表达为主,惯例或术语可以用中英文。
- 提交说明第一行,不需要前缀类型(`feat`、`docs`),而是用动词开头的短句,例如
- `refactor: 对 refs 进行了重构` 改为 `重构 refs`
- `feat: 添加了 xx 功能` 改为 `添加 xx`
- 如果本次改动涉及多项调整,在提交说明的后几行详述。
### 合并请求
也就是 Pull Request,简称 PR。
- 在 PR 前,要求先执行 `git pull origin main`,确保和`main`分支别差太远。
## 指令集
执行规则:
- 提交、合并请求、从主分支更新等操作前,确保当前在个人分支中。
- 表中 git 相关的指令在正式执行前,汇总信息给用户,确认后再执行。
- 如果 git 遇到 Authentication failed,尝试再次执行,如果依然不行,报告用户
### 获取仓库
触发词:`获取仓库`,`克隆仓库`,`下载仓库`
执行步骤:
1. 执行 `git clone [repo-url]`
2. 若项目`.lfsconfig`中发现`fetchexclude = *`,询问是否下载 LFS 文件
- 若需要,执行`git lfs pull --exclude= --include [folder]`来下载指定文件夹,或执行`git lfs pull --exclude= --include *`来下载所有文件
### 创建个人分支
触发词:`创建时间线`,`创建个人分支`
执行步骤:
1. 执行 `git fetch origin && git checkout -b [branch-name] origin/main`
2. 执行 `git push -u origin [branch-name]`
> 其中 `[branch-name]` 为 git config 中记录的 username。如果用户有说明创建的意图,可加上后缀,例如 `alice/fix-bug`
### 更新
触发词:`从主线更新`,`从主分支同步`,`从主线同步`,`同步主分支`
执行步骤:
1. 执行 `git pull origin main`
2. 如果遇到合并冲突,询问式地帮用户处理冲突
3. 冲突解决提交后,若之前涉及大文件冲突,执行`git lfs pull --exclude= --include [folder]`来下载解决冲突后缺失的 LFS 文件
### 提交
触发词:`保存时间点`,`提交修改`,`确认改动`,`记录时间节点`,`创建时间节点`
执行步骤:
1. 询问用户哪些改动需要被提交(确认),执行 `git add [files]`
2. 执行 `git commit -m [message]`
### 合并请求
触发词:`同步到主分支`,`同步给主分支`,`合并请求`,`PR`
执行步骤:
1. 执行「更新」指令
2. 执行 `git push`
3. 分别提供: PR 页面网址供用户访问,并提供标题、内容,可供用户复制到 PR 页面