[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AXBJ8W9SFCXMXE1DGXKA1J":3,"skill-same:01M7AXBJ8W9SFCXMXE1DGXKA1J":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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":29,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7AXBJ8W9SFCXMXE1DGXKA1J","rules",null,"Writing a project's rules, the instructions that apply only when they are relevant, under `.agents\u002Frules\u002F`. Covers deciding whether something is a rule, `AGENTS.md` or a Skill, choosing the trigger, writing patterns in the supported glob dialect, wording a rule as a convention, deciding when a rule belongs in a shared plugin and moving it there, and proving it with `uze agent rules check`. Use when asked to create, add or write a rule, when an instruction \"only applies to src\u002F…\" or to one kind of file, when `AGENTS.md` has grown sections that only matter under one path and should be split, or when a rule does not seem to fire.","uze-sh\u002Fuze","uze-sh","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F334211959?v=4","01M7AX5KNT81AC56YMRT586MBW","uze","01M7AX5KPDQA2QP7DWGZFMH4PQ",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fuze-sh\u002Fuze\u002Fblob\u002Fmain\u002Fplugins\u002Fuze\u002Fskills\u002Frules\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: rules\ndescription: Writing a project's rules, the instructions that apply only when they are relevant, under `.agents\u002Frules\u002F`. Covers deciding whether something is a rule, `AGENTS.md` or a Skill, choosing the trigger, writing patterns in the supported glob dialect, wording a rule as a convention, deciding when a rule belongs in a shared plugin and moving it there, and proving it with `uze agent rules check`. Use when asked to create, add or write a rule, when an instruction \"only applies to src\u002F…\" or to one kind of file, when `AGENTS.md` has grown sections that only matter under one path and should be split, or when a rule does not seem to fire.\n---\n\n> This skill runs `uze`. If `uze` is not on `PATH`, UZE is not installed here and nothing below applies.\n\n# UZE: a project's rules, written once\n\nA rule is a Markdown file directly under `.agents\u002Frules\u002F` in the checkout,\nversioned with the project. Its frontmatter says when it applies:\n\n```markdown\n---\ntrigger: glob\nglobs: \"**\u002Fsrc\u002Fui\u002F**\u002F*.rs\"\n---\n\nColours come from the theme: name a `Token`, never an RGB value.\n```\n\nAntigravity reads `.agents\u002Frules\u002F` itself. Claude Code, Codex and OpenCode\nreceive the same files through the rules engine `uze setup` installs. Every\nharness reads the one directory and the one format, so a rule is written\nonce.\n\nA subfolder of `.agents\u002Frules\u002F` is read only once `.agents\u002Frules.json`\nregisters it, the way Antigravity reads it and so UZE and the engine too:\n\n```json\n{\"entries\": [{\"path\": \".agents\u002Frules\u002Fteam\"}]}\n```\n\n`path` is relative to the checkout root, not to the manifest. A folder\nentry reads the `*.md` directly in it, a file entry that one file;\n`include_only` and `exclude` list paths relative to the entry. A manifest\nthat does not parse registers nothing, and `inherits` reaches Antigravity\nalone. Keep the project's own rules flat unless a folder genuinely helps,\nand never add or edit an entry naming a plugin's folder: those are UZE's.\n\n## Is it a rule at all?\n\nDecide this first. Most instructions are not rules.\n\n- **Always true, whatever the agent is touching** → `AGENTS.md`. It is\n  loaded whole, every session, by every harness, and nothing else is needed.\n- **True only under a path, or for one kind of task** → a rule. That is the\n  one thing a rule does that `AGENTS.md` cannot: arrive only when it is\n  relevant.\n- **A procedure with steps** (\"to cut a release, run …\") → a Skill. A rule\n  is a convention the code should follow, never a script to execute.\n\nWhen `AGENTS.md` carries a section that only matters under `src\u002Fui\u002F` or\n`migrations\u002F`, that section is a rule waiting to be split out.\n\n## Choose the trigger\n\n| trigger | arrives | use it for |\n|---|---|---|\n| `glob` | when the agent reads, edits or writes a file matching `globs` | conventions of a directory or a file type: the common case |\n| `model_decision` | as one line of an index; the agent reads the body when the task calls for it | conventions a path cannot predict, such as \"when adding a migration\" |\n| `always_on` | at session start, every session | sparingly: it costs every session, and most such text belongs in `AGENTS.md` |\n| `manual` | only when someone points the agent at the file | reference material |\n\n`glob` needs `globs`. `model_decision` needs a `description`, written as\n*when to read it* (\"Read before adding or changing a database migration\"),\nnever as a summary of the body.\n\n## Patterns: the supported dialect\n\n`globs` is one pattern or a comma-separated list. Quote the value when it\nopens with `*`, as YAML would otherwise read it as an alias. Each pattern is\none of two shapes:\n\n- **A file name, with no `\u002F`**, matched at any depth: `*.sql`, `Makefile`,\n  `*.test.ts`.\n- **A path opening with `**\u002F`**: `**\u002Fsrc\u002Fui\u002F**`, `**\u002Fmigrations\u002F*.sql`,\n  `**\u002F*.rs`. Antigravity matches a pattern against the file's absolute path,\n  so a pattern naming a directory has to open with `**\u002F` to fire there;\n  `src\u002Fui\u002F**` never would, and is reported for that reason.\n\nInside a pattern: `**` is any number of directories (none included), `*`\nany characters within one name, `?` one character, `[ab]` or `[0-9]` one\ncharacter of a set or range, and everything else, spaces included, is\nliteral. Braces (`{a,b}`), negated sets (`[!a]`), a leading `\u002F`, `.\u002F` or\n`..\u002F` are outside the dialect. They are reported by the check and not\ndelivered, even where one harness alone would accept them, so that the four\nharnesses never disagree on what matched. Use two patterns instead of\nbraces.\n\n## Write it as a convention\n\n- **One concern per file**, short. A rule that covers three things\n  arrives three times as often as each of them is relevant.\n- **State the project's convention**, not an order about the agent's\n  reply: \"Handlers return `Result\u003C_, ApiError>`\", not \"You MUST always\n  answer with…\". A rule worded as an imperative about the reply reads like\n  a prompt injection, and a careful model will treat it as one.\n- Leave out where the rule lives: the engine and Antigravity both tell the\n  agent which file a rule came from.\n\n## Check it\n\n```bash\nuze agent rules check\n```\n\nIt validates every file under `.agents\u002Frules\u002F` and every file\n`.agents\u002Frules.json` registers, offline, needs no workspace, and exits\nnon-zero on a manifest that does not parse or naming each file that is not\na deliverable rule and why\n(no frontmatter, an unknown trigger, a missing `globs` or `description`, a\npattern outside the dialect). On success it lists each rule with its\ntrigger and patterns. Run it after every change to a rule, and before you\nsay a rule is done. `uze status` reports the same findings for a person.\n\n## Moving rules from a harness-specific directory\n\nRules kept in `.claude\u002Frules\u002F`, `.cursor\u002Frules\u002F` (`.mdc`), `.windsurf\u002Frules\u002F`\nor the legacy `.agent\u002Frules\u002F` reach only one harness. Move each into\n`.agents\u002Frules\u002F` with the mechanical mapping:\n\n- `paths` or `globs` → `trigger: glob`, each pattern that names a directory\n  prefixed with `**\u002F` (`src\u002F**` becomes `**\u002Fsrc\u002F**`);\n- `alwaysApply: true` → `trigger: always_on`;\n- a `description` alone → `trigger: model_decision`.\n\nA pattern outside the dialect is flagged for the person to decide, never\nsilently rewritten. Propose the move, wait for agreement, then run the\ncheck.\n\n## A rule several projects share belongs in a plugin\n\nA rule in `.agents\u002Frules\u002F` belongs to this project. When the same\nconvention holds for every repository of a team or a stack, and someone is\nabout to copy the file into a second project, it belongs in a plugin\ninstead: written once in the plugin's `rules\u002F`, and copied into every\nproject that declares the plugin. Keep a rule in the project when it names\nthis project's own layout, or when only this project follows it.\n\nA plugin's rules arrive in a folder of the plugin's own,\n`.agents\u002Frules\u002F\u003Cplugin>@\u003Cmarket>\u002F\u003Crule>.md`, registered in\n`.agents\u002Frules.json` by an entry UZE writes. Those files are the\nplugin's, judged against the revision `agents.lock` pins. Never edit one\nin place: `uze status` reports the edit as drift, and no install or update\noverwrites it, so the project silently stops following the plugin for that\nrule. Either change the rule in the plugin and update, or take ownership\nof the change: move the file out of the plugin's folder into\n`.agents\u002Frules\u002F` so it becomes the project's own.\n\nTo move a project rule into a plugin:\n\n1. Pick the plugin, or create one with the `uze:author` Skill\n   (`uze agent plugin create \u003Cname> --market \u003Cmarket> --rules`).\n2. Move the file to the plugin's `rules\u002F\u003Crule>.md`, unchanged. Its\n   patterns stay relative to the root of the project that receives it.\n3. `uze agent plugin check \u003Cplugin directory>`, then publish the\n   marketplace as the `uze:author` Skill describes.\n4. In each project, delete the project's own copy and run\n   `uze \u003Cplugin>@\u003Cmarket>`: the plugin's copy takes its place in the\n   plugin's folder. Commit both changes together, with `agents.lock` and\n   `.agents\u002Frules.json`.\n5. `uze agent rules check` in the project, and `uze status`, which counts\n   the plugin's rules apart from the project's own.\n\nPropose the move and wait for agreement before deleting the project's\nfile: which projects should follow the convention is the person's call.\n","> This skill runs `uze`. If `uze` is not on `PATH`, UZE is not installed here and nothing below applies.\n\n# UZE: a project's rules, written once\n\nA rule is a Markdown file directly under `.agents\u002Frules\u002F` in the checkout,\nversioned with the project. Its frontmatter says when it applies:\n\n```markdown\n---\ntrigger: glob\nglobs: \"**\u002Fsrc\u002Fui\u002F**\u002F*.rs\"\n---\n\nColours come from the theme: name a `Token`, never an RGB value.\n```\n\nAntigravity reads `.agents\u002Frules\u002F` itself. Claude Code, Codex and OpenCode\nreceive the same files through the rules engine `uze setup` installs. Every\nharness reads the one directory and the one format, so a rule is written\nonce.\n\nA subfolder of `.agents\u002Frules\u002F` is read only once `.agents\u002Frules.json`\nregisters it, the way Antigravity reads it and so UZE and the engine too:\n\n```json\n{\"entries\": [{\"path\": \".agents\u002Frules\u002Fteam\"}]}\n```\n\n`path` is relative to the checkout root, not to the manifest. A folder\nentry reads the `*.md` directly in it, a file entry that one file;\n`include_only` and `exclude` list paths relative to the entry. A manifest\nthat does not parse registers nothing, and `inherits` reaches Antigravity\nalone. Keep the project's own rules flat unless a folder genuinely helps,\nand never add or edit an entry naming a plugin's folder: those are UZE's.\n\n## Is it a rule at all?\n\nDecide this first. Most instructions are not rules.\n\n- **Always true, whatever the agent is touching** → `AGENTS.md`. It is\n  loaded whole, every session, by every harness, and nothing else is needed.\n- **True only under a path, or for one kind of task** → a rule. That is the\n  one thing a rule does that `AGENTS.md` cannot: arrive only when it is\n  relevant.\n- **A procedure with steps** (\"to cut a release, run …\") → a Skill. A rule\n  is a convention the code should follow, never a script to execute.\n\nWhen `AGENTS.md` carries a section that only matters under `src\u002Fui\u002F` or\n`migrations\u002F`, that section is a rule waiting to be split out.\n\n## Choose the trigger\n\n| trigger | arrives | use it for |\n|---|---|---|\n| `glob` | when the agent reads, edits or writes a file matching `globs` | conventions of a directory or a file type: the common case |\n| `model_decision` | as one line of an index; the agent reads the body when the task calls for it | conventions a path cannot predict, such as \"when adding a migration\" |\n| `always_on` | at session start, every session | sparingly: it costs every session, and most such text belongs in `AGENTS.md` |\n| `manual` | only when someone points the agent at the file | reference material |\n\n`glob` needs `globs`. `model_decision` needs a `description`, written as\n*when to read it* (\"Read before adding or changing a database migration\"),\nnever as a summary of the body.\n\n## Patterns: the supported dialect\n\n`globs` is one pattern or a comma-separated list. Quote the value when it\nopens with `*`, as YAML would otherwise read it as an alias. Each pattern is\none of two shapes:\n\n- **A file name, with no `\u002F`**, matched at any depth: `*.sql`, `Makefile`,\n  `*.test.ts`.\n- **A path opening with `**\u002F`**: `**\u002Fsrc\u002Fui\u002F**`, `**\u002Fmigrations\u002F*.sql`,\n  `**\u002F*.rs`. Antigravity matches a pattern against the file's absolute path,\n  so a pattern naming a directory has to open with `**\u002F` to fire there;\n  `src\u002Fui\u002F**` never would, and is reported for that reason.\n\nInside a pattern: `**` is any number of directories (none included), `*`\nany characters within one name, `?` one character, `[ab]` or `[0-9]` one\ncharacter of a set or range, and everything else, spaces included, is\nliteral. Braces (`{a,b}`), negated sets (`[!a]`), a leading `\u002F`, `.\u002F` or\n`..\u002F` are outside the dialect. They are reported by the check and not\ndelivered, even where one harness alone would accept them, so that the four\nharnesses never disagree on what matched. Use two patterns instead of\nbraces.\n\n## Write it as a convention\n\n- **One concern per file**, short. A rule that covers three things\n  arrives three times as often as each of them is relevant.\n- **State the project's convention**, not an order about the agent's\n  reply: \"Handlers return `Result\u003C_, ApiError>`\", not \"You MUST always\n  answer with…\". A rule worded as an imperative about the reply reads like\n  a prompt injection, and a careful model will treat it as one.\n- Leave out where the rule lives: the engine and Antigravity both tell the\n  agent which file a rule came from.\n\n## Check it\n\n```bash\nuze agent rules check\n```\n\nIt validates every file under `.agents\u002Frules\u002F` and every file\n`.agents\u002Frules.json` registers, offline, needs no workspace, and exits\nnon-zero on a manifest that does not parse or naming each file that is not\na deliverable rule and why\n(no frontmatter, an unknown trigger, a missing `globs` or `description`, a\npattern outside the dialect). On success it lists each rule with its\ntrigger and patterns. Run it after every change to a rule, and before you\nsay a rule is done. `uze status` reports the same findings for a person.\n\n## Moving rules from a harness-specific directory\n\nRules kept in `.claude\u002Frules\u002F`, `.cursor\u002Frules\u002F` (`.mdc`), `.windsurf\u002Frules\u002F`\nor the legacy `.agent\u002Frules\u002F` reach only one harness. Move each into\n`.agents\u002Frules\u002F` with the mechanical mapping:\n\n- `paths` or `globs` → `trigger: glob`, each pattern that names a directory\n  prefixed with `**\u002F` (`src\u002F**` becomes `**\u002Fsrc\u002F**`);\n- `alwaysApply: true` → `trigger: always_on`;\n- a `description` alone → `trigger: model_decision`.\n\nA pattern outside the dialect is flagged for the person to decide, never\nsilently rewritten. Propose the move, wait for agreement, then run the\ncheck.\n\n## A rule several projects share belongs in a plugin\n\nA rule in `.agents\u002Frules\u002F` belongs to this project. When the same\nconvention holds for every repository of a team or a stack, and someone is\nabout to copy the file into a second project, it belongs in a plugin\ninstead: written once in the plugin's `rules\u002F`, and copied into every\nproject that declares the plugin. Keep a rule in the project when it names\nthis project's own layout, or when only this project follows it.\n\nA plugin's rules arrive in a folder of the plugin's own,\n`.agents\u002Frules\u002F\u003Cplugin>@\u003Cmarket>\u002F\u003Crule>.md`, registered in\n`.agents\u002Frules.json` by an entry UZE writes. Those files are the\nplugin's, judged against the revision `agents.lock` pins. Never edit one\nin place: `uze status` reports the edit as drift, and no install or update\noverwrites it, so the project silently stops following the plugin for that\nrule. Either change the rule in the plugin and update, or take ownership\nof the change: move the file out of the plugin's folder into\n`.agents\u002Frules\u002F` so it becomes the project's own.\n\nTo move a project rule into a plugin:\n\n1. Pick the plugin, or create one with the `uze:author` Skill\n   (`uze agent plugin create \u003Cname> --market \u003Cmarket> --rules`).\n2. Move the file to the plugin's `rules\u002F\u003Crule>.md`, unchanged. Its\n   patterns stay relative to the root of the project that receives it.\n3. `uze agent plugin check \u003Cplugin directory>`, then publish the\n   marketplace as the `uze:author` Skill describes.\n4. In each project, delete the project's own copy and run\n   `uze \u003Cplugin>@\u003Cmarket>`: the plugin's copy takes its place in the\n   plugin's folder. Commit both changes together, with `agents.lock` and\n   `.agents\u002Frules.json`.\n5. `uze agent rules check` in the project, and `uze status`, which counts\n   the plugin's rules apart from the project's own.\n\nPropose the move and wait for agreement before deleting the project's\nfile: which projects should follow the convention is the person's call.\n",{"name":5,"description":7},"main","e2cfbb55eec2aa007135f9a2256b73f7170a3b9e","plugins\u002Fuze\u002Fskills\u002Frules",1,"https:\u002F\u002Fgithub.com\u002Fuze-sh\u002Fuze","https:\u002F\u002Fuze.sh","https:\u002F\u002Fgithub.com\u002Fuze-sh","🧩 Agents come and go. Your work stays.","2026-11-13 05:15:37",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add uze-sh\u002Fuze --skill rules",{"tool":39,"command":40},"bunx","bunx skills add uze-sh\u002Fuze --skill rules",{"tool":42,"command":43},"pnpm","pnpm dlx skills add uze-sh\u002Fuze --skill rules","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fuze-sh\u002Fuze\u002Fblob\u002Fmain\u002Fplugins\u002Fuze\u002Fskills\u002Frules\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"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},"01M7AXDFA81RA77NHGYVZRCH0E","commit","North Star fixture skill — used to prove native\u002Fgenerated delivery across harnesses.","https:\u002F\u002Fgithub.com\u002Fuze-sh\u002Fuze\u002Fblob\u002Fmain\u002Ftests\u002F_fixtures\u002Fgolden\u002Fmarketplace\u002Fplugins\u002Fflow\u002Fskills\u002Fcommit\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7AXCYQ5WMH46JRJVF57FTHA","oc-skill","opencode native","https:\u002F\u002Fgithub.com\u002Fuze-sh\u002Fuze\u002Fblob\u002Fmain\u002Ftests\u002F_fixtures\u002Fforeign\u002Fopencode\u002Fnative-plugin\u002Fskills\u002Foc-skill\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7AXCVSFQ76DR4GXGJ1Q9PBA","uze-plugin-first","Emits the deterministic UZE Plugin First conformance proof.","https:\u002F\u002Fgithub.com\u002Fuze-sh\u002Fuze\u002Fblob\u002Fmain\u002Ftests\u002F_fixtures\u002Fforeign\u002Fcodex\u002Fnative-plugin\u002Fskills\u002Fuze-plugin-first\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7AXCTD57QJ3GEN54W5PREV2","hello","says hello","https:\u002F\u002Fgithub.com\u002Fuze-sh\u002Fuze\u002Fblob\u002Fmain\u002Ftests\u002F_fixtures\u002Fforeign\u002Fclaude\u002Fnative-plugin\u002Fskills\u002Fhello\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7AXCR1HKRHJ7PP39JQS8SQ5","agy-native","antigravity native","https:\u002F\u002Fgithub.com\u002Fuze-sh\u002Fuze\u002Fblob\u002Fmain\u002Ftests\u002F_fixtures\u002Fforeign\u002Fantigravity\u002Fnative-plugin\u002Fskills\u002Fagy-native\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"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},"01M7AXCNTR4WXE4VT89MK4XQST","review","Review code for correctness and missing tests","https:\u002F\u002Fgithub.com\u002Fuze-sh\u002Fuze\u002Fblob\u002Fmain\u002Ftests\u002F_fixtures\u002Fcanonical\u002Fworkflow\u002Fskills\u002Freview\u002FSKILL.md",[],[]]