[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C2DBEGR1M4TRWA367P7HN6":3,"skill-same:01M6C2DBEGR1M4TRWA367P7HN6":53},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":28,"frontMatter":29,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M6C2DBEGR1M4TRWA367P7HN6","backend-schema",null,"davidleonmayor\u002Fproyecto-grado-unimayor","davidleonmayor","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142275316?v=4","01M6C2D07NAZV2VQE96MD4HWYW","David León","01M6C2D0BN278C193FYXQB3TME",3,"MIT","https:\u002F\u002Fgithub.com\u002Fdavidleonmayor\u002Fproyecto-grado-unimayor\u002Fblob\u002Fmain\u002Fskills\u002Fbackend-schema\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[23,24,25],"backend","schema","backend schema","2026-11-10 10:12:30",false,"# Backend Schema (Express Validator)\n\n## Overview\nThis skill defines the convention for validating incoming HTTP request data using `express-validator`'s `Schema` objects.\n\n## Trigger\nWhen creating or updating validation schemas for backend API routes.\n\n## Do's\n- **Validate Data Strictly**: Ensure all incoming data is strictly validated before reaching the controller. Check for data types (`isString`, `isNumeric`), formats (`isEmail`, `isUUID`, `isDate`), and lengths (`isLength`). Do not let invalid data pass to the controller.\n- **Validate Authorization Header**: If the route requires authentication, ALWAYS include the `authorization` header validation in the schema using regex `\u002F^Bearer\\s[\\w-]+\\.[\\w-]+\\.[\\w-]+$\u002F`.\n- **Use `Schema` Object**: Always import `type { Schema } from \"express-validator\"` and define schemas as plain objects.\n- **Export Indiviual Schemas**: Export a separate constant for each endpoint (e.g., `RegisterSchema`, `LoginSchema`).\n- **Specify Location (`in`)**: Always define exactly where the field is expected using the `in` property (e.g., `in: [\"body\"]`, `in: [\"params\"]`, `in: [\"query\"]`, `in: [\"headers\"]`).\n- **Explicit Error Messages**: Provide a specific `errorMessage` for every validation rule.\n- **Sanitize Data**: Use built-in sanitizers like `trim: true`, `toLowerCase: true`, or `normalizeEmail: true` on relevant string inputs.\n- **Custom Validators**: Use `custom: { options: (value, { req }) => ... }` for interdependent fields (like matching passwords).\n- **Format Consistency**: Group validations logically: `in`, `exists`, `isString` \u002F `isNumeric`, `isLength`, `matches`, followed by sanitizers.\n\n## Don'ts\n- **Don't use array-based chain validation**: Avoid `body('field').isString()`. Stick exclusively to the Schema object approach.\n- **Don't omit the `in` property**: Omitting it forces express-validator to check all locations (body, query, params, headers), which is a security\u002Fperformance risk.\n- **Don't place schemas in routers or controllers**: Keep them isolated in a `*.schema.ts` file next to their respective feature.\n\n## Example Structure\n```typescript\nimport type { Schema } from \"express-validator\";\n\nexport const ExampleSchema: Schema = {\n  field: {\n    in: [\"body\"],\n    exists: { errorMessage: \"Field is required\" },\n    isString: { errorMessage: \"Field must be a string\" },\n    isLength: {\n      options: { min: 1, max: 50 },\n      errorMessage: \"Field must be between 1 and 50 characters\",\n    },\n    trim: true,\n  }\n};\n```\n",{},"main","3d76dc018cdded158c4f49df5edb56829229d265","skills\u002Fbackend-schema",0,"https:\u002F\u002Fgithub.com\u002Fdavidleonmayor\u002Fproyecto-grado-unimayor","https:\u002F\u002Fproyecto-grado-unimayor-8rtknmpjt-davidleonmayors-projects.vercel.app\u002Fadmin","https:\u002F\u002Fgithub.com\u002Fdavidleonmayor","Full-stack developer focused on microservices backend","2026-11-11 00:05:51",{"source":7,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add davidleonmayor\u002Fproyecto-grado-unimayor --skill backend-schema",{"tool":45,"command":46},"bunx","bunx skills add davidleonmayor\u002Fproyecto-grado-unimayor --skill backend-schema",{"tool":48,"command":49},"pnpm","pnpm dlx skills add davidleonmayor\u002Fproyecto-grado-unimayor --skill backend-schema","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavidleonmayor\u002Fproyecto-grado-unimayor\u002Fblob\u002Fmain\u002Fskills\u002Fbackend-schema\u002FSKILL.md",true,[],[54,71,92,112,124,145],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":64,"publishedAt":26},"01M6C2DVB157H69PFWB1XXBVZS","skill-sync","Synchronizes skill metadata to AGENTS.md Auto-invoke sections. Trigger: When syncing skill metadata to AGENTS.md.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavidleonmayor\u002Fproyecto-grado-unimayor\u002Fblob\u002Fmain\u002Fskills\u002Fskill-sync\u002FSKILL.md",[61],{"categoryNo":62,"categoryName":63,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[65,66,67,68,69,70],"sync","skill sync","metadata","cloud","prowler","auto",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":78,"publishedAt":26},"01M6C2DRSV8QKEFA2J94YQKWK1","skill-creator","Creates new AI agent skills following the Agent Skills spec. Trigger: When user asks to create a new skill, add agent instructions, or document patterns for AI.","https:\u002F\u002Fgithub.com\u002Fdavidleonmayor\u002Fproyecto-grado-unimayor\u002Fblob\u002Fmain\u002Fskills\u002Fskill-creator\u002FSKILL.md",[77],{"categoryNo":62,"categoryName":63,"taxonomyType":20,"taxonomyTypeDesc":21},[79,80,81,82,68,69,83,84,85,86,87,88,89,90,91],"skill creator","spec","ai agent","create","Bash","grep","read","write","edit","instructions","user","webfetch","add agent",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":102,"publishedAt":26},"01M6C2DP81DY28MKM0RKFWJQHX","skill-commit","Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.","https:\u002F\u002Fgithub.com\u002Fdavidleonmayor\u002Fproyecto-grado-unimayor\u002Fblob\u002Fmain\u002Fskills\u002Fskill-commit\u002FSKILL.md",[98,101],{"categoryNo":99,"categoryName":100,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":62,"categoryName":63,"taxonomyType":20,"taxonomyTypeDesc":21},[103,104,105,23,106,89,107,108,109,110,111],"commit","skill commit","landing","code","frontend","git commit","git","commits","format",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":26},"01M6C2DMHK8HST60TFQHMK8D94","project-info","General monorepo structure and component overview. Trigger: When AI needs project context or component locations.","https:\u002F\u002Fgithub.com\u002Fdavidleonmayor\u002Fproyecto-grado-unimayor\u002Fblob\u002Fmain\u002Fskills\u002Fproject-info\u002FSKILL.md",[],[119,120,121,122,123],"project info","component","monorepo","context","overview",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":136,"publishedAt":26},"01M6C2DHT1Q0Q87WRYBCBH3QHG","frontend-context","Frontend architecture, patterns and conventions for the Next.js 15 app. Trigger: When working on frontend code, components, pages, or API integration.","https:\u002F\u002Fgithub.com\u002Fdavidleonmayor\u002Fproyecto-grado-unimayor\u002Fblob\u002Fmain\u002Fskills\u002Ffrontend-context\u002FSKILL.md",[130,131],{"categoryNo":99,"categoryName":100,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":132,"categoryName":133,"taxonomyType":134,"taxonomyTypeDesc":135},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[107,122,137,138,139,140,106,141,142,143,144],"frontend context","api","components","architecture","frontend architecture","integration","Next.js","js",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":155,"publishedAt":26},"01M6C2DESFJR14Z3G38F4KZCSG","express-mocks-testing","Unit testing pattern for Express 5 controllers using node-mocks-http and @prisma\u002Fclient mocks. Trigger: When writing unit tests for backend controllers, testing Express routes, or avoiding Supertest\u002FServer instantiation.","https:\u002F\u002Fgithub.com\u002Fdavidleonmayor\u002Fproyecto-grado-unimayor\u002Fblob\u002Fmain\u002Fskills\u002Fexpress-mocks-testing\u002FSKILL.md",[151,154],{"categoryNo":152,"categoryName":153,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[156,157,158,159,160,161,162,163,23],"express mocks testing","testing","writing","unit tests","http","server","programming","node"]