ln-001-push-all

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Paths: File paths (
shared/
,
references/
,
../ln-*
) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. If
shared/
is missing, fetch files via WebFetch from
https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}
.
路径: 文件路径(
shared/
references/
../ln-*
)是相对于技能仓库根目录的。如果在当前工作目录未找到,请定位到该SKILL.md所在目录,向上跳转一级即为仓库根目录。如果缺少
shared/
目录,请通过WebFetch从
https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}
获取文件。

Push All (Standalone Utility)

全量推送(独立工具)

Type: Standalone Utility Category: 0XX Shared
Commits and pushes ALL current changes (staged, unstaged, untracked) to the remote repository in a single operation.

类型: 独立工具 分类: 0XX 共享类
可在单次操作中提交并推送当前所有变更(暂存的、未暂存的、未追踪的)到远程仓库。

When to Use This Skill

何时使用该技能

  • Quick push of all accumulated changes without manual staging
  • End-of-session commit when all changes are ready
  • Any situation where
    git add -A && git commit && git push
    is the intent

  • 无需手动暂存,快速推送所有累计变更
  • 所有变更已就绪,会话结束时的提交
  • 任何意图执行
    git add -A && git commit && git push
    的场景

Workflow

工作流

Analyze → Doc Check → CHANGELOG → Lint Check → Stage → Commit → Push → Report
Analyze → Doc Check → CHANGELOG → Lint Check → Stage → Commit → Push → Report

Phase 1: Analyze Changes

阶段1:分析变更

  1. Run
    git diff --stat
    and
    git status
    to understand ALL changes (staged, unstaged, untracked)
  2. Identify what was changed and why
  1. 执行
    git diff --stat
    git status
    了解所有变更(暂存的、未暂存的、未追踪的)
  2. 确认变更内容和变更原因

Phase 2: Documentation Check

阶段2:文档检查

Check if related documentation needs updating:
Change TypeAction
Code behavior changedUpdate affected docs, comments, examples
New files/folders addedUpdate relevant index or list sections
Config files changedCheck README or setup docs
No doc impactSkip
Skip: Version bumps (version fields in SKILL.md, README badge) — those are done only on explicit user request.
检查是否需要更新相关文档:
变更类型操作
代码行为变更更新受影响的文档、注释、示例
新增文件/文件夹更新相关索引或列表章节
配置文件变更检查README或安装文档
无文档影响跳过
跳过: 版本号升级(SKILL.md中的版本字段、README徽章)—— 仅在用户明确要求时执行此类操作。

Phase 3: CHANGELOG Update

阶段3:更新CHANGELOG

If
CHANGELOG.md
exists and changes are significant (not just lint/formatting fixes):
  1. Check if today's date already has an entry (
    ## YYYY-MM-DD
    )
  2. If yes — append new bullets to existing entry
  3. If no — add new
    ## YYYY-MM-DD
    entry (newest first)
  4. Write max 5 bullets, each starting with
    - **Bold label** — description
  5. Only user-visible or architecturally significant changes. Skip: renumbering, internal refactoring, structural fixes, deduplication
