[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DAP3ENPA40FDG69SFZ6WCJ":3,"skill-same:01M7DAP3ENPA40FDG69SFZ6WCJ":47},{"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},"01M7DAP3ENPA40FDG69SFZ6WCJ","code-rules-check",null,"Check a code changeset against the repository's code rules in docs\u002Fcode\u002F - select the code rules the diff falls under and walk each one's checklist against the changed lines, citing the code rule behind every finding. Use after implementing and before committing, when reviewing a pull request for compliance with the repository's conventions, or when asked whether code follows the guidelines. A compliance check, not a bug or security review","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\u002Fskills\u002Fcode-rules-check\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: code-rules-check\ndescription: Check a code changeset against the repository's code rules in docs\u002Fcode\u002F - select the code rules the diff falls under and walk each one's checklist against the changed lines, citing the code rule behind every finding. Use after implementing and before committing, when reviewing a pull request for compliance with the repository's conventions, or when asked whether code follows the guidelines. A compliance check, not a bug or security review\ncompatibility: Reads files only. Requires a git checkout and the code rules kept as Markdown documents in docs\u002Fcode\u002F with name and description frontmatter\nallowed-tools: Bash(git diff *) Bash(git status *) Bash(git merge-base *) Bash(grep *) Bash(ls docs\u002F*) Read\n---\n\n# Code Rules Check\n\nVerifies that a changeset follows the code rules (also called code rules) in `docs\u002Fcode\u002F`. This is a **compliance check, not a\nreview**: it does not hunt bugs, question the design, or assess security.\n\nOne question only: **does this code follow the code rules that govern it?**\n\nIf `docs\u002Fcode\u002F` does not exist, say so and stop: the repository has no code rules to check against.\n\n## 1. The changeset\n\n```bash\ngit diff --stat HEAD                                  # uncommitted work, the default\ngit diff \"$(git merge-base HEAD main)\"...HEAD         # a whole branch\n```\n\nGiven explicit paths or commits, check those instead. Check only what the diff touches: an unchanged line\nthat breaks a code rule is not this changeset's finding.\n\n## 2. The code rules that govern it\n\n```bash\ngrep -m 3 -E '^(description|type|scope):' docs\u002Fcode\u002F*.md\ngrep -m 4 -E '^(description|status):' docs\u002Farch\u002Fadr-*.md   # where the repository keeps decision records\n```\n\nAn architecture decision record in `docs\u002Farch\u002F` whose `status` is `accepted` governs code as a code rule\ndoes, and its checklist is checked the same way; one in any other status does not bind code.\n\nSelect by what the diff **contains**, not by what the task was about. Walk the hunks and, for each construct\nin them — a signature, an exception handler, an import, a docstring, a test, a log line — find the code rules\nwhose trigger clause names it. Prefer the most specific code rule in a group, and one scoped to the changed\npackage or directory over a global one. Read every match. Principle code rules, whose descriptions state their\nprinciples, are in scope without being read in full.\n\n## 3. The check\n\n**Each code rule's checklist is the check surface** — its conventions restated as verifiable statements. Walk\nevery item against every changed hunk it applies to. Where a code rule has no checklist, walk its conventions.\n\nDo this inline when the selection is small, which it usually is: one piece of work touches a few groups of code rules,\nand the code rules are often already in context from `\u002Fcode-rules`.\n\n**Fan out only when the selection exceeds about four groups**, or the diff spans several packages, and\nonly if you can run subagents. Then give each agent one group's code rule paths, the diff command, the\ninstruction to apply those code rules' checklists, and the report format below. Deduplicate what comes back:\ntwo groups flagging one line are reported once, citing both.\n\n## 4. Report\n\nClean:\n\n> Code rules check clean. Applied: `python-typing`, `error-handling`, `python-docstrings`.\n\nViolations, most severe first, one per line, with the fix:\n\n> `src\u002Fapp\u002Floader.py:118` — **error-handling**: this `except Exception` neither logs nor re-raises, so\n> a failed parse is indistinguishable from an empty file. Log it, or raise a domain error from it.\n\n- **Every finding cites the code rule that states the convention.** A finding with no code rule behind it is a\n  style opinion — drop it.\n- Quote the checklist item when the violation is not self-evident.\n- Do not report what the repository's linter or formatter already enforces. A code rule naming a lint rule\n  does not mean the lint rule is enabled: check the linter's configuration before assuming it caught something.\n- A convention that seems wrong, or contradicts another code rule, is a finding against the code rules, not the code.\n","# Code Rules Check\n\nVerifies that a changeset follows the code rules (also called code rules) in `docs\u002Fcode\u002F`. This is a **compliance check, not a\nreview**: it does not hunt bugs, question the design, or assess security.\n\nOne question only: **does this code follow the code rules that govern it?**\n\nIf `docs\u002Fcode\u002F` does not exist, say so and stop: the repository has no code rules to check against.\n\n## 1. The changeset\n\n```bash\ngit diff --stat HEAD                                  # uncommitted work, the default\ngit diff \"$(git merge-base HEAD main)\"...HEAD         # a whole branch\n```\n\nGiven explicit paths or commits, check those instead. Check only what the diff touches: an unchanged line\nthat breaks a code rule is not this changeset's finding.\n\n## 2. The code rules that govern it\n\n```bash\ngrep -m 3 -E '^(description|type|scope):' docs\u002Fcode\u002F*.md\ngrep -m 4 -E '^(description|status):' docs\u002Farch\u002Fadr-*.md   # where the repository keeps decision records\n```\n\nAn architecture decision record in `docs\u002Farch\u002F` whose `status` is `accepted` governs code as a code rule\ndoes, and its checklist is checked the same way; one in any other status does not bind code.\n\nSelect by what the diff **contains**, not by what the task was about. Walk the hunks and, for each construct\nin them — a signature, an exception handler, an import, a docstring, a test, a log line — find the code rules\nwhose trigger clause names it. Prefer the most specific code rule in a group, and one scoped to the changed\npackage or directory over a global one. Read every match. Principle code rules, whose descriptions state their\nprinciples, are in scope without being read in full.\n\n## 3. The check\n\n**Each code rule's checklist is the check surface** — its conventions restated as verifiable statements. Walk\nevery item against every changed hunk it applies to. Where a code rule has no checklist, walk its conventions.\n\nDo this inline when the selection is small, which it usually is: one piece of work touches a few groups of code rules,\nand the code rules are often already in context from `\u002Fcode-rules`.\n\n**Fan out only when the selection exceeds about four groups**, or the diff spans several packages, and\nonly if you can run subagents. Then give each agent one group's code rule paths, the diff command, the\ninstruction to apply those code rules' checklists, and the report format below. Deduplicate what comes back:\ntwo groups flagging one line are reported once, citing both.\n\n## 4. Report\n\nClean:\n\n> Code rules check clean. Applied: `python-typing`, `error-handling`, `python-docstrings`.\n\nViolations, most severe first, one per line, with the fix:\n\n> `src\u002Fapp\u002Floader.py:118` — **error-handling**: this `except Exception` neither logs nor re-raises, so\n> a failed parse is indistinguishable from an empty file. Log it, or raise a domain error from it.\n\n- **Every finding cites the code rule that states the convention.** A finding with no code rule behind it is a\n  style opinion — drop it.\n- Quote the checklist item when the violation is not self-evident.\n- Do not report what the repository's linter or formatter already enforces. A code rule naming a lint rule\n  does not mean the lint rule is enabled: check the linter's configuration before assuming it caught something.\n- A convention that seems wrong, or contradicts another code rule, is a finding against the code rules, not the code.\n",{"name":5,"description":7,"allowed-tools":24,"compatibility":25},"Bash(git diff *) Bash(git status *) Bash(git merge-base *) Bash(grep *) Bash(ls docs\u002F*) Read","Reads files only. Requires a git checkout and the code rules kept as Markdown documents in docs\u002Fcode\u002F with name and description frontmatter","main","d2f3a5835a8673ccf134ae62f0a5e84104ff7098","skills\u002Fcode-rules-check",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-rules-check",{"tool":39,"command":40},"bunx","bunx skills add LNSD\u002Florecraft --skill code-rules-check",{"tool":42,"command":43},"pnpm","pnpm dlx skills add LNSD\u002Florecraft --skill code-rules-check","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLNSD\u002Florecraft\u002Fblob\u002Fmain\u002Fskills\u002Fcode-rules-check\u002FSKILL.md",true,[],[48,55,60,65,70,75],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"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":56,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"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":61,"name":50,"nameZh":6,"description":51,"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},"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":66,"name":50,"nameZh":6,"description":51,"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},"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":71,"name":50,"nameZh":6,"description":51,"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},"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":76,"name":50,"nameZh":6,"description":51,"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},"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",[],[]]