[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACQSN90YKJZ92MQ52D9R8H":3,"skill-same:01M6ACQSN90YKJZ92MQ52D9R8H":64},{"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":7,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":33,"frontMatter":34,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":40,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":7,"updatedAt":43,"install":44,"resources":57},"01M6ACQSN90YKJZ92MQ52D9R8H","prepush-readiness","推送前就绪检查",null,"","apache\u002Fofbiz-plugins","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACMJJ1Q4WYATY4GXZ2FAVD",178,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fprepush-readiness\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[30],"prepush readiness","2026-11-10 10:12:30",false,"\u003C!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\nhttp:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n---\nname: prepush-readiness\ndescription: Write OFBiz changes so they pass the pre-push hook (Checkstyle for Java, CodeNarc for Groovy) and are in committable shape — clean compilation, valid XML\u002Fwidgets, and focused tests — before you push.\n---\n\n# Skill: prepush-readiness\n\n## Goal\n\nPrevent the \"functional code first, hook fixes later\" loop. Code should be\nwritten in the shape this repository's pre-push hook (Checkstyle, CodeNarc),\nGroovy\u002FJava compilation, XML parsers, and focused tests will accept — checked\nearly, not discovered at push time.\n\n**There is no pre-commit hook in this repo.** The `com.github.jakemarsden.git-hooks`\nGradle plugin wires a single **pre-push** hook (`build.gradle`) that runs\n`checkstyleMain checkstyleTest codenarcMain codenarcTest`. Compilation, XML\nvalidity, and tests are not hook-enforced at all — they're this skill's own\nrecommended quality bar, worth checking before you commit even though nothing\nstops you from committing broken code locally.\n\n## Triggers\n\n**ALWAYS** read this skill when:\n- Writing or modifying code that may be committed or pushed.\n- Editing Groovy, Java, XML, FreeMarker, properties, data, tests, or Gradle files.\n- Preparing a commit, preparing to push, or responding to a pre-push hook failure.\n- Adding logic that affects service contracts, entity models, widgets, events,\n  data loading, or tests.\n\n## The Pre-Push Gate\n\nThe hook runs exactly two Gradle checks, both zero-tolerance:\n\n| Check | Language | Config | Command |\n| :--- | :--- | :--- | :--- |\n| Checkstyle | Java | `config\u002Fcheckstyle\u002Fcheckstyle.xml` (`maxErrors = 0`) | `.\u002Fgradlew checkstyleMain checkstyleTest` |\n| CodeNarc | Groovy | `config\u002Fcodenarc\u002Fcodenarc.groovy` (`maxPriority1\u002F2\u002F3Violations = 0`) | `.\u002Fgradlew codenarcMain codenarcTest` |\n\nMirror the hook exactly before pushing:\n\n```bash\n.\u002Fgradlew checkstyleMain checkstyleTest codenarcMain codenarcTest\n```\n\nThis is the only command that reproduces what will actually block the push —\nrunning a broader `check`\u002F`build` task also compiles and tests, which is\nuseful, but don't mistake that for the hook itself.\n\nIf working in a linked `git worktree`, the hook still fires there (the plugin\nresolves the real `.git` common dir so this works even though `.git` is a\ngitlink file in a worktree) — see `manage-contribution-workflow` for the\nother worktree setup steps.\n\n## Core Workflow\n\n1. **Load the domain skill first**\n   - Start with `coding-standards`.\n   - Load the relevant OFBiz skill for the touched area, such as\n     `manage-groovy`, `manage-services`, `manage-entities`, `manage-forms`,\n     `manage-controller`, `manage-java`, or `manage-tests`.\n\n2. **Design for hook compatibility before editing**\n   - Identify likely checks for the touched files: Checkstyle for Java,\n     CodeNarc for Groovy, compilation for both, XML parsing\u002Fschema\n     expectations for OFBiz XML, and focused tests for behavior.\n   - Prefer existing local patterns in nearby files over introducing a new style.\n   - Keep the diff narrow so validation failures are easy to isolate.\n\n3. **Run focused validation before finishing**\n   - Prefer the narrowest command that exercises the changed area.\n   - When preparing to push, run the exact hook command above first — don't\n     rely on IDE linting or memory of the rules.\n   - If validation is too expensive or blocked, explain exactly what was not run\n     and why.\n\n4. **Capture reusable failures**\n   - When the hook or build fails for a pattern likely to recur, update this\n     skill with the bad pattern and preferred replacement.\n\n## Groovy Readiness\n\n- Keep Groovy service files method-based. Do not put service business logic at\n  top level.\n- Remove unused imports, variables, parameters, and dead assignments before\n  finishing.\n- Avoid `println`, `System.out`, ad hoc debug output, and temporary logging.\n- Use injected OFBiz logging helpers or established local logging patterns.\n- Check service results with `ServiceUtil.isError(...)` or the existing local\n  equivalent before using output values.\n- Use strict null checks for numeric values and valid empty collections. Do not\n  rely on Groovy truth where `0`, `0.0`, `\"\"`, or `[]` are valid inputs.\n- Avoid clever dynamic metaprogramming, broad `def` usage in complex logic, and\n  ambiguous closures when explicit types make CodeNarc\u002Fcompilation safer.\n- Keep imports explicit and sorted consistently with nearby files.\n- Do not mutate data in screen data-preparation scripts; use services\u002Fevents for\n  writes.\n\n## Java Readiness\n\n- Remove unused imports, unused locals, and dead code before validation.\n- Use OFBiz utilities such as `UtilValidate`, `UtilMisc`, `EntityQuery`, and\n  `ServiceUtil` where the surrounding code expects them.\n- Keep public methods documented when they introduce reusable behavior or\n  non-obvious logic.\n- Preserve existing exception handling and logging style.\n- Avoid broad catch blocks unless the local pattern requires wrapping and\n  returning a service error.\n\n## XML, Widget, And Data Readiness\n\n- Preserve indentation and attribute ordering conventions used in nearby OFBiz\n  XML files.\n- Ensure service definitions have accurate required\u002Foptional attributes and a\n  meaningful `\u003Cdescription>`.\n- Keep entity, relation, view-entity, and field names consistent with OFBiz\n  naming conventions.\n- Replace user-facing hardcoded text with labels when the UI displays it.\n- Avoid invalid widget nesting, missing view-map\u002Frequest-map targets, and\n  references to labels, services, screens, or forms that do not exist.\n- For seed\u002Fdemo\u002Fsecurity data, ensure primary keys and foreign references match\n  existing model definitions.\n\n## Test And Command Selection\n\nChoose the smallest useful validation set:\n\n- Groovy logic: run the relevant Groovy compile\u002FCodeNarc\u002Fcheck task if available,\n  plus focused service or component tests.\n- Java logic: run focused compile\u002Ftest tasks for the component or module.\n- XML models\u002Fwidgets\u002Fservices: run the parser, component load, focused test, or\n  existing Gradle task that validates the touched area.\n- Behavior changes: add or update focused tests when the risk is more than\n  mechanical.\n- Push preparation: run `.\u002Fgradlew checkstyleMain checkstyleTest codenarcMain\n  codenarcTest` — the exact pre-push hook command — before pushing.\n\n## Common Failure Patterns To Avoid\n\n- Code works at runtime but fails CodeNarc because of unused imports, unused\n  variables, duplicate literals, over-complex methods, or debug output.\n- Groovy compiles locally in isolation but fails OFBiz execution because service\n  logic is top-level instead of inside the invoked method.\n- A service returns a plain map or raw error string instead of the repository's\n  expected success\u002Ferror helper pattern.\n- A child service result is used without checking for errors first.\n- UI XML references a service, screen, form, menu, or label key that was renamed\n  or never added.\n- Entity data files introduce records that do not match primary keys, required\n  fields, or foreign key expectations.\n- Code relies on Groovy truth and mishandles valid zero or empty values.\n\n## Final Checklist\n\nBefore handing back a code change:\n\n- Relevant skills were read.\n- Changed files follow nearby OFBiz style.\n- Temporary debug code is gone.\n- Imports, locals, and labels are clean.\n- Focused validation was run, or any skipped validation is clearly reported.\n- Any new recurring hook failure pattern is added back to this skill.\n\n## See Also\n- `coding-standards` — the broader style and OFBiz-idiom rules this skill's checks partially enforce.\n- `manage-contribution-workflow` — worktree setup (including why the pre-push hook still works there), testing against real data, and PR conventions.\n",{},"trunk","6c6c27710443de03e9247605d33a2e2f5bc3d1e2","ai-agent-skills\u002Fprepush-readiness",222,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins","https:\u002F\u002Fofbiz.apache.org\u002F","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-12 22:04:06",{"source":9,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add apache\u002Fofbiz-plugins --skill prepush-readiness",{"tool":50,"command":51},"bunx","bunx skills add apache\u002Fofbiz-plugins --skill prepush-readiness",{"tool":53,"command":54},"pnpm","pnpm dlx skills add apache\u002Fofbiz-plugins --skill prepush-readiness","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fprepush-readiness\u002FSKILL.md",true,[58],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"README.md","REFERENCE","参考文档",2185,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Fcodex\u002FREADME.md",[65,77,91,105,119,133],{"skillNo":66,"name":67,"nameZh":68,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":69,"categories":70,"keywords":75,"publishedAt":31},"01M6ACQPR1WRA751V4DXVC3AHF","manage-webapps","Web 应用管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-webapps\u002FSKILL.md",[71,72],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":73,"categoryName":74,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BWKS60NTYJHFE9FQSXGDKS","低代码应用开发",[76],"manage webapps",{"skillNo":78,"name":79,"nameZh":80,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":81,"categories":82,"keywords":89,"publishedAt":31},"01M6ACQMCX8Z7NY2CE08NCV6ND","manage-themes","主题管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-themes\u002FSKILL.md",[83,86],{"categoryNo":84,"categoryName":85,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQMKHSMFVQHR2KYAEVN","界面设计师",{"categoryNo":87,"categoryName":88,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[90],"manage themes",{"skillNo":92,"name":93,"nameZh":94,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":95,"categories":96,"keywords":103,"publishedAt":31},"01M6ACQHYN20AFWF6TKK4RGQ8A","manage-tests","测试管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-tests\u002FSKILL.md",[97,100],{"categoryNo":98,"categoryName":99,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":101,"categoryName":102,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[104],"manage tests",{"skillNo":106,"name":107,"nameZh":108,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":109,"categories":110,"keywords":117,"publishedAt":31},"01M6ACQFRMW7R45YD3HRAXPGWF","manage-templates","模板管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-templates\u002FSKILL.md",[111,114],{"categoryNo":112,"categoryName":113,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQ6TK1MPB82068236GSXDE","文档处理",{"categoryNo":115,"categoryName":116,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TPH3VQWKQZXV7EPF8VZ","办公行政人员",[118],"manage templates",{"skillNo":120,"name":121,"nameZh":122,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":123,"categories":124,"keywords":131,"publishedAt":31},"01M6ACQCSSDZQMD8VX2K3WRR93","manage-strategies","策略管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-strategies\u002FSKILL.md",[125,128],{"categoryNo":126,"categoryName":127,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BTXF8K9DFQC4T4TXVH0NMZ","策略与托管设置管理",{"categoryNo":129,"categoryName":130,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8C6RQ852C9AEJFCBGG1YA7S","IT 管理员",[132],"manage strategies",{"skillNo":134,"name":135,"nameZh":136,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":137,"categories":138,"keywords":143,"publishedAt":31},"01M6ACQA1CZ2QW6GAM6HPFR21V","manage-services","服务管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-services\u002FSKILL.md",[139,140],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":141,"categoryName":142,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8C36CP2J9CRK1B6PYRXVHPN","应用配置管理",[144],"manage services"]