[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76VZ2TTS0K0T3DYBK84KTPX":3,"skill-same:01M76VZ2TTS0K0T3DYBK84KTPX":62},{"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":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M76VZ2TTS0K0T3DYBK84KTPX","ag-strict-config-derivation",null,"Enforces Single Source of Truth + Type Derivation pattern for all config lists (columns, permissions, forms, status). Compile-time safety for DTOs and queries.","ngxccc\u002Fagent-skills-kit","ngxccc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F163379246?v=4","01M758XVG64QK26AGK0WKB26TB","Ngoc Tran","01M758XVHB8J6MHV0YTBVDBXCA",0,"MIT","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fag-strict-config-derivation\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: ag-strict-config-derivation\ndescription: \"Enforces Single Source of Truth + Type Derivation pattern for all config lists (columns, permissions, forms, status). Compile-time safety for DTOs and queries.\"\ntrigger_keywords: strict, config, derivation\nlayer: helper\n---\n\n# Strict Config Derivation (Single Source of Truth)\n\nThis skill defines the **only acceptable pattern** for any configuration that controls both runtime behavior and TypeScript types. It is the repository-wide architectural standard for eliminating duplication and drift between queries, DTOs, mappers, and UI.\n\n## When to Apply\n\n**MUST** apply this skill when:\n\n- Defining Drizzle column lists (`columns`, `.select`)\n- Defining role\u002Fpermission matrices or navigation visibility\n- Defining form field configurations (React Hook Form + Zod)\n- Defining status\u002Fstate machine transitions\n- Defining any list of keys used in multiple layers (DB, DTO, UI, validation)\n- Refactoring existing `Pick\u003C>` or duplicated string unions\n\n**Trigger keywords:** column list, permission, role matrix, form field, status transition, nav item, feature flag, single source of truth.\n\n## How to Use\n\n1. **Construct the Const**: Define your runtime configuration list using `as const` to freeze the keys at compile time.\n2. **Derive the Type**: Map over the keys of the typeof const config (e.g. `[K in keyof typeof CONFIG]`) to construct your TypeScript types dynamically.\n3. **Consume in Queries and UI**: Pass the runtime const directly into database queries and validate return values using `satisfies` with the derived type.\n4. **Enforce Clean Comments**: Write self-documenting code and only use comments tagged with the Better Comments Tag Dictionary to explain the _why_ of config settings.\n\n## Core Rule (Strict)\n\n**There must be exactly one source of truth for the list of keys.**\n\n### Correct Pattern (Mandatory)\n\n```typescript\nexport const ORDER_PUBLIC_COLUMNS = {\n  id: true,\n  status: true,\n  totalAmount: true,\n  createdAt: true,\n} as const;\n\nexport type OrderPublic = {\n  [K in keyof typeof ORDER_PUBLIC_COLUMNS]: TOrder[K];\n};\n\nconst orders = await db.query.orders.findMany({\n  columns: ORDER_PUBLIC_COLUMNS,\n});\n\nreturn {\n  id: order.id,\n  status: order.status,\n  totalAmount: order.totalAmount,\n  createdAt: order.createdAt,\n} satisfies OrderPublic;\n```\n\n## Forbidden Patterns (NEVER)\n\n- Hardcoding column\u002Ffield lists in multiple files\n- Using `Pick\u003CT, \"a\" | \"b\" | \"c\">` when a const object already exists\n- Defining DTO type first, then duplicating keys in the query\n- Using `as any` or type assertions to bypass derivation\n- Manually maintaining three places (query + DTO + mapper)\n\n## Coding & Commenting Standards (The Zero Semantic Noise Policy)\n\nAll code written in this repository must strictly adhere to commenting standards to ensure readability and eliminate redundant text.\n\n### Commenting Rules\n\n1. **ZERO Semantic Noise**: NEVER write comments that explain \"WHAT\" the code does or translate basic syntax. Clean code must be self-documenting. If the logic is simple, readable, and standard, output **ZERO** comments.\n2. **Explain \"WHY\", not \"WHAT\"**: Comments MUST ONLY explain complex algorithms, business logic quirks, system constraints, or architectural trade-offs.\n3. **English only**: All comments must be written in English.\n\n### Better Comments Tag Dictionary\n\nWhen writing comments, you **MUST** prefix them with one of the following exactly formatted uppercase tags followed by a colon:\n\n- `WHY:` - Explains the business logic, architectural decisions, or why a specific approach was chosen over another.\n- `PERF:` - Highlights Big O Time\u002FSpace Complexity or performance optimization details.\n- `HACK:` - Documents workarounds, unconventional solutions, or temporary fixes bypassing system limitations.\n- `BUG:` - Notes known issues, unexpected behaviors, or failing edge cases.\n- `FIXME:` - Marks broken, deprecated, or urgently needing refactoring code.\n- `TODO:` - Indicates planned features, missing implementations, or future improvements.\n- `IDEA:` - Suggests alternative approaches or architectural improvements for future iterations.\n- `INFO:` - Crucial contextual info or external documentation links that the developer must know.\n- `#region [Name]` \u002F `#endregion` - Logically groups large sections of code\u002Fvariables to keep files scannable.\n\n## Foundational Engineering Principles\n\nThis skill also enforces three core principles that support the config derivation pattern:\n\n- **YAGNI** — You Aren't Gonna Need It: Only implement what current callers actually need. Never add fields, abstraction, or configuration \"for the future\".\n- **KISS** — Keep It Simple, Stupid: Prefer the simplest, most boring solution. Complexity must be justified by measurable long-term savings.\n- **DRY** — Don't Repeat Yourself: Every piece of knowledge (especially lists of keys) must have exactly one authoritative source.\n\nDetailed definitions and strict MUST\u002FNEVER rules are available in [references\u002Ffoundational-principles.md](references\u002Ffoundational-principles.md).\n\n## Enforcement\n\n- Any code introducing a new config list without this pattern will be rejected in review.\n- AI agents **MUST** load this skill before writing column, permission, or form configurations.\n- Violation is treated as serious architectural debt (equivalent to using `any`).\n\n## References\n\n- [Detailed Pattern Definition](references\u002Fsingle-source-of-truth-pattern.md)\n- [Consolidated Strict Rules](references\u002Fstrict-rules-catalog.md)\n","# Strict Config Derivation (Single Source of Truth)\n\nThis skill defines the **only acceptable pattern** for any configuration that controls both runtime behavior and TypeScript types. It is the repository-wide architectural standard for eliminating duplication and drift between queries, DTOs, mappers, and UI.\n\n## When to Apply\n\n**MUST** apply this skill when:\n\n- Defining Drizzle column lists (`columns`, `.select`)\n- Defining role\u002Fpermission matrices or navigation visibility\n- Defining form field configurations (React Hook Form + Zod)\n- Defining status\u002Fstate machine transitions\n- Defining any list of keys used in multiple layers (DB, DTO, UI, validation)\n- Refactoring existing `Pick\u003C>` or duplicated string unions\n\n**Trigger keywords:** column list, permission, role matrix, form field, status transition, nav item, feature flag, single source of truth.\n\n## How to Use\n\n1. **Construct the Const**: Define your runtime configuration list using `as const` to freeze the keys at compile time.\n2. **Derive the Type**: Map over the keys of the typeof const config (e.g. `[K in keyof typeof CONFIG]`) to construct your TypeScript types dynamically.\n3. **Consume in Queries and UI**: Pass the runtime const directly into database queries and validate return values using `satisfies` with the derived type.\n4. **Enforce Clean Comments**: Write self-documenting code and only use comments tagged with the Better Comments Tag Dictionary to explain the _why_ of config settings.\n\n## Core Rule (Strict)\n\n**There must be exactly one source of truth for the list of keys.**\n\n### Correct Pattern (Mandatory)\n\n```typescript\nexport const ORDER_PUBLIC_COLUMNS = {\n  id: true,\n  status: true,\n  totalAmount: true,\n  createdAt: true,\n} as const;\n\nexport type OrderPublic = {\n  [K in keyof typeof ORDER_PUBLIC_COLUMNS]: TOrder[K];\n};\n\nconst orders = await db.query.orders.findMany({\n  columns: ORDER_PUBLIC_COLUMNS,\n});\n\nreturn {\n  id: order.id,\n  status: order.status,\n  totalAmount: order.totalAmount,\n  createdAt: order.createdAt,\n} satisfies OrderPublic;\n```\n\n## Forbidden Patterns (NEVER)\n\n- Hardcoding column\u002Ffield lists in multiple files\n- Using `Pick\u003CT, \"a\" | \"b\" | \"c\">` when a const object already exists\n- Defining DTO type first, then duplicating keys in the query\n- Using `as any` or type assertions to bypass derivation\n- Manually maintaining three places (query + DTO + mapper)\n\n## Coding & Commenting Standards (The Zero Semantic Noise Policy)\n\nAll code written in this repository must strictly adhere to commenting standards to ensure readability and eliminate redundant text.\n\n### Commenting Rules\n\n1. **ZERO Semantic Noise**: NEVER write comments that explain \"WHAT\" the code does or translate basic syntax. Clean code must be self-documenting. If the logic is simple, readable, and standard, output **ZERO** comments.\n2. **Explain \"WHY\", not \"WHAT\"**: Comments MUST ONLY explain complex algorithms, business logic quirks, system constraints, or architectural trade-offs.\n3. **English only**: All comments must be written in English.\n\n### Better Comments Tag Dictionary\n\nWhen writing comments, you **MUST** prefix them with one of the following exactly formatted uppercase tags followed by a colon:\n\n- `WHY:` - Explains the business logic, architectural decisions, or why a specific approach was chosen over another.\n- `PERF:` - Highlights Big O Time\u002FSpace Complexity or performance optimization details.\n- `HACK:` - Documents workarounds, unconventional solutions, or temporary fixes bypassing system limitations.\n- `BUG:` - Notes known issues, unexpected behaviors, or failing edge cases.\n- `FIXME:` - Marks broken, deprecated, or urgently needing refactoring code.\n- `TODO:` - Indicates planned features, missing implementations, or future improvements.\n- `IDEA:` - Suggests alternative approaches or architectural improvements for future iterations.\n- `INFO:` - Crucial contextual info or external documentation links that the developer must know.\n- `#region [Name]` \u002F `#endregion` - Logically groups large sections of code\u002Fvariables to keep files scannable.\n\n## Foundational Engineering Principles\n\nThis skill also enforces three core principles that support the config derivation pattern:\n\n- **YAGNI** — You Aren't Gonna Need It: Only implement what current callers actually need. Never add fields, abstraction, or configuration \"for the future\".\n- **KISS** — Keep It Simple, Stupid: Prefer the simplest, most boring solution. Complexity must be justified by measurable long-term savings.\n- **DRY** — Don't Repeat Yourself: Every piece of knowledge (especially lists of keys) must have exactly one authoritative source.\n\nDetailed definitions and strict MUST\u002FNEVER rules are available in [references\u002Ffoundational-principles.md](references\u002Ffoundational-principles.md).\n\n## Enforcement\n\n- Any code introducing a new config list without this pattern will be rejected in review.\n- AI agents **MUST** load this skill before writing column, permission, or form configurations.\n- Violation is treated as serious architectural debt (equivalent to using `any`).\n\n## References\n\n- [Detailed Pattern Definition](references\u002Fsingle-source-of-truth-pattern.md)\n- [Consolidated Strict Rules](references\u002Fstrict-rules-catalog.md)\n",{"name":5,"layer":24,"description":7,"trigger_keywords":25},"helper","strict, config, derivation","main","1ef0dcd00fe806a8dc4e0b7173b9db967c3ab274",".claude\u002Fskills\u002Fag-strict-config-derivation","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit","https:\u002F\u002Fgithub.com\u002Fngxccc","https:\u002F\u002Fngxccc.github.io","Make it work, make it right, make it fast.","2026-08-02 20:59:07",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add ngxccc\u002Fagent-skills-kit --skill ag-strict-config-derivation",{"tool":40,"command":41},"bunx","bunx skills add ngxccc\u002Fagent-skills-kit --skill ag-strict-config-derivation",{"tool":43,"command":44},"pnpm","pnpm dlx skills add ngxccc\u002Fagent-skills-kit --skill ag-strict-config-derivation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fag-strict-config-derivation\u002FSKILL.md",true,[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Ffoundational-principles.md","REFERENCE","参考文档",3536,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fag-strict-config-derivation\u002Freferences\u002Ffoundational-principles.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fsingle-source-of-truth-pattern.md",2175,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fag-strict-config-derivation\u002Freferences\u002Fsingle-source-of-truth-pattern.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fstrict-rules-catalog.md",2888,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fag-strict-config-derivation\u002Freferences\u002Fstrict-rules-catalog.md",[63,70,77,84,91,98],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M76W3C8X6Q5DS0364KQT7W7A","zustand","Rules and standards for state management using Zustand in React and Next.js. Use when implementing client-side stores, persistence with localStorage, or preventing SSR hydration mismatch.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fzustand\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M76W39FJGES309VAH7SFWA9Y","zod","Zod v4 schema validation best practices. Use when defining schemas, utilizing safeParse, or customizing error messages.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fzod\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M76W36HTYA4BR5FKCWMX1RFR","upstash-ratelimit","Rules, standards, and references for rate limiting in serverless environments using Upstash Ratelimit. Use when implementing rate limiting, configuring Upstash Redis, or handling request blocking.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M76W32H4PS01WFRS7FNPK2G1","ui-design","UI\u002FUX and frontend design best practices guidelines (formerly frontend-design). This skill should be used when writing, reviewing, or designing frontend code to ensure accessibility, performance, and usability. Triggers on tasks involving HTML structure, CSS styling, responsive layouts, form design, animations, or accessibility improvements.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fui-design\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M76W2YAP6RK8N0EVWFG54VD7","typescript","TypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to \"optimize TypeScript performance\", \"speed up tsc compilation\", \"configure tsconfig.json\", \"fix type errors\", \"improve async patterns\", or encounters TS errors (TS2322, TS2339, \"is not assignable to\"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Ftypescript\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M76W2RMAZNNJQ2HECH3X6ZSH","typescript-refactor","TypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19. This skill should be used when refactoring, reviewing, or modernizing TypeScript or React\u002FTSX code for type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving type architecture, narrowing, generics, discriminated unions, error handling, React component and hook typing, or migration to modern TypeScript features (satisfies, using, const type parameters, inferred type predicates, isolatedDeclarations, erasable syntax, import attributes).","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Ftypescript-refactor\u002FSKILL.md",[],[]]