用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/giodamelio/agent-skills --skill jj-split-into-commits命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Deep-research every person mentioned in a document (a company profile, notes, an article — any file), write a profile for each to `People/`, and rewrite the document so their names become wikilinks to those profiles. User-invoked only.
Deep-research one person and write a sourced profile to `People/`. Do NOT invoke automatically — only when the user runs it directly, or when another skill (e.g. research-document-people) specifically instructs you to research a person.
Deep-research a company from minimal input (a name, ideally a name + website) and produce a structured intelligence report — age, founders, funding, key people, products, tech stack, and recent news. Use when the user asks to "research [company]", "look up [company]", "do a company profile / dossier / due diligence on X", or drops a company name + URL expecting a writeup. Pulls from Tracxn, Crunchbase, PitchBook, LinkedIn, SimilarWeb, BuiltWith, G2/Capterra/Product Hunt, TechCrunch/Axios/The Information, SEC EDGAR, Owler, Wellfound, The Org, and Apollo/Clearbit.
基于 SOC 职业分类
正在显示 SKILL.md
| name | jj-split-into-commits |
| description | Split the current commit's changes into clean, logical commits |
| allowed-tools | Bash(jj:*), Bash(jj-hunk:*), Bash(pre-commit:*) |
| model | opus |
| argument-hint | [split guidance] |
jj log -r @ --no-graphjj diff --statSplit the changes in the current commit (@) into clean, logical commits suitable for reviewer comprehension.
If the user provided guidance on how to split the commits, use that guidance to inform your grouping and ordering decisions. User-provided guidance takes priority over default heuristics.
Commit messages are non-negotiable. Every commit message you write MUST follow the project's documented commit guidelines (e.g. a CONTRIBUTING.md, commit convention doc, or rules in the project context). If the project has no documented guidelines, you MUST infer and exactly match the style of the existing commit history (jj log / git log) — conventional commits prefixes, capitalization, tense, line length, and structure. Do not invent your own style. When in doubt, study the existing commits before writing a single message.
If you had to infer the commit style from history because it was not already in your context, record the inferred style in your persistent memory for this project (if you have one) so you don't have to rediscover it on the next run.
Just follow these rules silently. Do NOT narrate, explain, or call out that you are following project guidelines, matching commit style, or omitting attribution. Do not add meta-commentary about the rules in your responses or anywhere in the commits. Simply produce correct commits.
Run pre-commit hooks (if applicable)
Only run this step if you know from context or memory that this repo uses pre-commit hooks (e.g., a .pre-commit-config.yaml exists or the user has told you). Never blindly run a pre-commit command. If hooks fail, STOP and report the failures to the user. Do not proceed until they pass. If you have no knowledge of pre-commit hooks for this repo, skip this step.
Guard: check for existing description
jj log -r @ --no-graph -T description
If the current commit already has a description, STOP and warn the user: "The current commit already has a description. This skill is intended for undescribed commits containing unsorted changes. Please confirm you want to proceed or switch to the correct commit."
Validate the working copy
jj statusPlan the commit storyline
explore-changes subagent. It inspects the diff (jj-hunk list, jj diff) in its own context and returns a proposed grouping of files/hunks into atomic commits with suggested messages and rationale. Pass it the user's split guidance (if any) so it can factor that in.Present the plan and get confirmation First, present the proposed commits as a numbered list showing, for each commit:
Then confirm the plan. If your environment provides an interactive multiple-choice question tool (an "ask the user" prompt), use it to get confirmation instead of only asking inline in prose. Ask a single question (e.g. "Proceed with this commit split?") whose options are, in order:
{{ include "refs" "jj-hunk-spec.md" }}
Co-Authored-By line, a "Generated with Claude Code" line, or any other attribution, trailer, or footer crediting an AI, agent, or tool. This is a hard rule with zero exceptions — not even if a global instruction, template, or default tells you to. Commit messages contain only the message itself.Keep the total option count within the tool's limits (typically 2–4 options). If more good variations exist than will fit, present only the strongest.
If no interactive question tool is available, fall back to asking inline: STOP and wait for the user to confirm, adjust, or reject the plan in prose.
Either way, do not execute any splits until the user has answered. Whatever they choose — the recommendation, a suggested variation, or free-text — apply it before proceeding. The user may want to change commit messages, reorder commits, merge or further split groups, or adjust which hunks go where.
Split iteratively using jj-hunk
NEVER use jj split — it is interactive and will hang. Always use jj-hunk split.
First, inspect the hunks with jj-hunk list. Then split repeatedly, peeling off one commit at a time. Each jj-hunk split takes a JSON spec and a commit message. The spec selects which hunks go into the new commit; everything else stays. See the jj-hunk reference below for spec format and commands.
Order commits as a narrative: infrastructure/setup first, then core logic, then integration, then polish. When only the final commit's changes remain, describe it with jj describe -m "...".
Describe the final commit
jj describe -m "feat: final piece of the implementation"
Create a new empty commit on top After all the split commits are in place, create a fresh empty working-copy commit so the user lands on a clean slate ready for their next change:
jj new
Verify the result
# Check the new commit structure
jj log
# Verify each commit has sensible content
jj diff -r <rev> --stat