[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DEFBS8JMDKCP92R35S6PYE":3,"skill-same:01M7DEFBS8JMDKCP92R35S6PYE":44},{"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":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7DEFBS8JMDKCP92R35S6PYE","xeito-quality-gate",null,"Get a change in this repository through its quality gates, the CRAP score per function (max 6) and mutation testing (mix xeito.mutate). Use when mix ci or the pre-commit hook rejects a function as too risky, when a mutant survives, when adding a source to test\u002Fmutate.exs, or when deciding how to test new code so that it passes both.","romeroabelleira\u002Fxeito","romeroabelleira","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F108562?v=4","01M7DEES0DQ09Z5M83W75B3J7C","Juan Romero Abelleira","01M7DEES13Q7TFAGMGG4P99S49",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fromeroabelleira\u002Fxeito\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxeito-quality-gate\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: xeito-quality-gate\ndescription: Get a change in this repository through its quality gates, the CRAP score per function (max 6) and mutation testing (mix xeito.mutate). Use when mix ci or the pre-commit hook rejects a function as too risky, when a mutant survives, when adding a source to test\u002Fmutate.exs, or when deciding how to test new code so that it passes both.\n---\n\n# Quality gates\n\n`mix ci` must pass before every commit: unused and audited dependencies, format, warnings as errors, Credo, Dialyzer, the tests with the CRAP gate, and mutation testing. The pre-commit hook (`scripts\u002Fcheck-crap.sh`) runs the CRAP gate again. Never get around a gate (no `--no-verify`, no baseline entry, no skipped test): a gate that fails is pointing at real risk. `docs\u002Ftesting.md` describes the whole local procedure.\n\n## CRAP: complexity times untested-ness\n\nEach function scores `complexity² × (1 − coverage)³ + complexity` (`test\u002Fsupport\u002Fxeito\u002Fcrap.ex`). Over 6, the run fails and names the function, its complexity and its coverage. Complexity counts 1, plus one for each further function clause, `if`\u002F`unless`, `&&`\u002F`||`\u002F`and`\u002F`or`, each `case`\u002F`cond`\u002F`fn` clause after the first, each `\u003C-` of a `with` and each `else` clause after the first.\n\nWhat the score tells you:\n- **Coverage low:** the function does something no test exercises. Untested, complexity 3 already fails (2 scores exactly 6). Write the tests first; that is the fix most of the time. `XEITO_CRAP_SHOW=\"Mod.fun\u002F2\" mix test --cover` lists the lines no test runs.\n- **Complexity over 6, even when covered:** split it, after its tests are in place.\n  - A dispatch on a name or kind becomes themed dispatchers of at most six clauses each (`Session.command\u002F3` hands commands to `start_command`, `turn_command`, `info_command`, `debug_command`), or a lookup table where the cases differ only by name (the TUI's key table).\n  - A process callback (`handle_event\u002F4`, `handle_info\u002F2`) dispatches on the kind of message to small functions.\n  - The branches of a long body become helpers; every extra `if`, `&&` or guard `and` counts.\n- Code that only wires processes, terminals or sockets (a mix task's `run\u002F1`, a TUI's `init\u002F1`) scores high when untested. Move its logic into pure functions you can test, and keep the wiring thin.\n\n`test\u002Fcrap_baseline.exs` held older debt and is empty; it may only shrink. Never add a function to it.\n\n## Mutation testing: would a test notice?\n\n`mix xeito.mutate` changes one place at a time and reruns the tests. A mutant the tests miss **survives**: behaviour that no test pins down. The sources listed in `test\u002Fmutate.exs` (security and decision logic first) must have no survivors, each against the tests listed for it. Check other code by hand: `mix xeito.mutate lib\u002Fx.ex --test test\u002Fx_test.exs`, optionally `--lines 10-40`.\n\nWhat a survivor usually means:\n\n| Mutation | What no test checks |\n|---|---|\n| `>` → `>=` (boundary) | the exact limit: off-by-one |\n| `==` → `!=`, `>` → `\u003C=` (negation) | the condition itself, in one direction or both |\n| `and` ↔ `or` | the cases where only one side holds |\n| `if` ↔ `unless`, `not x` → `x` | the branch the condition chooses |\n| clause removed (function, `case`, `cond`, `fn`) | the input that clause exists for |\n| list element or `~w` word removed | one entry of a list: an allowlist, a denylist, a set of separators |\n| `+` ↔ `-` | the arithmetic |\n\nHow to kill one:\n1. Find the **scenario** the code exists for: the input and the outcome someone relies on. Write that test, named after the behaviour, not after the mutant. A test that pins a scenario survives refactoring; one that only kills a mutant does not.\n2. If there is no such scenario, the code may be unnecessary: an **equivalent mutant** (no input can tell the difference) marks dead or redundant code. Remove it rather than excuse it.\n3. Lists that are tuning data (stopwords, heuristics) need not have a test per entry. Lists that decide safety (allowlists, denylists, separators) do: changing what counts as safe should change a test.\n\n## Adding a source to the mutation gate\n\nAdd an entry to `test\u002Fmutate.exs`: `\"lib\u002Fx.ex\" => [\"test\u002Fx_test.exs\"]`, or `[tests: […], section: \"guards\"]` for the lines under a `# --- guards ---` comment. List only the tests that should cover it; each source runs against its own tests, so the entry states truthfully what covers it. Run `mix xeito.mutate lib\u002Fx.ex`, kill the survivors, then run `mix ci`.\n","# Quality gates\n\n`mix ci` must pass before every commit: unused and audited dependencies, format, warnings as errors, Credo, Dialyzer, the tests with the CRAP gate, and mutation testing. The pre-commit hook (`scripts\u002Fcheck-crap.sh`) runs the CRAP gate again. Never get around a gate (no `--no-verify`, no baseline entry, no skipped test): a gate that fails is pointing at real risk. `docs\u002Ftesting.md` describes the whole local procedure.\n\n## CRAP: complexity times untested-ness\n\nEach function scores `complexity² × (1 − coverage)³ + complexity` (`test\u002Fsupport\u002Fxeito\u002Fcrap.ex`). Over 6, the run fails and names the function, its complexity and its coverage. Complexity counts 1, plus one for each further function clause, `if`\u002F`unless`, `&&`\u002F`||`\u002F`and`\u002F`or`, each `case`\u002F`cond`\u002F`fn` clause after the first, each `\u003C-` of a `with` and each `else` clause after the first.\n\nWhat the score tells you:\n- **Coverage low:** the function does something no test exercises. Untested, complexity 3 already fails (2 scores exactly 6). Write the tests first; that is the fix most of the time. `XEITO_CRAP_SHOW=\"Mod.fun\u002F2\" mix test --cover` lists the lines no test runs.\n- **Complexity over 6, even when covered:** split it, after its tests are in place.\n  - A dispatch on a name or kind becomes themed dispatchers of at most six clauses each (`Session.command\u002F3` hands commands to `start_command`, `turn_command`, `info_command`, `debug_command`), or a lookup table where the cases differ only by name (the TUI's key table).\n  - A process callback (`handle_event\u002F4`, `handle_info\u002F2`) dispatches on the kind of message to small functions.\n  - The branches of a long body become helpers; every extra `if`, `&&` or guard `and` counts.\n- Code that only wires processes, terminals or sockets (a mix task's `run\u002F1`, a TUI's `init\u002F1`) scores high when untested. Move its logic into pure functions you can test, and keep the wiring thin.\n\n`test\u002Fcrap_baseline.exs` held older debt and is empty; it may only shrink. Never add a function to it.\n\n## Mutation testing: would a test notice?\n\n`mix xeito.mutate` changes one place at a time and reruns the tests. A mutant the tests miss **survives**: behaviour that no test pins down. The sources listed in `test\u002Fmutate.exs` (security and decision logic first) must have no survivors, each against the tests listed for it. Check other code by hand: `mix xeito.mutate lib\u002Fx.ex --test test\u002Fx_test.exs`, optionally `--lines 10-40`.\n\nWhat a survivor usually means:\n\n| Mutation | What no test checks |\n|---|---|\n| `>` → `>=` (boundary) | the exact limit: off-by-one |\n| `==` → `!=`, `>` → `\u003C=` (negation) | the condition itself, in one direction or both |\n| `and` ↔ `or` | the cases where only one side holds |\n| `if` ↔ `unless`, `not x` → `x` | the branch the condition chooses |\n| clause removed (function, `case`, `cond`, `fn`) | the input that clause exists for |\n| list element or `~w` word removed | one entry of a list: an allowlist, a denylist, a set of separators |\n| `+` ↔ `-` | the arithmetic |\n\nHow to kill one:\n1. Find the **scenario** the code exists for: the input and the outcome someone relies on. Write that test, named after the behaviour, not after the mutant. A test that pins a scenario survives refactoring; one that only kills a mutant does not.\n2. If there is no such scenario, the code may be unnecessary: an **equivalent mutant** (no input can tell the difference) marks dead or redundant code. Remove it rather than excuse it.\n3. Lists that are tuning data (stopwords, heuristics) need not have a test per entry. Lists that decide safety (allowlists, denylists, separators) do: changing what counts as safe should change a test.\n\n## Adding a source to the mutation gate\n\nAdd an entry to `test\u002Fmutate.exs`: `\"lib\u002Fx.ex\" => [\"test\u002Fx_test.exs\"]`, or `[tests: […], section: \"guards\"]` for the lines under a `# --- guards ---` comment. List only the tests that should cover it; each source runs against its own tests, so the entry states truthfully what covers it. Run `mix xeito.mutate lib\u002Fx.ex`, kill the survivors, then run `mix ci`.\n",{"name":5,"description":7},"main","a13c65918461608e1ea5b3ecb204ef8cf06964b0",".agents\u002Fskills\u002Fxeito-quality-gate","https:\u002F\u002Fgithub.com\u002Fromeroabelleira\u002Fxeito","https:\u002F\u002Fgithub.com\u002Fromeroabelleira","2026-11-13 03:05:42",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add romeroabelleira\u002Fxeito --skill xeito-quality-gate",{"tool":36,"command":37},"bunx","bunx skills add romeroabelleira\u002Fxeito --skill xeito-quality-gate",{"tool":39,"command":40},"pnpm","pnpm dlx skills add romeroabelleira\u002Fxeito --skill xeito-quality-gate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fromeroabelleira\u002Fxeito\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxeito-quality-gate\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":19},"01M7DEG5Y3ZSHKHAG3T4KF4A86","web-search","Search the web and extract the content of the result pages.","https:\u002F\u002Fgithub.com\u002Fromeroabelleira\u002Fxeito\u002Fblob\u002Fmain\u002Fpriv\u002Fskills\u002Fbench\u002Fskills\u002Fweb-search\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7DEG3GVYEGJ1RJP7P4N90MF","video-transcript","Fetch the transcript of a YouTube video for summarization and analysis.","https:\u002F\u002Fgithub.com\u002Fromeroabelleira\u002Fxeito\u002Fblob\u002Fmain\u002Fpriv\u002Fskills\u002Fbench\u002Fskills\u002Fvideo-transcript\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7DEG0BC1AY9R72J1TENYX4G","translate-text","Translate text between languages, keeping formatting and terminology.","https:\u002F\u002Fgithub.com\u002Fromeroabelleira\u002Fxeito\u002Fblob\u002Fmain\u002Fpriv\u002Fskills\u002Fbench\u002Fskills\u002Ftranslate-text\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7DEFY61C36WVQ1Z78NEBSN0","screenshot-ui","Take screenshots of a web app's pages in a browser to check the layout.","https:\u002F\u002Fgithub.com\u002Fromeroabelleira\u002Fxeito\u002Fblob\u002Fmain\u002Fpriv\u002Fskills\u002Fbench\u002Fskills\u002Fscreenshot-ui\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"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},"01M7DEFWX1JQH6BZBWG9B8NKYN","release-notes","Draft release notes from the commits since the last tag.","https:\u002F\u002Fgithub.com\u002Fromeroabelleira\u002Fxeito\u002Fblob\u002Fmain\u002Fpriv\u002Fskills\u002Fbench\u002Fskills\u002Frelease-notes\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7DEFVWS9H75PATHHS8WTF9X","pdf-extract","Extract text and tables from PDF files.","https:\u002F\u002Fgithub.com\u002Fromeroabelleira\u002Fxeito\u002Fblob\u002Fmain\u002Fpriv\u002Fskills\u002Fbench\u002Fskills\u002Fpdf-extract\u002FSKILL.md",[],[]]