[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CFAR3JZMDZBKS175GTN3M5":3,"skill-same:01M6CFAR3JZMDZBKS175GTN3M5":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6CFAR3JZMDZBKS175GTN3M5","git-commit-workflow",null,"Use when committing git changes, especially when staged files already exist, changes need logical split commits, untracked files need safety checks, commit hooks modify files, or Chinese Conventional Commit messages are required.","HeathWang\u002Fhw-cc-plugin","HeathWang","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4961711?v=4","01M6CF9BZ3A0CSSG3QQGGDPFEH","Heath Wang","01M6CF9C3HT4NPM370Z8MYZW4G",1,"MIT","https:\u002F\u002Fgithub.com\u002FHeathWang\u002Fhw-cc-plugin\u002Fblob\u002Fmaster\u002Fskills\u002Fgit-commit-workflow\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"commit","git commit","git","workflow","commit workflow","git commit workflow","staged","changes","split","chinese","files","hooks","use","commit messages","commits","Safety","conventional commit","messages","2026-11-10 10:12:30",false,"---\nname: git-commit-workflow\ndescription: Use when committing git changes, especially when staged files already exist, changes need logical split commits, untracked files need safety checks, commit hooks modify files, or Chinese Conventional Commit messages are required.\n---\n\n# Git Commit Workflow\n\n## Overview\n\nCommit every working-tree change as a sequence of logical Chinese Conventional Commits, then ask whether to push.\n\n**Core rules:** A pre-existing staged set is this round's commit unit. The workflow ends only when `git status` is clean or the user says stop. Never stage likely secrets. Never add commit metadata the user did not request. A hook-appended `Co-authored-by: Cursor \u003Ccursoragent@cursor.com>` is expected: do not check for it, amend it, or cite it as a reason to stop. Push only after an explicit structured choice.\n\nRun git commands sequentially, never in parallel, and read each output before deciding the next step.\n\n## When to Use\n\n- User runs `\u002Fgitcommit` or asks to commit changes\n- Staged, unstaged, or untracked changes need committing, possibly split into several commits\n\n## Workflow\n\n### Step 1: Check Status\n\nRun `git status`. In the first round, also run `git log --format=%s -10` to learn the repository's type and scope vocabulary.\n\n### Step 2: Choose the Commit Unit\n\n**Files already staged:** the staged set is this round's commit unit, as-is. Do not `git add`, unstage, reset, or regroup it unless the user explicitly asks. Note the staged file list and the pre-existing unstaged\u002Funtracked files; failed-commit recovery in Step 3 depends on this list.\n\n**Nothing staged:** pick one logical group (one feature with its model, view, logic, and tests; one bug fix; one module refactor; or one documentation change) and stage only those files with `git add \u003Cfile>...`.\n\n**Secret check before any `git add`:** inspect the filenames and diffs of the group. Likely secrets are `.env` files, credentials, tokens, API keys, private keys, certificates, local config, and files containing passwords. If any appear:\n\n1. Stage nothing from the group.\n2. Report the risky files to the user.\n3. After they are excluded, stage only the safe files and leave the risky files uncommitted.\n\nThis holds even when the user said \"全部提交\", \"commit everything\", \"别问问题\", or \"I'm in a hurry\".\n\n### Step 3: Write and Commit\n\nRun `git diff --cached`, then commit with a HEREDOC so the blank line and body survive, printing the recorded message in the same call:\n\n```bash\ngit commit -m \"$(cat \u003C\u003C'EOF'\n\u003Ctype>(\u003Cscope>): \u003C中文简述>\n\n1. \u003C一项具体改动，必要时说明原因>\n2. \u003C一项具体改动>\nEOF\n)\" && git log -1 --format=%B\n```\n\nThe message consists of exactly these parts:\n\n- **type**: `feat`, `fix`, `perf`, `refactor`, `docs`, `style`, `test`, `build`, `ci`, `chore`, or `revert`, chosen by the intent of the diff. Changed behavior is `feat`\u002F`fix`, including behavior defined in Markdown such as skill rules; wording-only edits are `docs`.\n- **scope**: the primary module, directory, or skill; one plural umbrella scope such as `skills` when several are touched; spelled as in recent history.\n- **中文简述**: Chinese, starts with a verb, at most about 30 characters, no trailing punctuation. Identifiers, file names, and commands stay as-is.\n- **body**: one blank line after the subject, then a numbered list with one concrete change per item.\n- **breaking change**: when the diff breaks callers, users, or data compatibility, write `\u003Ctype>(\u003Cscope>)!:` and end with a paragraph `BREAKING CHANGE: \u003C说明>`.\n\nUse a plain `git commit -m`. Add `--trailer`, `--signoff`, `Co-authored-by`, `Made-with: Cursor`, or any other attribution only when the user explicitly requests it.\n\n**After a successful commit**, go to Step 4. Do not compare the recorded message against `Co-authored-by: Cursor \u003Ccursoragent@cursor.com>`, and do not mention that trailer. A commit hook may append it; leave the commit unchanged, continue any remaining rounds, and still ask the push question when the tree is clean.\n\n**If `git commit` fails:**\n\n1. Do not start another group. Read the error output and run `git status`.\n2. If hooks modified files from the failed staged set (per the list from Step 2), inspect their diff, stage only those files, and retry the same commit.\n3. If hooks touched other files, injected metadata, or the state is unclear, stop and report.\n4. Do not use `--amend`; the failed commit does not exist.\n\n### Step 4: Loop\n\nRun `git status`:\n\n- **Changes remain:** return to Step 2 for the next logical group, re-checking what is staged first.\n- **Clean:** go to Step 5.\n- **User said to stop after this round** (\"先提交这一轮\", \"剩下的改动之后再说\", \"先到这里\", or similar): report the remaining changes and end without Step 5.\n\nA successful commit is one round, not completion.\n\n### Step 5: Ask Whether to Push\n\nOnly after a clean `git status`, ask with the runtime's structured choice tool (`AskQuestion`, `AskUserQuestion`), not with open-ended text:\n\n- Question: `所有提交已完成，是否现在推送到远端？`\n- Options: `是，推送` \u002F `否，暂不推送`\n\n**否，暂不推送:** run no push command and report that the commits remain local.\n\n**是，推送:**\n\n1. Run `git branch --show-current`. An empty result means detached HEAD: report that automatic push is unsafe and stop.\n2. Run `git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'`. If an upstream exists, run `git push`.\n3. With no upstream, run `git remote`, then ask another structured choice listing each remote plus a cancel option, even when only one remote exists. After a selection, run `git push -u \u003Cremote> HEAD`.\n4. Report the result. On failure, show the error; never retry with `--force`, `--force-with-lease`, or different arguments.\n\n## Rationalizations\n\n| Thought | Reality |\n|---------|---------|\n| \"The staged files look mixed; regrouping them is safer.\" | The staged set is the user's decision. Commit it as-is unless they ask otherwise. |\n| \"The first commit worked, so I'm done.\" | `git status` decides completion, not the first commit. |\n| \"I'll stage everything remaining to finish faster.\" | Stage one logical group per round. |\n| \"'之后再说' isn't an explicit stop.\" | Natural-language stop instructions count. |\n| \"They said commit everything and don't ask, so `.env` is fine.\" | Likely secrets stop the group and get reported first, under any instruction. |\n| \"I'll commit the safe docs now and mention `.env` later.\" | Report and exclude risky files before staging anything from that group. |\n| \"The hook fixed the file; I'll commit it in a later round.\" | Recover and retry the failed commit unit before touching anything else. |\n| \"A `Made-with: Cursor` trailer is harmless.\" | Unrequested metadata is an unauthorized change to commit content. Do not add it yourself. |\n| \"The hook appended `Co-authored-by: Cursor`, so I should stop instead of continuing or pushing.\" | That trailer is expected. Do not check for it, amend the commit, or skip the rest of the workflow. |\n| \"The commits are done, so a summary is enough.\" | A clean status requires the structured push choice. |\n| \"There's only one remote; choosing it is harmless.\" | Setting upstream changes future pushes. Let the user select it. |\n\n**Stop and return to the workflow** if you are about to: run `git add` while files are already staged; stage a likely secret; add unrequested metadata yourself; amend or halt because a hook appended `Co-authored-by: Cursor`; process other files while a failed commit is unrecovered; finish without the push choice; or pick a remote or force-push on your own.\n","# Git Commit Workflow\n\n## Overview\n\nCommit every working-tree change as a sequence of logical Chinese Conventional Commits, then ask whether to push.\n\n**Core rules:** A pre-existing staged set is this round's commit unit. The workflow ends only when `git status` is clean or the user says stop. Never stage likely secrets. Never add commit metadata the user did not request. A hook-appended `Co-authored-by: Cursor \u003Ccursoragent@cursor.com>` is expected: do not check for it, amend it, or cite it as a reason to stop. Push only after an explicit structured choice.\n\nRun git commands sequentially, never in parallel, and read each output before deciding the next step.\n\n## When to Use\n\n- User runs `\u002Fgitcommit` or asks to commit changes\n- Staged, unstaged, or untracked changes need committing, possibly split into several commits\n\n## Workflow\n\n### Step 1: Check Status\n\nRun `git status`. In the first round, also run `git log --format=%s -10` to learn the repository's type and scope vocabulary.\n\n### Step 2: Choose the Commit Unit\n\n**Files already staged:** the staged set is this round's commit unit, as-is. Do not `git add`, unstage, reset, or regroup it unless the user explicitly asks. Note the staged file list and the pre-existing unstaged\u002Funtracked files; failed-commit recovery in Step 3 depends on this list.\n\n**Nothing staged:** pick one logical group (one feature with its model, view, logic, and tests; one bug fix; one module refactor; or one documentation change) and stage only those files with `git add \u003Cfile>...`.\n\n**Secret check before any `git add`:** inspect the filenames and diffs of the group. Likely secrets are `.env` files, credentials, tokens, API keys, private keys, certificates, local config, and files containing passwords. If any appear:\n\n1. Stage nothing from the group.\n2. Report the risky files to the user.\n3. After they are excluded, stage only the safe files and leave the risky files uncommitted.\n\nThis holds even when the user said \"全部提交\", \"commit everything\", \"别问问题\", or \"I'm in a hurry\".\n\n### Step 3: Write and Commit\n\nRun `git diff --cached`, then commit with a HEREDOC so the blank line and body survive, printing the recorded message in the same call:\n\n```bash\ngit commit -m \"$(cat \u003C\u003C'EOF'\n\u003Ctype>(\u003Cscope>): \u003C中文简述>\n\n1. \u003C一项具体改动，必要时说明原因>\n2. \u003C一项具体改动>\nEOF\n)\" && git log -1 --format=%B\n```\n\nThe message consists of exactly these parts:\n\n- **type**: `feat`, `fix`, `perf`, `refactor`, `docs`, `style`, `test`, `build`, `ci`, `chore`, or `revert`, chosen by the intent of the diff. Changed behavior is `feat`\u002F`fix`, including behavior defined in Markdown such as skill rules; wording-only edits are `docs`.\n- **scope**: the primary module, directory, or skill; one plural umbrella scope such as `skills` when several are touched; spelled as in recent history.\n- **中文简述**: Chinese, starts with a verb, at most about 30 characters, no trailing punctuation. Identifiers, file names, and commands stay as-is.\n- **body**: one blank line after the subject, then a numbered list with one concrete change per item.\n- **breaking change**: when the diff breaks callers, users, or data compatibility, write `\u003Ctype>(\u003Cscope>)!:` and end with a paragraph `BREAKING CHANGE: \u003C说明>`.\n\nUse a plain `git commit -m`. Add `--trailer`, `--signoff`, `Co-authored-by`, `Made-with: Cursor`, or any other attribution only when the user explicitly requests it.\n\n**After a successful commit**, go to Step 4. Do not compare the recorded message against `Co-authored-by: Cursor \u003Ccursoragent@cursor.com>`, and do not mention that trailer. A commit hook may append it; leave the commit unchanged, continue any remaining rounds, and still ask the push question when the tree is clean.\n\n**If `git commit` fails:**\n\n1. Do not start another group. Read the error output and run `git status`.\n2. If hooks modified files from the failed staged set (per the list from Step 2), inspect their diff, stage only those files, and retry the same commit.\n3. If hooks touched other files, injected metadata, or the state is unclear, stop and report.\n4. Do not use `--amend`; the failed commit does not exist.\n\n### Step 4: Loop\n\nRun `git status`:\n\n- **Changes remain:** return to Step 2 for the next logical group, re-checking what is staged first.\n- **Clean:** go to Step 5.\n- **User said to stop after this round** (\"先提交这一轮\", \"剩下的改动之后再说\", \"先到这里\", or similar): report the remaining changes and end without Step 5.\n\nA successful commit is one round, not completion.\n\n### Step 5: Ask Whether to Push\n\nOnly after a clean `git status`, ask with the runtime's structured choice tool (`AskQuestion`, `AskUserQuestion`), not with open-ended text:\n\n- Question: `所有提交已完成，是否现在推送到远端？`\n- Options: `是，推送` \u002F `否，暂不推送`\n\n**否，暂不推送:** run no push command and report that the commits remain local.\n\n**是，推送:**\n\n1. Run `git branch --show-current`. An empty result means detached HEAD: report that automatic push is unsafe and stop.\n2. Run `git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'`. If an upstream exists, run `git push`.\n3. With no upstream, run `git remote`, then ask another structured choice listing each remote plus a cancel option, even when only one remote exists. After a selection, run `git push -u \u003Cremote> HEAD`.\n4. Report the result. On failure, show the error; never retry with `--force`, `--force-with-lease`, or different arguments.\n\n## Rationalizations\n\n| Thought | Reality |\n|---------|---------|\n| \"The staged files look mixed; regrouping them is safer.\" | The staged set is the user's decision. Commit it as-is unless they ask otherwise. |\n| \"The first commit worked, so I'm done.\" | `git status` decides completion, not the first commit. |\n| \"I'll stage everything remaining to finish faster.\" | Stage one logical group per round. |\n| \"'之后再说' isn't an explicit stop.\" | Natural-language stop instructions count. |\n| \"They said commit everything and don't ask, so `.env` is fine.\" | Likely secrets stop the group and get reported first, under any instruction. |\n| \"I'll commit the safe docs now and mention `.env` later.\" | Report and exclude risky files before staging anything from that group. |\n| \"The hook fixed the file; I'll commit it in a later round.\" | Recover and retry the failed commit unit before touching anything else. |\n| \"A `Made-with: Cursor` trailer is harmless.\" | Unrequested metadata is an unauthorized change to commit content. Do not add it yourself. |\n| \"The hook appended `Co-authored-by: Cursor`, so I should stop instead of continuing or pushing.\" | That trailer is expected. Do not check for it, amend the commit, or skip the rest of the workflow. |\n| \"The commits are done, so a summary is enough.\" | A clean status requires the structured push choice. |\n| \"There's only one remote; choosing it is harmless.\" | Setting upstream changes future pushes. Let the user select it. |\n\n**Stop and return to the workflow** if you are about to: run `git add` while files are already staged; stage a likely secret; add unrequested metadata yourself; amend or halt because a hook appended `Co-authored-by: Cursor`; process other files while a failed commit is unrecovered; finish without the push choice; or pick a remote or force-push on your own.\n",{"name":5,"description":7},"master","f542825aef4a5ca7e8c6c69d1f5b32fb325550ad","skills\u002Fgit-commit-workflow",0,"https:\u002F\u002Fgithub.com\u002FHeathWang\u002Fhw-cc-plugin","https:\u002F\u002Fgithub.com\u002FHeathWang","iOS \u002F front end \u002F python develper","2026-11-03 17:20:23",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add HeathWang\u002Fhw-cc-plugin --skill git-commit-workflow",{"tool":61,"command":62},"bunx","bunx skills add HeathWang\u002Fhw-cc-plugin --skill git-commit-workflow",{"tool":64,"command":65},"pnpm","pnpm dlx skills add HeathWang\u002Fhw-cc-plugin --skill git-commit-workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHeathWang\u002Fhw-cc-plugin\u002Fblob\u002Fmaster\u002Fskills\u002Fgit-commit-workflow\u002FSKILL.md",true,[],[70,101,122,132,144,157],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":81,"publishedAt":42},"01M6CFBEFHMPFRFM9AQAJVVAR0","reconstructing-ui-from-screenshots","Use when implementing or correcting an app or web UI from a design image, screenshot, mockup, or reference PNG where accurate size, spacing, color, typography, assets, and alignment matter.","https:\u002F\u002Fgithub.com\u002FHeathWang\u002Fhw-cc-plugin\u002Fblob\u002Fmaster\u002Fskills\u002Freconstructing-ui-from-screenshots\u002FSKILL.md",[76],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[82,83,84,85,86,87,36,88,89,90,91,92,93,94,95,96,97,98,99,100],"screenshots","ui","reconstructing ui from screenshots","mockup","alignment","design","image","web","assets","screenshot","reference","typography","png","app","color","implementing","web ui","size","spacing",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":42},"01M6CFBBT8EXTSBHXEFGRWRZ3C","question-answer","Use when the user wants a read-only explanation of existing code behavior, architecture, control flow, data flow, dependencies, or implementation decisions and has not requested project changes.","https:\u002F\u002Fgithub.com\u002FHeathWang\u002Fhw-cc-plugin\u002Fblob\u002Fmaster\u002Fskills\u002Fquestion-answer\u002FSKILL.md",[],[108,109,110,111,112,113,114,115,116,117,118,119,120,36,121],"question","question answer","flow","grep","architecture","read","data","implementation","user","behavior","webfetch","code","only","decisions",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":42},"01M6CFB60X8Q9479W73SJCDEVJ","java-to-swift","Use when converting Java 1.8 classes to Swift 5.0+ Codable structs - handling type mapping, nullability, inheritance flattening, BaseReq exclusions, and property naming conventions.","https:\u002F\u002Fgithub.com\u002FHeathWang\u002Fhw-cc-plugin\u002Fblob\u002Fmaster\u002Fskills\u002Fjava-to-swift\u002FSKILL.md",[],[129,130,131,113,111,36],"java","java to swift","swift",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":42},"01M6CFB3DMRW02HSYWMMK3VDPM","java-to-nextjs","Use when converting Java 1.8 classes to Next.js TypeScript interface definitions - handling type mapping, nullability, inheritance, naming conventions, and BaseReq\u002FBaseResponse exclusions.","https:\u002F\u002Fgithub.com\u002FHeathWang\u002Fhw-cc-plugin\u002Fblob\u002Fmaster\u002Fskills\u002Fjava-to-nextjs\u002FSKILL.md",[],[129,139,140,36,141,113,142,111,143],"java to nextjs","nextjs","Next.js","typescript","js",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":151,"publishedAt":42},"01M6CFB055EXKR72703ST6H3XW","ios-i18n-workflow","Use when iOS apps using SwiftGen L10n need localization work - adding keys, checking missing translations, or cleaning unused entries. Triggered by hardcoded strings, missing L10n references, incomplete translations across multiple languages, or unused localization cleanup requests.","https:\u002F\u002Fgithub.com\u002FHeathWang\u002Fhw-cc-plugin\u002Fblob\u002Fmaster\u002Fskills\u002Fios-i18n-workflow\u002FSKILL.md",[150],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[152,27,153,36,154,155,156],"ios","ios i18n workflow","cleanup","references","work",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":166,"publishedAt":42},"01M6CFAXJJZ59SWHZ1RAGQ461N","improve-codebase-architecture","Use when the user wants architectural deepening opportunities for a codebase or named files, shown as a visual HTML report, and when they then pick candidates from that report to implement in the code already reviewed.","https:\u002F\u002Fgithub.com\u002FHeathWang\u002Fhw-cc-plugin\u002Fblob\u002Fmaster\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[163],{"categoryNo":164,"categoryName":165,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[167,168,112,169,170,171,172,173,174,175,176,34,36,177,119,178,116],"codebase","improve codebase architecture","improve","report","pick","html report","html","as","for","true","visual","implement"]