[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C2B8BA5648N3F0HCFM2FWV":3,"skill-same:01M6C2B8BA5648N3F0HCFM2FWV":51},{"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":23,"publishedAt":25,"linkOnly":26,"markdownContent":27,"markdownBody":28,"frontMatter":29,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M6C2B8BA5648N3F0HCFM2FWV","sqlc",null,"Working with sqlc and database queries","kalbasit\u002Fncps-test","kalbasit","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87115?v=4","01M6C2A733H05KZCC1FTS5ENT4","Wael Nasreddine","01M6C2A77QVF5AD69EP1S1ZTY4",0,"MIT","https:\u002F\u002Fgithub.com\u002Fkalbasit\u002Fncps-test\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fsqlc\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[5,24],"database","2026-11-10 10:12:30",false,"---\nname: sqlc\ndescription: Working with sqlc and database queries\n---\n\n# SQLC Skill\n\nThis skill provides instructions for working with `sqlc` and database queries in the NCPS repository. NCPS supports multiple database engines (SQLite, PostgreSQL, MySQL), and `sqlc` is used to generate type-safe Go code from SQL queries for each engine.\n\n## Configuration\n\n- **SQLC Config**: `sqlc.yml`\n- **Queries**:\n  - SQLite: `db\u002Fquery.sqlite.sql`\n  - PostgreSQL: `db\u002Fquery.postgres.sql`\n  - MySQL: `db\u002Fquery.mysql.sql`\n- **Output**:\n  - SQLite: `pkg\u002Fdatabase\u002Fsqlitedb`\n  - PostgreSQL: `pkg\u002Fdatabase\u002Fpostgresdb`\n  - MySQL: `pkg\u002Fdatabase\u002Fmysqldb`\n\n## Workflow for Query Changes\n\nAny time a query file (`db\u002Fquery.\u003Cengine>.sql`) is updated, you MUST follow these steps:\n\n### 1. Generate SQLC Code\n\nRun the `sqlc generate` command to update the generated Go files for all engines.\n\n```bash\nsqlc generate\n```\n\n### 2. Regenerate Database Wrappers and Models\n\nRun `go generate` for the `pkg\u002Fdatabase` package. This command uses `sqlc-multi-db` (via `go tool`) to automatically:\n1. Extract the `Querier` interface from the `postgresdb` backend.\n2. Generate the common `Querier` interface in `pkg\u002Fdatabase\u002Fquerier.go`.\n3. Generate common domain models in `pkg\u002Fdatabase\u002Fmodels.go`.\n4. Generate database wrappers (`wrapper_sqlite.go`, `wrapper_postgres.go`, `wrapper_mysql.go`).\n\n```bash\ngo generate .\u002Fpkg\u002Fdatabase\n```\n\n> [!IMPORTANT]\n> Do NOT manually edit `pkg\u002Fdatabase\u002Fquerier.go` or `pkg\u002Fdatabase\u002Fmodels.go`. They are fully automated.\n\n## Best Practices\n\n- **Consistency**: Ensure that equivalent queries exist for all supported engines unless the feature is engine-specific.\n- **Linting**: Use `sqlfluff` to lint and format SQL files before running `sqlc generate`.\n\n  ```bash\n  sqlfluff lint db\u002Fquery.*.sql\n  sqlfluff format db\u002Fquery.*.sql\n  ```\n","# SQLC Skill\n\nThis skill provides instructions for working with `sqlc` and database queries in the NCPS repository. NCPS supports multiple database engines (SQLite, PostgreSQL, MySQL), and `sqlc` is used to generate type-safe Go code from SQL queries for each engine.\n\n## Configuration\n\n- **SQLC Config**: `sqlc.yml`\n- **Queries**:\n  - SQLite: `db\u002Fquery.sqlite.sql`\n  - PostgreSQL: `db\u002Fquery.postgres.sql`\n  - MySQL: `db\u002Fquery.mysql.sql`\n- **Output**:\n  - SQLite: `pkg\u002Fdatabase\u002Fsqlitedb`\n  - PostgreSQL: `pkg\u002Fdatabase\u002Fpostgresdb`\n  - MySQL: `pkg\u002Fdatabase\u002Fmysqldb`\n\n## Workflow for Query Changes\n\nAny time a query file (`db\u002Fquery.\u003Cengine>.sql`) is updated, you MUST follow these steps:\n\n### 1. Generate SQLC Code\n\nRun the `sqlc generate` command to update the generated Go files for all engines.\n\n```bash\nsqlc generate\n```\n\n### 2. Regenerate Database Wrappers and Models\n\nRun `go generate` for the `pkg\u002Fdatabase` package. This command uses `sqlc-multi-db` (via `go tool`) to automatically:\n1. Extract the `Querier` interface from the `postgresdb` backend.\n2. Generate the common `Querier` interface in `pkg\u002Fdatabase\u002Fquerier.go`.\n3. Generate common domain models in `pkg\u002Fdatabase\u002Fmodels.go`.\n4. Generate database wrappers (`wrapper_sqlite.go`, `wrapper_postgres.go`, `wrapper_mysql.go`).\n\n```bash\ngo generate .\u002Fpkg\u002Fdatabase\n```\n\n> [!IMPORTANT]\n> Do NOT manually edit `pkg\u002Fdatabase\u002Fquerier.go` or `pkg\u002Fdatabase\u002Fmodels.go`. They are fully automated.\n\n## Best Practices\n\n- **Consistency**: Ensure that equivalent queries exist for all supported engines unless the feature is engine-specific.\n- **Linting**: Use `sqlfluff` to lint and format SQL files before running `sqlc generate`.\n\n  ```bash\n  sqlfluff lint db\u002Fquery.*.sql\n  sqlfluff format db\u002Fquery.*.sql\n  ```\n",{"name":5,"description":7},"main","a541621e4e20d5773ebbcefa969b7bad1c15ed2a",".agent\u002Fskills\u002Fsqlc","https:\u002F\u002Fgithub.com\u002Fkalbasit\u002Fncps-test","https:\u002F\u002Fgithub.com\u002Fkalbasit","https:\u002F\u002Fkalbas.it","2026-09-30 03:07:07",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add kalbasit\u002Fncps-test --skill sqlc",{"tool":43,"command":44},"bunx","bunx skills add kalbasit\u002Fncps-test --skill sqlc",{"tool":46,"command":47},"pnpm","pnpm dlx skills add kalbasit\u002Fncps-test --skill sqlc","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkalbasit\u002Fncps-test\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fsqlc\u002FSKILL.md",true,[],[52,68,79,90,103,112],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":25},"01M6C2BVH1AB05AHRRKM1KT5EK","openspec-verify-change","Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.","https:\u002F\u002Fgithub.com\u002Fkalbasit\u002Fncps-test\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fopenspec-verify-change\u002FSKILL.md",[],[59,60,61,62,63,64,65,66,67],"openspec verify change","change","verify","cli","validate","artifacts","correct","user","use",{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":25},"01M6C2BSQEMJR15D1ESJBY51Q4","openspec-sync-specs","Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.","https:\u002F\u002Fgithub.com\u002Fkalbasit\u002Fncps-test\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fopenspec-sync-specs\u002FSKILL.md",[],[75,76,67,62,77,60,78,66],"openspec sync specs","sync","spec","update",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":25},"01M6C2BQZ1J60X2BKKNRJQSHMF","openspec-propose","Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.","https:\u002F\u002Fgithub.com\u002Fkalbasit\u002Fncps-test\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fopenspec-propose\u002FSKILL.md",[],[86,87,67,66,64,62,88,89,60],"openspec propose","generated","tasks","design",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":25},"01M6C2BP1B1Y34VD761K3SKPVM","openspec-new-change","Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.","https:\u002F\u002Fgithub.com\u002Fkalbasit\u002Fncps-test\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fopenspec-new-change\u002FSKILL.md",[],[97,60,98,62,99,100,66,101,102,67],"openspec new change","workflow","create","start","fix","new feature",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":25},"01M6C2BMFQ6AZ3VSMSEEYGFZ03","openspec-ff-change","Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.","https:\u002F\u002Fgithub.com\u002Fkalbasit\u002Fncps-test\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fopenspec-ff-change\u002FSKILL.md",[],[110,60,62,99,64,111,66,67],"openspec ff change","fast",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":25},"01M6C2BJC0APWXADJ7B4WC0YCJ","openspec-explore","Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.","https:\u002F\u002Fgithub.com\u002Fkalbasit\u002Fncps-test\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fopenspec-explore\u002FSKILL.md",[],[119,120,60,66,67,62],"explore","openspec explore"]