[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ERPAAPGWGDA0ER79XGJMZQ":3,"skill-same:01M7ERPAAPGWGDA0ER79XGJMZQ":51},{"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":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7ERPAAPGWGDA0ER79XGJMZQ","codegen",null,"Use when the user asks to generate an API client or server stubs from an OpenAPI spec, scaffold a project or component, or apply the same mechanical change across many files (a codemod, a rename, an API migration).","jeancarlos\u002Fcode-jig","jeancarlos","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F713484?v=4","01M7ERGYQQEYJTXG5GXDY9SZVZ","Jean Souza","01M7ERGYRCBCN8GKJFCGEKQ2M1",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjeancarlos\u002Fcode-jig\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgolden\u002Fpersonal\u002Fskills\u002Fcodegen\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: codegen\ndescription: Use when the user asks to generate an API client or server stubs from an OpenAPI spec, scaffold a project or component, or apply the same mechanical change across many files (a codemod, a rename, an API migration).\n---\n\n# Code generation\n\nGenerators and codemods are deterministic: the same input gives the same output, at no token cost. Prefer them to writing repetitive code by hand.\n\n## Rules\n\n- The generation command lives in the repo: an npm script, an MSBuild target, a `scripts\u002F` file or the generator's own config file. Anyone can rerun it.\n- Never edit generated files by hand. Change the input or the generator's config and regenerate.\n- Pin the generator version in the repo's dev dependencies or tool manifest.\n- Review the generated diff like any other diff, then run the build and tests.\n\n## OpenAPI clients\n\n| Stack | Tool | Command |\n|---|---|---|\n| .NET | NSwag | `dotnet new tool-manifest` once, `dotnet tool install NSwag.ConsoleCore`, keep an `nswag.json`, then `DOTNET_CLI_TELEMETRY_OPTOUT=1 dotnet nswag run nswag.json` |\n| .NET, TS, Python | Kiota | `KIOTA_CLI_TELEMETRY_OPTOUT=1 kiota generate -l CSharp -d openapi.yaml -o src\u002FClient -n My.Client -c ApiClient` (`-l TypeScript`, `-l Python`) |\n| TS, Python | openapi-generator | `npx @openapitools\u002Fopenapi-generator-cli generate -i openapi.yaml -g typescript-fetch -o src\u002Fclient` (`-g python`); needs Java, and the first run downloads the generator jar |\n\nKiota sends usage telemetry unless `KIOTA_CLI_TELEMETRY_OPTOUT=1` is set; set it in the script, not only in your shell.\n\nWindows PowerShell has no `NAME=value command` form: write the variable first in the same command, for example `$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1'; dotnet test`.\n\n## Codemods with ast-grep\n\nast-grep matches syntax, not text, so it does not touch strings or comments that merely look like code.\n\n```\nast-grep run --lang ts --pattern 'console.log($A)' --rewrite 'logger.debug($A)'            # preview\nast-grep run --lang ts --pattern 'console.log($A)' --rewrite 'logger.debug($A)' --update-all\n```\n\nFor a change applied more than once, write a rule file and keep it in the repo (`sgconfig.yml` plus `rules\u002F`), then `ast-grep scan --update-all`. Languages include C#, TypeScript, JavaScript and Python.\n\n## Scaffolding\n\nUse the stack's own templates: `dotnet new \u003Ctemplate>` (with `DOTNET_CLI_TELEMETRY_OPTOUT=1`), `npm create \u003Ctemplate>`, or a template the repo already has. Do not invent a project layout the repo does not follow.\n\n## After generating\n\nThen run the repository's own build and test commands (from its README, AGENTS.md or CI configuration) and `harness analyze --base main`, and report what changed, which generator or script made the change, and the build, test and analysis results.\n","# Code generation\n\nGenerators and codemods are deterministic: the same input gives the same output, at no token cost. Prefer them to writing repetitive code by hand.\n\n## Rules\n\n- The generation command lives in the repo: an npm script, an MSBuild target, a `scripts\u002F` file or the generator's own config file. Anyone can rerun it.\n- Never edit generated files by hand. Change the input or the generator's config and regenerate.\n- Pin the generator version in the repo's dev dependencies or tool manifest.\n- Review the generated diff like any other diff, then run the build and tests.\n\n## OpenAPI clients\n\n| Stack | Tool | Command |\n|---|---|---|\n| .NET | NSwag | `dotnet new tool-manifest` once, `dotnet tool install NSwag.ConsoleCore`, keep an `nswag.json`, then `DOTNET_CLI_TELEMETRY_OPTOUT=1 dotnet nswag run nswag.json` |\n| .NET, TS, Python | Kiota | `KIOTA_CLI_TELEMETRY_OPTOUT=1 kiota generate -l CSharp -d openapi.yaml -o src\u002FClient -n My.Client -c ApiClient` (`-l TypeScript`, `-l Python`) |\n| TS, Python | openapi-generator | `npx @openapitools\u002Fopenapi-generator-cli generate -i openapi.yaml -g typescript-fetch -o src\u002Fclient` (`-g python`); needs Java, and the first run downloads the generator jar |\n\nKiota sends usage telemetry unless `KIOTA_CLI_TELEMETRY_OPTOUT=1` is set; set it in the script, not only in your shell.\n\nWindows PowerShell has no `NAME=value command` form: write the variable first in the same command, for example `$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1'; dotnet test`.\n\n## Codemods with ast-grep\n\nast-grep matches syntax, not text, so it does not touch strings or comments that merely look like code.\n\n```\nast-grep run --lang ts --pattern 'console.log($A)' --rewrite 'logger.debug($A)'            # preview\nast-grep run --lang ts --pattern 'console.log($A)' --rewrite 'logger.debug($A)' --update-all\n```\n\nFor a change applied more than once, write a rule file and keep it in the repo (`sgconfig.yml` plus `rules\u002F`), then `ast-grep scan --update-all`. Languages include C#, TypeScript, JavaScript and Python.\n\n## Scaffolding\n\nUse the stack's own templates: `dotnet new \u003Ctemplate>` (with `DOTNET_CLI_TELEMETRY_OPTOUT=1`), `npm create \u003Ctemplate>`, or a template the repo already has. Do not invent a project layout the repo does not follow.\n\n## After generating\n\nThen run the repository's own build and test commands (from its README, AGENTS.md or CI configuration) and `harness analyze --base main`, and report what changed, which generator or script made the change, and the build, test and analysis results.\n",{"name":5,"description":7},"main","a2dc094fb6f0ff71b419eb83322592dc2205a886","tests\u002Ffixtures\u002Fgolden\u002Fpersonal\u002Fskills\u002Fcodegen","https:\u002F\u002Fgithub.com\u002Fjeancarlos\u002Fcode-jig","https:\u002F\u002Fgithub.com\u002Fjeancarlos","jeansouza.dev","2026-11-14 06:47:58",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add jeancarlos\u002Fcode-jig --skill codegen",{"tool":37,"command":38},"bunx","bunx skills add jeancarlos\u002Fcode-jig --skill codegen",{"tool":40,"command":41},"pnpm","pnpm dlx skills add jeancarlos\u002Fcode-jig --skill codegen","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjeancarlos\u002Fcode-jig\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgolden\u002Fpersonal\u002Fskills\u002Fcodegen\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},".codex-harness","OTHER","其他",6,"https:\u002F\u002Fgithub.com\u002Fjeancarlos\u002Fcode-jig\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgolden\u002Fpersonal\u002Fskills\u002Fcodegen\u002F.codex-harness",[52,59,66,73,80,87],{"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},"01M7ERQ66VWCGCJ3QC69ESMMK4","web-consensus","Use when a question has to be settled against the live web rather than from memory - researching a topic, proving or disproving a claim, checking whether something is still true, a sourced second opinion on a factual question - or when the user says \"research\", \"prove it\", \"with sources\", \"check if this is true\", \"still accurate?\".","https:\u002F\u002Fgithub.com\u002Fjeancarlos\u002Fcode-jig\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgolden\u002Fpersonal\u002Fskills\u002Fweb-consensus\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},"01M7ERQ34BFPG2AZKND979D6MM","skill-validate","Use when a SKILL.md is about to ship or was just edited, when a skill is reviewed or audited, when a skill seems ignored, skipped or misread by agents, or when the user says \"validate this skill\", \"lint the skill\", \"check my skill\", \"is this skill any good\".","https:\u002F\u002Fgithub.com\u002Fjeancarlos\u002Fcode-jig\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgolden\u002Fpersonal\u002Fskills\u002Fskill-validate\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},"01M7ERPZ4AKH7RW86WJAV07N05","regression-tests","Use when fixing a bug, changing behaviour or adding a feature in code that has tests, or when the user asks whether a change is covered by tests, wants regression tests, or wants coverage of the changed lines.","https:\u002F\u002Fgithub.com\u002Fjeancarlos\u002Fcode-jig\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgolden\u002Fpersonal\u002Fskills\u002Fregression-tests\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},"01M7ERPW6EKD7SA8CMTBFQB7D4","redacao","Use when writing, rewriting or editing a technical article or blog post in Portuguese, or when the user says \"escreve um artigo\", \"reescreve o post\", \"redação\", \"pauta\", \"revisa o texto\", \"tira a cara de IA\".","https:\u002F\u002Fgithub.com\u002Fjeancarlos\u002Fcode-jig\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgolden\u002Fpersonal\u002Fskills\u002Fredacao\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},"01M7ERPRV0XHDWATDY4M9XMF5C","improve","Use when the user asks to improve the harness, its rules, Guardian policy, skills or knowledge from experience on this machine, or says \"remember this for next time\", \"make this a rule\", \"teach the harness\".","https:\u002F\u002Fgithub.com\u002Fjeancarlos\u002Fcode-jig\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgolden\u002Fpersonal\u002Fskills\u002Fimprove\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7ERPNXES66J7MJSP8W8A61X","hld-trace","Use when the user asks whether the code follows the high-level design (HLD), which requirements have tests, which are untested, or wants tests linked to requirement or work item IDs.","https:\u002F\u002Fgithub.com\u002Fjeancarlos\u002Fcode-jig\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgolden\u002Fpersonal\u002Fskills\u002Fhld-trace\u002FSKILL.md",[],[]]