IncludeSkip
New capabilities / skillsRenumbering, renaming
Workflow changesInternal refactoring (D1-D9 fixes)
Breaking changesDeduplication passes
New integrationsReference file moves
Performance improvements users noticeToken efficiency numbers
Skip if: no
CHANGELOG.md
in project, or changes are trivial (whitespace, lint auto-fixes only).
如果项目存在
CHANGELOG.md
且变更为重要变更(不只是lint/格式修复):
  1. 检查是否已存在当日日期的条目(
    ## YYYY-MM-DD
  2. 如果已有 —— 在现有条目下追加新的列表项
  3. 如果没有 —— 新增
    ## YYYY-MM-DD
    条目(最新的放在最前面)
  4. 最多写5个列表项,每个都以
    - **加粗标签** — 描述
    的格式编写
  5. 仅记录用户可见或架构层面的重要变更。跳过:编号调整、内部重构、结构修复、去重操作
包含跳过
新功能/新技能编号调整、重命名
工作流变更内部重构(D1-D9修复)
破坏性变更去重优化
新集成参考文件移动
用户可感知的性能提升Token效率数值
跳过条件: 项目中没有
CHANGELOG.md
,或变更为无关紧要的修改(仅空白字符调整、lint自动修复)。

Phase 4: Lint Check

阶段4:Lint检查

MANDATORY READ:
shared/references/ci_tool_detection.md
(Discovery Hierarchy + Command Registry)
Discover and run project linters before committing, per ci_tool_detection.md.
Step 1: Discover linter setup — first check
docs/project/runbook.md
for explicit lint/format commands (they take priority over auto-detection), then follow ci_tool_detection.md discovery hierarchy. Also check:
CLAUDE.md
,
README.md
,
CONTRIBUTING.md
for lint instructions.
Step 2: Run linters with auto-fix
  1. Run discovered lint commands with
    --fix
    flag (or equivalent per ci_tool_detection.md Auto-Fix column)
  2. If linter reports errors that auto-fix cannot resolve — fix manually
  3. If no linter config found in project — skip this phase (log: "No linter configuration found, skipping") Step 3: Verify
  4. Re-run linters without
    --fix
    to confirm zero errors
  5. If errors remain after 2 fix attempts — report remaining errors to user and proceed
必读:
shared/references/ci_tool_detection.md
(发现层级 + 命令注册表)
按照ci_tool_detection.md的要求,提交前发现并运行项目的lint工具。
步骤1:发现lint配置 —— 首先检查
docs/project/runbook.md
中明确的lint/格式化命令(优先级高于自动发现),之后按照ci_tool_detection.md的发现层级查找。同时检查:
CLAUDE.md
README.md
CONTRIBUTING.md
中的lint说明。
步骤2:运行带自动修复的lint命令
  1. 运行发现的lint命令,添加
    --fix
    参数(或ci_tool_detection.md自动修复列中对应的等价参数)
  2. 如果lint报告自动修复无法解决的错误 —— 手动修复
  3. 如果项目中未找到lint配置 —— 跳过该阶段(日志记录:"未找到linter配置,跳过该阶段") 步骤3:验证
  4. 不带
    --fix
    参数重新运行lint命令,确认无错误
  5. 如果经过2次修复尝试后仍有错误 —— 向用户报告剩余错误后继续后续流程

Phase 5: Stage and Commit

阶段5:暂存并提交

  1. Run
    git add -A
    to stage everything
  2. Run
    git diff --cached --stat
    to show what will be committed
  3. Run
    git log --oneline -3
    to match recent commit style
  4. Compose a concise commit message summarizing ALL changes
  5. Commit with
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  1. 执行
    git add -A
    暂存所有内容
  2. 执行
    git diff --cached --stat
    展示待提交的内容
  3. 执行
    git log --oneline -3
    匹配近期的提交风格
  4. 编写简洁的提交信息,概括所有变更
  5. 提交时添加
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Phase 6: Push and Report

阶段6:推送并报告

  1. Push to the current branch's remote tracking branch
  2. Report: branch name, commit hash, files changed count

  1. 推送到当前分支对应的远程跟踪分支
  2. 报告内容:分支名称提交哈希变更文件数量

Critical Rules

关键规则

  • Stage everything:
    git add -A
    — no partial commits
  • Match commit style: Follow the project's existing commit message convention
  • Co-Author tag: Always include
    Co-Authored-By
    line
  • No version bumps: Skip version field updates (SKILL.md Version, README badge) unless explicitly requested
  • Lint before commit: Always attempt lint discovery; skip gracefully if no config found

  • 全量暂存: 执行
    git add -A
    —— 不允许部分提交
  • 匹配提交风格: 遵循项目现有的提交信息规范
  • 共同作者标签: 始终包含
    Co-Authored-By
  • 不自动升级版本: 跳过版本字段更新(SKILL.md版本、README徽章),除非用户明确要求
  • 提交前先lint: 始终尝试发现lint配置;如果未找到配置则优雅跳过

Definition of Done

完成定义

  • All changes staged (untracked + modified)
  • Commit created with descriptive message
  • Pushed to remote successfully

Version: 1.0.0 Last Updated: 2026-02-12
  • 所有变更已暂存(未追踪的 + 已修改的)
  • 已创建带描述性信息的提交
  • 已成功推送到远程仓库

版本: 1.0.0 最后更新: 2026-02-12