[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6997NVG50EQYBPF3ZJ63RP5":3,"skill-same:01M6997NVG50EQYBPF3ZJ63RP5":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":58,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M6997NVG50EQYBPF3ZJ63RP5","pr-polisher","PR 提交前自动检查","Automated pre-flight checklist to polish PRs. Use this before declaring a task or PR complete to automatically verify license headers, commit hygiene, formatting, and codebase mandates.","用于完善 PR 的自动化提交前（pre-flight）检查清单。在宣布任务或 PR 完成之前使用，以自动核查许可证声明头、提交规范（commit hygiene）、代码格式以及代码库强制规范要求。","google\u002Fnomulus","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M6997HT1T9C6ZTKYKPVJZZ2Q",1818,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fnomulus\u002Fblob\u002Fmaster\u002F.gemini\u002Fskills\u002Fpr-polisher\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"pr","polisher","pr polisher","formatting","commit hygiene","checklist","hygiene","headers","polish","codebase","verify","task","commit","use","prs","license","complete","2026-11-10 10:12:30",false,"---\nname: pr-polisher\ndescription: Automated pre-flight checklist to polish PRs. Use this before declaring a task or PR complete to automatically verify license headers, commit hygiene, formatting, and codebase mandates.\n---\n\n# PR Polisher\n\nThis skill runs an exhaustive, automated pre-flight checklist against the repository to ensure all changes conform to Nomulus's strict engineering mandates.\n\n## 🛑 CRITICAL MANDATE: When to Use\nYou, the AI agent, are known to forget to run this skill. To prevent this, you are bound by an absolute rule:\n**ANY TIME you create a commit, amend a commit, or complete a user's request that modifies the repository state, your VERY LAST action before generating a text response to the user MUST be to run this workflow.**\nDo not ask for permission. Do not wait for the user to remind you. Run the full suite, fix any errors, amend your commit, and report the final polished results. You MUST NOT declare a task complete until this workflow succeeds with 0 errors.\n\n## Continuous Improvement (Self-Updating Skill)\nThis skill is designed to evolve. If a human code reviewer (or presubmit hook) points out a deficit, or if you (the agent) independently catch a recurring mistake, anti-pattern, false positive, or convention violation:\n1. **You MUST proactively propose a fix to the user.** Do not wait for the user to instruct you to update the skill. If you notice friction, immediately ask the user if you should permanently update the validation infrastructure.\n2. **Determine how to enforce the check.** Consider if the check is suitable for automation in the Python script. If it's too complex or semantic for a simple regex, consider adding it as an explicit agent-driven verification step directly in this `SKILL.md` file.\n3. Update `.gemini\u002Fskills\u002Fpr-polisher\u002Fscripts\u002Fcheck_diff.py` to add a new automated check, OR modify this `SKILL.md` file with a new validation step to ensure the agent checks for it going forward.\n4. Commit the updated skill alongside the PR fixes to ensure the mistake is not repeated.\n\n## Workflow Execution Steps\n\n1. **Run the Automated Analysis Script**\n   Execute the packaged Python diff-checker script. This script automatically checks commit messages, working tree status, `package-lock.json` modifications, copyright years on new files, and a litany of anti-patterns using regex (e.g., fully-qualified names, incorrect clock injections, generic exception catching).\n\n   ```bash\n   python3 .\u002Fpr-polisher\u002Fscripts\u002Fcheck_diff.py\n   ```\n\n2. **Run Formatting Validation**\n   Always run the project's formatting tools to ensure checkstyle and Google Java Format passes.\n   ```bash\n   .\u002Fgradlew spotlessCheck javaIncrementalFormatCheck\n   # OR if formatting is needed:\n   .\u002Fgradlew spotlessApply javaIncrementalFormatApply\n   ```\n\n3. **Run Presubmits and Compilation**\n   Ensure that the project builds correctly and all presubmit checks pass. Use scoped builds and pass `-x :console-webapp:buildConsoleWebapp` when only modifying backend Java code to save time, avoid modifying `console-webapp\u002Fpackage-lock.json`, and prevent Angular CLI Node.js version mismatch failures.\n   ```bash\n   # Run presubmits\n   .\u002Fgradlew runPresubmits\n\n   # Verify compilation (use a scoped build if you only modified one module, e.g., :core)\n   .\u002Fgradlew :core:build -x test -x :console-webapp:buildConsoleWebapp\n   # Run standard test suite if modifying core\n   .\u002Fgradlew :core:standardTest -x :console-webapp:buildConsoleWebapp\n   ```\n\n4. **Verify PR Scope and Extraneous Files (Line-by-Line Inspection)**\n   You must carefully review the entirety of your changes (`git diff HEAD^` or `git diff --cached`). Examine every single file and line changed to explicitly verify that the change *belongs* in this PR. You MUST look for and revert:\n   * **Irrelevant changes:** Formatting or refactoring in files unrelated to the PR's core purpose.\n   * **Accidental files:** Test output files, temp scripts, plan files (e.g., `codebase_review_plan.md`), scratchpads, or anything else generated during your workflow that shouldn't be committed.\n   * **Unintended side effects:** Changes to configuration files like `package-lock.json` unless explicitly required.\n\n5. **Verify Test Coverage Additions (Line-by-Line Inspection)**\n   While looking at all the diffs, thoroughly check every single line to determine if any test changes or additions are necessary. If you have modified existing logic, added new branches, added a null check, or added new public methods, you MUST manually verify that the corresponding `Test.java` file covers these changes. If the test file or specific test cases do not exist, you must create them. A code review is not thorough if it only checks for compilation.\n\n6. **Verify Commit Description Accuracy**\n   Re-read your commit message (`git log -1 --pretty=format:%B`). Compare it directly against the actual diff (`git diff HEAD^`) to verify that it completely and accurately describes ONLY the changes present in the commit.\n   * If the scope of the PR changed during prompting, you MUST update the commit message to reflect the final state of the code.\n   * Ensure that the primary purpose of the PR is mentioned first, and that no irrelevant or outdated changes from previous attempts are listed.\n\n7. **Address Errors, Amend, and Re-Run (Iterative Checking)**\n   If any script throws an error, if scope was reduced, if the commit message was inaccurate, or if formatting changes were applied, you must stage those fixes and amend your commit:\n   ```bash\n   git add -u\n   git commit --amend # Or git commit --amend --no-edit if only files changed\n   ```\n   **CRITICAL:** You must loop back to Step 1 and run `python3 .\u002Fpr-polisher\u002Fscripts\u002Fcheck_diff.py` again. Continue this loop of checking and amending until the script definitively returns `0 ERRORS`, the build\u002Fpresubmits pass, and the working directory is perfectly clean. Do not assume your fixes worked without re-running the check.","# PR Polisher\n\nThis skill runs an exhaustive, automated pre-flight checklist against the repository to ensure all changes conform to Nomulus's strict engineering mandates.\n\n## 🛑 CRITICAL MANDATE: When to Use\nYou, the AI agent, are known to forget to run this skill. To prevent this, you are bound by an absolute rule:\n**ANY TIME you create a commit, amend a commit, or complete a user's request that modifies the repository state, your VERY LAST action before generating a text response to the user MUST be to run this workflow.**\nDo not ask for permission. Do not wait for the user to remind you. Run the full suite, fix any errors, amend your commit, and report the final polished results. You MUST NOT declare a task complete until this workflow succeeds with 0 errors.\n\n## Continuous Improvement (Self-Updating Skill)\nThis skill is designed to evolve. If a human code reviewer (or presubmit hook) points out a deficit, or if you (the agent) independently catch a recurring mistake, anti-pattern, false positive, or convention violation:\n1. **You MUST proactively propose a fix to the user.** Do not wait for the user to instruct you to update the skill. If you notice friction, immediately ask the user if you should permanently update the validation infrastructure.\n2. **Determine how to enforce the check.** Consider if the check is suitable for automation in the Python script. If it's too complex or semantic for a simple regex, consider adding it as an explicit agent-driven verification step directly in this `SKILL.md` file.\n3. Update `.gemini\u002Fskills\u002Fpr-polisher\u002Fscripts\u002Fcheck_diff.py` to add a new automated check, OR modify this `SKILL.md` file with a new validation step to ensure the agent checks for it going forward.\n4. Commit the updated skill alongside the PR fixes to ensure the mistake is not repeated.\n\n## Workflow Execution Steps\n\n1. **Run the Automated Analysis Script**\n   Execute the packaged Python diff-checker script. This script automatically checks commit messages, working tree status, `package-lock.json` modifications, copyright years on new files, and a litany of anti-patterns using regex (e.g., fully-qualified names, incorrect clock injections, generic exception catching).\n\n   ```bash\n   python3 .\u002Fpr-polisher\u002Fscripts\u002Fcheck_diff.py\n   ```\n\n2. **Run Formatting Validation**\n   Always run the project's formatting tools to ensure checkstyle and Google Java Format passes.\n   ```bash\n   .\u002Fgradlew spotlessCheck javaIncrementalFormatCheck\n   # OR if formatting is needed:\n   .\u002Fgradlew spotlessApply javaIncrementalFormatApply\n   ```\n\n3. **Run Presubmits and Compilation**\n   Ensure that the project builds correctly and all presubmit checks pass. Use scoped builds and pass `-x :console-webapp:buildConsoleWebapp` when only modifying backend Java code to save time, avoid modifying `console-webapp\u002Fpackage-lock.json`, and prevent Angular CLI Node.js version mismatch failures.\n   ```bash\n   # Run presubmits\n   .\u002Fgradlew runPresubmits\n\n   # Verify compilation (use a scoped build if you only modified one module, e.g., :core)\n   .\u002Fgradlew :core:build -x test -x :console-webapp:buildConsoleWebapp\n   # Run standard test suite if modifying core\n   .\u002Fgradlew :core:standardTest -x :console-webapp:buildConsoleWebapp\n   ```\n\n4. **Verify PR Scope and Extraneous Files (Line-by-Line Inspection)**\n   You must carefully review the entirety of your changes (`git diff HEAD^` or `git diff --cached`). Examine every single file and line changed to explicitly verify that the change *belongs* in this PR. You MUST look for and revert:\n   * **Irrelevant changes:** Formatting or refactoring in files unrelated to the PR's core purpose.\n   * **Accidental files:** Test output files, temp scripts, plan files (e.g., `codebase_review_plan.md`), scratchpads, or anything else generated during your workflow that shouldn't be committed.\n   * **Unintended side effects:** Changes to configuration files like `package-lock.json` unless explicitly required.\n\n5. **Verify Test Coverage Additions (Line-by-Line Inspection)**\n   While looking at all the diffs, thoroughly check every single line to determine if any test changes or additions are necessary. If you have modified existing logic, added new branches, added a null check, or added new public methods, you MUST manually verify that the corresponding `Test.java` file covers these changes. If the test file or specific test cases do not exist, you must create them. A code review is not thorough if it only checks for compilation.\n\n6. **Verify Commit Description Accuracy**\n   Re-read your commit message (`git log -1 --pretty=format:%B`). Compare it directly against the actual diff (`git diff HEAD^`) to verify that it completely and accurately describes ONLY the changes present in the commit.\n   * If the scope of the PR changed during prompting, you MUST update the commit message to reflect the final state of the code.\n   * Ensure that the primary purpose of the PR is mentioned first, and that no irrelevant or outdated changes from previous attempts are listed.\n\n7. **Address Errors, Amend, and Re-Run (Iterative Checking)**\n   If any script throws an error, if scope was reduced, if the commit message was inaccurate, or if formatting changes were applied, you must stage those fixes and amend your commit:\n   ```bash\n   git add -u\n   git commit --amend # Or git commit --amend --no-edit if only files changed\n   ```\n   **CRITICAL:** You must loop back to Step 1 and run `python3 .\u002Fpr-polisher\u002Fscripts\u002Fcheck_diff.py` again. Continue this loop of checking and amending until the script definitively returns `0 ERRORS`, the build\u002Fpresubmits pass, and the working directory is perfectly clean. Do not assume your fixes worked without re-running the check.",{"name":5,"description":7},"master","337cd7b015373f135ed7ec673a241026f6988af7",".gemini\u002Fskills\u002Fpr-polisher",306,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fnomulus","https:\u002F\u002Fregistry.google","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-14 23:13:18",{"source":9,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add google\u002Fnomulus --skill pr-polisher",{"tool":69,"command":70},"bunx","bunx skills add google\u002Fnomulus --skill pr-polisher",{"tool":72,"command":73},"pnpm","pnpm dlx skills add google\u002Fnomulus --skill pr-polisher","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fnomulus\u002Fblob\u002Fmaster\u002F.gemini\u002Fskills\u002Fpr-polisher\u002FSKILL.md",true,[77],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Fcheck_diff.py","SCRIPT","脚本",16180,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fnomulus\u002Fblob\u002Fmaster\u002F.gemini\u002Fskills\u002Fpr-polisher\u002Fscripts\u002Fcheck_diff.py",[84],{"skillNo":85,"name":86,"nameZh":87,"description":88,"descriptionZh":89,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":90,"categories":91,"keywords":96,"publishedAt":48},"01M6997MBRKDMHWVCNS4MKRYR5","java-ast-refactoring","Java 代码 AST 重构","AST-aware Java refactoring using OpenRewrite. Use when asked to structurally refactor Java code, change class names, change method signatures\u002Foverloads, replace builder patterns, modify annotations, or perform cross-file structural replacements. Note: Renaming fields or local variables\u002Fparameters is not supported natively via simple YAML recipes in the standard openrewrite modules.","使用 OpenRewrite 进行 AST（抽象语法树）感知的 Java 重构。当需要对 Java 代码进行结构性重构、更改类名、更改方法签名\u002F重载、替换构建器模式、修改注解，或执行跨文件结构替换时使用。注意：在标准 OpenRewrite 模块中，通过简单的 YAML 配方（recipe）原生不支持重命名字段或局部变量\u002F参数。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fnomulus\u002Fblob\u002Fmaster\u002F.gemini\u002Fskills\u002Fjava-ast-refactoring\u002FSKILL.md",[92,93],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":94,"categoryName":95,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BT7QVANT4709358VEJK53E","代码实现",[97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,44,112,113,114,115],"java","refactoring","ast","java ast refactoring","builder","replace","when","standard","Variables","via","structural","local","signatures","simple","modules","yaml","file","code","change"]