AGENT SKILL

split-to-prs

Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.

License 许可
Unlicense
所属仓库
saski/arnesto
最近更新
2026-11-12
Stars
★ 6
Forks
0

01 前言 Front Matter

name
split-to-prs
description
Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.

03 SKILL.md 正文

Split to PRs

Turn one pile of work into a few small PRs.

Hard rules

  • Do not create branches, commit, push, or open PRs until the user approves the split plan.
  • Never discard user work. No destructive git commands (reset --hard, clean -fdx, branch deletion, force-push, history rewrite) without explicit approval.
  • Always save a recoverable snapshot before moving work around. This often starts from dirty work on main, so do not assume there is already a safe branch.
  • Stage only named files or hunks. No git add . / git add -A.

1. Check the state

Compare the current work to the repo's default branch, including committed and uncommitted changes. Summarize the real slices you see, and use the chat history to recover intent.

Before proposing slices, find ownership signals for the touched paths (CODEOWNERS, nested ownership files, or repo equivalents) and use them to identify natural reviewer boundaries.

2. Propose the split

Use judgment on detail. Usually PR titles are enough. Add a one-line scope note only when a title is unclear. Show a Mermaid diagram when there are multiple slices.

Optimize for reviewer-aligned PRs with minimal unrelated diff: split independent owners or concerns, keep tightly coupled changes together, and when stacking is necessary, order foundations before consumers.

Default to independent PRs off the default branch. Stack PRs only when the dependency is real.

Ask for approval before starting.

3. Execute the split

  • If there is uncommitted work, save a recoverable snapshot without changing the working tree:

    SHA=$(git stash create "pre-split")
    if [ -n "$SHA" ]; then
      git update-ref "refs/backup/pre-split-$(date +%s)" "$SHA"
    fi
    
  • For each approved slice, create a branch from the right base, stage and commit only the planned files or hunks, then push and open the PR.

4. Report back

Keep it short: PR titles and URLs, plus anything left on the starting branch or working tree. Do not delete the backup ref or original branch unless the user asks.

04 同仓库更多 Skills

saski
saski/arnesto

visualize

Use /visualize for creating compact charts, diagrams, or other visuals inline as part of the conversation itself. It chooses among Markdown tables, Mermaid, inline HTML, and other supported in-transcript forms. Use Canvas for durable artifacts outside the transcript that users may revisit, refine, or share.

★ 6
saski
saski/arnesto

update-cursor-settings

Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.

★ 6
saski
saski/arnesto

update-cli-config

View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.

★ 6
saski
saski/arnesto

statusline

Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.

★ 6
saski
saski/arnesto

shell

Runs the rest of a /shell request as a literal shell command. Use only when the user explicitly invokes /shell and wants the following text executed directly in the terminal.

★ 6
saski
saski/arnesto

share

Save, back up, or share the current project on Cursor — creates a repo (a saved, versioned copy that isn't public) even for users who have never used git, handling all setup automatically. Use when the user asks to save, back up, publish, or share their project on Cursor, or how to not lose it.

★ 6