[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACQFRMW7R45YD3HRAXPGWF":3,"skill-same:01M6ACQFRMW7R45YD3HRAXPGWF":58},{"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},"01M6ACQFRMW7R45YD3HRAXPGWF","manage-templates","模板管理",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\u002Fmanage-templates\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TK1MPB82068236GSXDE","文档处理","SCENARIO","使用场景",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQ6TPH3VQWKQZXV7EPF8VZ","办公行政人员","PROFESSION","适用职业",[30],"manage templates","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: manage-templates\ndescription: Define and maintain OFBiz Freemarker (FTL) templates for UI widgets.\n---\n\n# Skill: manage-templates\n## Goal\nDefine and maintain complex OFBiz Freemarker (FTL) templates, ensuring correct use of OFBiz directives and context variables.\n\n## Triggers\n**ALWAYS** read this skill when:\n- Creating or modifying `.ftl` files in `template\u002F` directories.\n- Using `\u003Cplatform-specific>\u003Chtml>\u003Chtml-template ...>` in screens.\n- Implementing email templates or custom PDF layouts using FTL.\n\n## Use when\n- Creating dynamic HTML components that require logic beyond XML widgets.\n- Building custom dashboards or specialized storefront pages.\n- Developing macro libraries for reusable UI elements.\n\n## Procedure\n1. **Variable Setup & Safety**:\n    - Use `\u003C#assign variable = contextVar! \u002F>` to safely assign context variables with default values.\n    - **Null Safety**: ALWAYS use the `!` operator (e.g., `user.name!`) to prevent template crashes if a variable is missing.\n2. **OFBiz Directives (Critical)**:\n    - **Links**: Use `\u003C@ofbizUrl>requestName\u003C\u002F@ofbizUrl>` for internal links.\n    - **Content**: Use `\u003C@ofbizContentUrl>\u002Fimages\u002Flogo.png\u003C\u002F@ofbizContentUrl>`.\n    - **Currency**: Use `\u003C@ofbizCurrency amount=price isoCode=currency \u002F>`.\n    - **Labels**: Use `${uiLabelMap.LabelKey}` for internationalization.\n3. **Control Flow**:\n    - **Lists**: Use `\u003C#list listVar as item> ... \u003C#else> ... \u003C\u002F#list>` for iterations.\n    - **Conditionals**: Use `\u003C#if condition> ... \u003C#elseif ...> ... \u003C#else> ... \u003C\u002F#if>`.\n4. **Context & Data Access**:\n    - Access `parameters.xyz` for request parameters.\n    - Access `requestAttributes.xyz` or `sessionAttributes.xyz` for backend data.\n    - **In-template Data Fetching**: Use `EntityQuery` or `dispatcher` for lightweight lookups (e.g., `${Static[\"org.ofbiz.entity.util.EntityQuery\"].use(delegator).from(\"Product\").where(\"productId\", pid).cache(true).queryOne().productName!}` or `${dispatcher.runSync(\"serviceName\", {\"param\": value}).resultAttr!}`).\n    - Use `Static[\"class.path\"].method()` for Java utility calls (use sparingly).\n5. **HTML5 Semantic Structure**:\n    - **Mandatory**: Use semantic tags (`\u003Cheader>`, `\u003Cmain>`, `\u003Csection>`, `\u003Carticle>`, `\u003Cfooter>`) instead of generic `\u003Cdiv>` wrappers.\n    - **Accessibility**: Use `aria-*` attributes and proper label associations.\n6. **Encoding & Security**:\n    - Use `?html` or `?js_string` when outputting variables to prevent XSS.\n\n## Guardrails\n- **Logic Placement**: Keep complex business logic in Groovy\u002FJava; FTL should primarly focus on presentation logic and secondary data lookups.\n- **Paths**: Reference templates using `component:\u002F\u002F` in screen XML.\n- **Macros**: Define reusable UI blocks as `\u003C#macro name param> ... \u003C\u002F#macro>` to avoid duplication.\n\n## Examples\n**Example: Premium Semantic Dashboard Widget**\n```ftl\n\u003C#-- Initialize data and perform lightweight lookup if needed -->\n\u003C#assign productList = productList! \u002F>\n\n\u003Csection class=\"card\" aria-labelledby=\"widget-title\">\n  \u003Cheader>\n    \u003Ch2 id=\"widget-title\">${uiLabelMap.ProductFeaturedProducts}\u003C\u002Fh2>\n  \u003C\u002Fheader>\n  \n  \u003Carticle class=\"content\">\n    \u003C#if productList?has_content>\n      \u003Cul class=\"product-list\" role=\"list\">\n        \u003C#list productList as product>\n          \u003C#-- Data fetching lookup for category name -->\n          \u003C#assign category = Static[\"org.ofbiz.entity.util.EntityQuery\"].use(delegator).from(\"ProductCategory\").where(\"productCategoryId\", product.primaryProductCategoryId!).cache(true).queryOne()! \u002F>\n          \u003C#assign price = productPriceMap[product.productId]! \u002F>\n          \n          \u003Cli class=\"product-item\">\n            \u003Ch3>${product.productName!product.productId}\u003C\u002Fh3>\n            \u003C#if category?has_content>\n              \u003Cp class=\"category-tag\">\u003Csmall>${category.categoryName!category.description!}\u003C\u002Fsmall>\u003C\u002Fp>\n            \u003C\u002F#if>\n            \u003Cdiv class=\"price-container\">\n              \u003C#if price?has_content>\n                \u003C@ofbizCurrency amount=price.price isoCode=price.currencyUsed \u002F>\n              \u003C#else>\n                \u003Cspan class=\"no-price\">${uiLabelMap.ProductNoPriceAvailable}\u003C\u002Fspan>\n              \u003C\u002F#if>\n            \u003C\u002Fdiv>\n            \u003Cfooter>\n              \u003Ca href=\"\u003C@ofbizUrl>product?product_id=${product.productId}\u003C\u002F@ofbizUrl>\" class=\"btn btn-primary\">\n                ${uiLabelMap.CommonViewDetails}\n              \u003C\u002Fa>\n            \u003C\u002Ffooter>\n          \u003C\u002Fli>\n        \u003C\u002F#list>\n      \u003C\u002Ful>\n    \u003C#else>\n      \u003Cp class=\"empty-state\">${uiLabelMap.ProductNoProductsFound}\u003C\u002Fp>\n    \u003C\u002F#if>\n  \u003C\u002Farticle>\n\u003C\u002Fsection>\n```\n",{},"trunk","6c6c27710443de03e9247605d33a2e2f5bc3d1e2","ai-agent-skills\u002Fmanage-templates",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 manage-templates",{"tool":50,"command":51},"bunx","bunx skills add apache\u002Fofbiz-plugins --skill manage-templates",{"tool":53,"command":54},"pnpm","pnpm dlx skills add apache\u002Fofbiz-plugins --skill manage-templates","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-templates\u002FSKILL.md",true,[],[59,73,85,99,113,127],{"skillNo":60,"name":61,"nameZh":62,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":63,"categories":64,"keywords":71,"publishedAt":31},"01M6ACQSN90YKJZ92MQ52D9R8H","prepush-readiness","推送前就绪检查","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fprepush-readiness\u002FSKILL.md",[65,68],{"categoryNo":66,"categoryName":67,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":69,"categoryName":70,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理",[72],"prepush readiness",{"skillNo":74,"name":75,"nameZh":76,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":77,"categories":78,"keywords":83,"publishedAt":31},"01M6ACQPR1WRA751V4DXVC3AHF","manage-webapps","Web 应用管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-webapps\u002FSKILL.md",[79,80],{"categoryNo":66,"categoryName":67,"taxonomyType":27,"taxonomyTypeDesc":28},{"categoryNo":81,"categoryName":82,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BWKS60NTYJHFE9FQSXGDKS","低代码应用开发",[84],"manage webapps",{"skillNo":86,"name":87,"nameZh":88,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":89,"categories":90,"keywords":97,"publishedAt":31},"01M6ACQMCX8Z7NY2CE08NCV6ND","manage-themes","主题管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-themes\u002FSKILL.md",[91,94],{"categoryNo":92,"categoryName":93,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQ6TQMKHSMFVQHR2KYAEVN","界面设计师",{"categoryNo":95,"categoryName":96,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[98],"manage themes",{"skillNo":100,"name":101,"nameZh":102,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":103,"categories":104,"keywords":111,"publishedAt":31},"01M6ACQHYN20AFWF6TKK4RGQ8A","manage-tests","测试管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-tests\u002FSKILL.md",[105,108],{"categoryNo":106,"categoryName":107,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":109,"categoryName":110,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[112],"manage tests",{"skillNo":114,"name":115,"nameZh":116,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":117,"categories":118,"keywords":125,"publishedAt":31},"01M6ACQCSSDZQMD8VX2K3WRR93","manage-strategies","策略管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-strategies\u002FSKILL.md",[119,122],{"categoryNo":120,"categoryName":121,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BTXF8K9DFQC4T4TXVH0NMZ","策略与托管设置管理",{"categoryNo":123,"categoryName":124,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8C6RQ852C9AEJFCBGG1YA7S","IT 管理员",[126],"manage strategies",{"skillNo":128,"name":129,"nameZh":130,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":131,"categories":132,"keywords":137,"publishedAt":31},"01M6ACQA1CZ2QW6GAM6HPFR21V","manage-services","服务管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-services\u002FSKILL.md",[133,134],{"categoryNo":66,"categoryName":67,"taxonomyType":27,"taxonomyTypeDesc":28},{"categoryNo":135,"categoryName":136,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8C36CP2J9CRK1B6PYRXVHPN","应用配置管理",[138],"manage services"]