Skip to content

chore: 添加 /ship skill,一键 commit + push + create PR - #5

Merged
lishuceo merged 1 commit into
mainfrom
chore/ship-skill
Feb 17, 2026
Merged

chore: 添加 /ship skill,一键 commit + push + create PR#5
lishuceo merged 1 commit into
mainfrom
chore/ship-skill

Conversation

@lishuceo

Copy link
Copy Markdown
Owner

Summary

  • 新增 .claude/skills/ship/SKILL.md,用户输入 /ship 即可自动执行 commit → push → create PR 全流程
  • 支持 $ARGUMENTS 传入变更描述作为 commit message 基础
  • 自动检测 main 分支并创建新分支,防止直推

Test plan

  • 在 Claude Code 中输入 /ship 验证完整流程
  • 输入 /ship 描述信息 验证参数传递

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Feb 17, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@claude

claude Bot commented Feb 17, 2026

Copy link
Copy Markdown

Claude finished @lishuceo's task in 1m 9s —— View job


PR Review: /ship skill

  • Read changed files and understand the diff
  • Review the skill file for bugs, security, and correctness
  • Post review summary

Approved — clean, well-structured skill with no issues at or above the reporting threshold.

Assessment

This PR adds a single file (.claude/skills/ship/SKILL.md) that defines a procedural skill to automate commit → push → create PR. The skill is well-written:

  • Security: Explicitly prohibits git add . / git add -A (line 22) and committing .env or credentials (line 50). No force-push usage. These are the right guardrails.
  • Safety: Detects when on main and creates a new branch first (line 29), preventing accidental direct pushes.
  • Conventions: Follows conventional commits format and the project's <type>: <中文描述> style.
  • disable-model-invocation: true: Correct choice — this is a step-by-step procedural skill, not one that needs model reasoning about whether to invoke.

Minor observations (below reporting threshold, for awareness only)

  • The main branch check (line 29) is hardcoded — repos with master or other default branches would need adjustment. In practice, this repo uses main, so it's fine here.
  • No explicit handling for "PR already exists for this branch" — but the error-handling instruction on line 52 ("出错时停下来说明原因") covers this adequately.

No changes requested.

@lishuceo
lishuceo merged commit 160056d into main Feb 17, 2026
1 of 2 checks passed
@lishuceo
lishuceo deleted the chore/ship-skill branch February 17, 2026 07:24
lishuceo added a commit that referenced this pull request Apr 8, 2026
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant