ワンクリックで
doc-auto-push
// This skill should be used when markdown documentation files (*.md) in the theory/ directory are created or modified. It automatically commits and pushes changes to the remote repository with meaningful commit messages.
// This skill should be used when markdown documentation files (*.md) in the theory/ directory are created or modified. It automatically commits and pushes changes to the remote repository with meaningful commit messages.
[HINT] SKILL.mdと関連ファイルを含む完全なスキルディレクトリをダウンロード
| name | doc-auto-push |
| description | This skill should be used when markdown documentation files (*.md) in the theory/ directory are created or modified. It automatically commits and pushes changes to the remote repository with meaningful commit messages. |
| disable | false |
This skill automates the process of committing and pushing documentation changes to the remote Git repository.
This skill is triggered automatically when:
theory/ directory are created or modifiedCheck Git status for modified markdown files:
git status theory/
Add all modified documentation files:
git add theory/**/*.md
Create a descriptive commit message based on:
Message format:
<type>: <subject>
<body>
<footer>
Types:
docs: Documentation creation or major updaterefactor: Documentation restructuring or rewritingfix: Fix typos or errors in documentationstyle: Formatting changes onlyExample:
docs: 重构第4章为教学资料风格
- 增加问题驱动的讲解方式
- 添加循序渐进的算法演进历史
- 补充丰富的代码示例和对比表格
- 新增实践指南和学习路径建议
- 保持与前三章一致的教学风格
git commit -m "<commit_message>"
git push origin main
Check that the push was successful and report the commit hash.
Good:
docs: 完善贝尔曼方程推导过程
- 添加详细的数学推导步骤
- 补充几何直观解释
- 增加推荐系统应用实例
Bad:
update docs
Group related changes together:
Always review changes before pushing:
git diff theory/
If push fails due to conflicts:
git pull origin mainTrigger: User creates a new markdown file like 05_new_topic.md
Action:
git add theory/foundations/05_new_topic.md
git commit -m "docs: 新增第5章 - <主题>
- 章节结构
- 核心内容
- 学习目标"
git push origin main
Trigger: User modifies existing chapter content
Action:
git add theory/foundations/04_rl_evolution_to_onerec.md
git commit -m "refactor: 重构第4章为教学资料风格
- 问题驱动讲解
- 算法演进详解
- 实践指南"
git push origin main
Trigger: User updates several related files
Action:
git add theory/foundations/*.md
git commit -m "docs: 统一文档风格
- 所有章节采用一致的结构
- 标准化代码示例格式
- 优化图表展示"
git push origin main
Trigger: User fixes typos or formatting issues
Action:
git add theory/foundations/03_bellman_equations_detailed.md
git commit -m "fix: 修正第3章公式错误和排版问题"
git push origin main
Problem: Remote has changes not in local
Solution:
git pull --rebase origin main
# Resolve conflicts if any
git push origin main
Problem: Conflicting changes in same file
Solution:
git add <file>git rebase --continue or git commitgit push origin mainProblem: Git credentials expired or incorrect
Solution:
ssh -T git@github.comThis skill works well with:
Create .gitmessage template:
<type>: <subject>
## 变更内容
-
## 影响范围
-
## 相关文档
-
Use with:
git config commit.template .gitmessage
Not recommended for documentation (prefer manual review), but possible:
# Git hook: .git/hooks/post-commit
#!/bin/bash
if [[ $(git log -1 --pretty=%B) == docs:* ]]; then
git push origin main
fi
Before pushing, verify:
# User heavily modifies chapter 4
AI detects changes to: theory/foundations/04_rl_evolution_to_onerec.md
# Execute workflow
git add theory/foundations/04_rl_evolution_to_onerec.md
git commit -m "refactor: 重构第4章为教学资料风格
- 增加问题驱动的讲解方式
- 添加循序渐进的算法演进历史(REINFORCE→PPO→GRPO→ECPO)
- 补充丰富的代码示例和对比表格
- 新增实践指南和学习路径建议
- 保持与前三章一致的教学风格
主要改进:
- 第2章:推荐系统面临的三大挑战详解
- 第4章:Value-Based方法失效的根本原因
- 第5章:Policy-Based方法的完整演进
- 第7章:实践算法选择决策树
- 第8章:项目驱动的学习路径
文件大小:1758行(相比之前的389行)"
git push origin main
# Output: Successfully pushed to origin/main
# User fixes a formula typo
git add theory/foundations/03_bellman_equations_detailed.md
git commit -m "fix: 修正贝尔曼最优方程的LaTeX公式"
git push origin main
# User updates main README to reflect new chapter
git add README.md
git commit -m "docs: 更新README以反映第4章的改进
- 增强核心洞察部分
- 更新学习路线图
- 添加最新论文列表(GRPO, OneRec)"
git push origin main
Basic Flow:
Modified *.md → git add → git commit → git push → Verify
Commit Message Template:
<type>: <brief summary>
<detailed description>
- bullet point 1
- bullet point 2
<optional footer>
Common Commands:
# Check status
git status
# Stage specific file
git add theory/foundations/04_rl_evolution_to_onerec.md
# Stage all theory docs
git add theory/**/*.md
# Commit with message
git commit -m "docs: update chapter 4"
# Push to main
git push origin main
# Check push result
git log -1
theory/ directory documentationRelated Skills:
skill-creator: Learn how to create new skillspdf-reader: Extract content from PDF references