[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DAM2J0WP7GZ2ED5XDMSYSZ":3,"skill-same:01M7DAM2J0WP7GZ2ED5XDMSYSZ":57},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7DAM2J0WP7GZ2ED5XDMSYSZ","code-integrate",null,"Integrate a Code Writer's patch files into a part branch, run the gates and measure the size, then squash the branch into one signed commit and push it. Use when a Writer report arrives with format-patch files, when a part branch needs its commits applied and checked, or when a checked part is ready to squash and push. Not for choosing commit messages (see \u002Fcommit), for restacking branches, or for syncing open pull requests.","LNSD\u002Florecraft","LNSD","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3949095?v=4","01M7DAK7ETP75C8S8PT783SWSP","Lorenzo Delgado","01M7DAK7FBVXE30743ZG437MTN",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcode-integrate\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: code-integrate\ndescription: Integrate a Code Writer's patch files into a part branch, run the gates and measure the size, then squash the branch into one signed commit and push it. Use when a Writer report arrives with format-patch files, when a part branch needs its commits applied and checked, or when a checked part is ready to squash and push. Not for choosing commit messages (see \u002Fcommit), for restacking branches, or for syncing open pull requests.\ncompatibility: Requires python3, git with commit signing configured, and just with the repository's gate recipes. Pushing needs a remote named origin.\nallowed-tools: Bash(python3 .agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py *) Bash(python3 *\u002F.agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py *)\n---\n\n# Code Integrate\n\nTwo mechanical steps of integrating a Writer's work, as one command each. Every command prints ONE compact JSON\nresult and writes the raw git and gate output to a log file, named in the result as `log`; read the log only when\nthe result says something failed. Judgement stays with the caller: the commit message, the split, the review.\n\n## When to Use\n\n- **`apply`**: a Writer's patch files are ready to go onto a part branch, and the gates and size are wanted.\n- **`squash`**: the applied branch is accepted and is to become one signed commit on its base, pushed.\n\nThe scripts never resolve a conflict, never commit unsigned, never use plain `--force`, and never merge or\nclose a pull request.\n\n## Commands\n\nRun on a clean working tree. `--repo` names the repository and defaults to the current directory, so the call\nneeds no `cd`; patch and message-file paths are read from the caller's directory, not from `--repo`.\n\n```bash\npython3 \u003Crepo>\u002F.agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py apply --repo \u003Crepo> --branch lnsd\u002F\u003Cslug> --base origin\u002Fmain \u003Cpatch>...\npython3 \u003Crepo>\u002F.agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py apply --repo \u003Crepo> --branch lnsd\u002F\u003Cslug> --base origin\u002Fmain --rebase \u003Cpatch>...\npython3 \u003Crepo>\u002F.agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py squash --repo \u003Crepo> --branch lnsd\u002F\u003Cslug> --base origin\u002Fmain --message-file \u003Cfile>\n```\n\n| Argument | Meaning |\n|---|---|\n| `--repo` | The repository to work in; default the current directory |\n| `--branch` | The part branch, as named on the remote |\n| `--base` | The ref the part sits on: `origin\u002Fmain`, or the branch of the part below |\n| `\u003Cpatch>...` | The `git format-patch` files, in order |\n| `--message-file` | The commit message, written by the caller with the `commit` skill |\n| `--rebase` | `apply` only: start the part branch at `--base`, not `origin\u002F\u003Cbranch>`, for patches from a Writer REBASE |\n\n`apply` fetches, switches to the branch (created at the base when it is not on the remote, otherwise at\n`origin\u002F\u003Cbranch>`; a local branch that already descends from that start is continued, so a FIX after a failed\ngate lands on top of the commits applied before), applies the patches with `git am --3way`, runs the gates\n`fmt-check`, `check`, `typecheck`, `test` and `check-docs` in that order, stopping at the first failure, and\nmeasures the size against the base. With `--rebase`, it starts at `--base` even when the local branch still points\nto the old remote head, and records that fetched remote SHA for `squash`'s lease. The default behavior is unchanged.\nA FIX after a failed `apply --rebase` must pass `--rebase` again to keep the same mode.\nA gate that passes but leaves the tree changed is reported as `gates_failed`.\n\n`squash` soft-resets to the base, commits with `-s -S`, checks that `%G?` is `G`, then pushes: `-u` when the\nbranch is new on the remote, otherwise `--force-with-lease` pinned to the `origin\u002F\u003Cbranch>` that `apply` fetched.\nAfter `apply --rebase`, it uses the recorded base and lease SHA and allows the rebased branch not to contain\n`origin\u002F\u003Cbranch>`. A remote update after `apply` still makes the lease fail. It refuses when the tree is not clean,\nwhen the default-mode branch does not contain `origin\u002F\u003Cbranch>`, and when the push is rejected; each time it puts\nthe branch back and pushes nothing, as it does when the commit is not signed.\n\n## Result\n\n```json\n{\"status\":\"ok\",\"branch\":\"lnsd\u002Fx\",\"base_sha\":\"…\",\"start_sha\":\"…\",\"head_sha\":\"…\",\"commits\":2,\"size\":243,\"gates\":{\"fmt-check\":\"pass\",\"check\":\"pass\"},\"log\":\"…\"}\n```\n\n- `apply`: `status` is `ok`, `gates_failed` (the failed gate is `fail` and later gates did not run, or a gate\n  left the tree changed, with a `reason`) or `needs_rebase`. In rebase mode, `lease_sha` is the remote SHA fetched\n  for the later push lease. `size` is lines added plus deleted against the base, lockfiles and binary files excluded.\n- `squash`: `status` is `ok` with `head_sha`, `signature` (`G`) and `push` (`new` or `lease`).\n- `refused` and `error` carry a `reason`.\n\n## Exit codes\n\n| Code | Meaning | What the caller does |\n|---|---|---|\n| 0 | `ok` | Continue |\n| 1 | A gate failed | Read the log, send the failure back as a FIX |\n| 2 | The patches do not apply; `git am` was aborted and the branch is untouched | Resolve the patch conflict with the Writer against the selected base |\n| 3 | Refused (`--repo` is not a git repository, dirty tree, local branch not descending from its start, unsigned commit, base not an ancestor, remote ahead of the branch in default mode, or stale rebase lease) or a git command failed | Read `reason`; fix the setup, do not work around it |\n","# Code Integrate\n\nTwo mechanical steps of integrating a Writer's work, as one command each. Every command prints ONE compact JSON\nresult and writes the raw git and gate output to a log file, named in the result as `log`; read the log only when\nthe result says something failed. Judgement stays with the caller: the commit message, the split, the review.\n\n## When to Use\n\n- **`apply`**: a Writer's patch files are ready to go onto a part branch, and the gates and size are wanted.\n- **`squash`**: the applied branch is accepted and is to become one signed commit on its base, pushed.\n\nThe scripts never resolve a conflict, never commit unsigned, never use plain `--force`, and never merge or\nclose a pull request.\n\n## Commands\n\nRun on a clean working tree. `--repo` names the repository and defaults to the current directory, so the call\nneeds no `cd`; patch and message-file paths are read from the caller's directory, not from `--repo`.\n\n```bash\npython3 \u003Crepo>\u002F.agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py apply --repo \u003Crepo> --branch lnsd\u002F\u003Cslug> --base origin\u002Fmain \u003Cpatch>...\npython3 \u003Crepo>\u002F.agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py apply --repo \u003Crepo> --branch lnsd\u002F\u003Cslug> --base origin\u002Fmain --rebase \u003Cpatch>...\npython3 \u003Crepo>\u002F.agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py squash --repo \u003Crepo> --branch lnsd\u002F\u003Cslug> --base origin\u002Fmain --message-file \u003Cfile>\n```\n\n| Argument | Meaning |\n|---|---|\n| `--repo` | The repository to work in; default the current directory |\n| `--branch` | The part branch, as named on the remote |\n| `--base` | The ref the part sits on: `origin\u002Fmain`, or the branch of the part below |\n| `\u003Cpatch>...` | The `git format-patch` files, in order |\n| `--message-file` | The commit message, written by the caller with the `commit` skill |\n| `--rebase` | `apply` only: start the part branch at `--base`, not `origin\u002F\u003Cbranch>`, for patches from a Writer REBASE |\n\n`apply` fetches, switches to the branch (created at the base when it is not on the remote, otherwise at\n`origin\u002F\u003Cbranch>`; a local branch that already descends from that start is continued, so a FIX after a failed\ngate lands on top of the commits applied before), applies the patches with `git am --3way`, runs the gates\n`fmt-check`, `check`, `typecheck`, `test` and `check-docs` in that order, stopping at the first failure, and\nmeasures the size against the base. With `--rebase`, it starts at `--base` even when the local branch still points\nto the old remote head, and records that fetched remote SHA for `squash`'s lease. The default behavior is unchanged.\nA FIX after a failed `apply --rebase` must pass `--rebase` again to keep the same mode.\nA gate that passes but leaves the tree changed is reported as `gates_failed`.\n\n`squash` soft-resets to the base, commits with `-s -S`, checks that `%G?` is `G`, then pushes: `-u` when the\nbranch is new on the remote, otherwise `--force-with-lease` pinned to the `origin\u002F\u003Cbranch>` that `apply` fetched.\nAfter `apply --rebase`, it uses the recorded base and lease SHA and allows the rebased branch not to contain\n`origin\u002F\u003Cbranch>`. A remote update after `apply` still makes the lease fail. It refuses when the tree is not clean,\nwhen the default-mode branch does not contain `origin\u002F\u003Cbranch>`, and when the push is rejected; each time it puts\nthe branch back and pushes nothing, as it does when the commit is not signed.\n\n## Result\n\n```json\n{\"status\":\"ok\",\"branch\":\"lnsd\u002Fx\",\"base_sha\":\"…\",\"start_sha\":\"…\",\"head_sha\":\"…\",\"commits\":2,\"size\":243,\"gates\":{\"fmt-check\":\"pass\",\"check\":\"pass\"},\"log\":\"…\"}\n```\n\n- `apply`: `status` is `ok`, `gates_failed` (the failed gate is `fail` and later gates did not run, or a gate\n  left the tree changed, with a `reason`) or `needs_rebase`. In rebase mode, `lease_sha` is the remote SHA fetched\n  for the later push lease. `size` is lines added plus deleted against the base, lockfiles and binary files excluded.\n- `squash`: `status` is `ok` with `head_sha`, `signature` (`G`) and `push` (`new` or `lease`).\n- `refused` and `error` carry a `reason`.\n\n## Exit codes\n\n| Code | Meaning | What the caller does |\n|---|---|---|\n| 0 | `ok` | Continue |\n| 1 | A gate failed | Read the log, send the failure back as a FIX |\n| 2 | The patches do not apply; `git am` was aborted and the branch is untouched | Resolve the patch conflict with the Writer against the selected base |\n| 3 | Refused (`--repo` is not a git repository, dirty tree, local branch not descending from its start, unsigned commit, base not an ancestor, remote ahead of the branch in default mode, or stale rebase lease) or a git command failed | Read `reason`; fix the setup, do not work around it |\n",{"name":5,"description":7,"allowed-tools":24,"compatibility":25},"Bash(python3 .agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py *) Bash(python3 *\u002F.agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py *)","Requires python3, git with commit signing configured, and just with the repository's gate recipes. Pushing needs a remote named origin.","main","d2f3a5835a8673ccf134ae62f0a5e84104ff7098",".agents\u002Fskills\u002Fcode-integrate",1,"https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft","https:\u002F\u002Fgithub.com\u002FLNSD","2026-11-10 04:14:00",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add LNSD\u002Florecraft --skill code-integrate",{"tool":39,"command":40},"bunx","bunx skills add LNSD\u002Florecraft --skill code-integrate",{"tool":42,"command":43},"pnpm","pnpm dlx skills add LNSD\u002Florecraft --skill code-integrate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcode-integrate\u002FSKILL.md",true,[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"scripts\u002Fgitflow.py","SCRIPT","脚本",8102,"https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fgitflow.py",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"scripts\u002Fintegrate.py",11229,"https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcode-integrate\u002Fscripts\u002Fintegrate.py",[58,65,70,75,80,85],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7DASA0R4R68AVTZJFJJBYDB","review","Review a change. Use when asked to review.","https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002Ftests\u002Fit\u002Frule_cases\u002FLC504\u002Ftrigger\u002Freference-link-to-parent-skill-file\u002Froot\u002F.agents\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":66,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7DAS1YXJQ8FGABR8BGX9FAT","https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002Ftests\u002Fit\u002Frule_cases\u002FLC504\u002Fnear_miss\u002Fclimb-that-stays-inside-and-document-climb\u002Froot\u002F.agents\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":71,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7DAS0TCKQFF2YJ5VY9SWHV2","https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002Ftests\u002Fit\u002Frule_cases\u002FLC503\u002Ftrigger\u002Fskill-reference-link-read-from-skill-root\u002Froot\u002F.agents\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":76,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7DARZNA9QGXHAY17142R8YT","https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002Ftests\u002Fit\u002Frule_cases\u002FLC503\u002Fnear_miss\u002Fskill-link-climbing-above-skill-root\u002Froot\u002F.agents\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":81,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7DARYHB7WBR44AJXFJSZQ7X","https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002Ftests\u002Fit\u002Frule_cases\u002FLC502\u002Ftrigger\u002Fskill-fragment-in-file-without-headings\u002Froot\u002F.agents\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":86,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7DARXCTFKMH92FHVV8H30MM","https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002Ftests\u002Fit\u002Frule_cases\u002FLC501\u002Ftrigger\u002Fskill-link-starting-with-slash\u002Froot\u002F.agents\u002Fskills\u002Freview\u002FSKILL.md",[],[]]