[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6NK4H7W7F3SMSJQVYSNEN9D":3,"skill-same:01M6NK4H7W7F3SMSJQVYSNEN9D":72},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6NK4H7W7F3SMSJQVYSNEN9D","schema-sync-agent-assisted",null,"Four-layer schema sync procedure for the Ghost Contributors NL2SQL system after a database migration. Covers YAML contract, ChromaDB RAG chunks, NL2SQL prompt, and RAG prompt with a step-by-step repair sequence.","DSmmartin\u002Fskills_talk_agent_camp_2026","DSmmartin","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F22822956?v=4","01M6NK453HEBQQSBE8CPEJM1XC","Manuel Martin","01M6NK457K9CHYV9XV1RZTX1QF",9,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FDSmmartin\u002Fskills_talk_agent_camp_2026\u002Fblob\u002Fmain\u002Fdev_tools\u002Fskill_examples\u002F02_agent_assisted\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"schema sync agent assisted","schema","sync","migration","chunks","sequence","for","layer","with","contract","chromadb","repair","contributors","prompt","system","ghost","database migration","yaml","database","rag","2026-11-10 10:12:30",false,"---\nname: schema-sync-agent-assisted\ndescription: Four-layer schema sync procedure for the Ghost Contributors NL2SQL system after a database migration. Covers YAML contract, ChromaDB RAG chunks, NL2SQL prompt, and RAG prompt with a step-by-step repair sequence.\n---\n\n# Schema Sync — Agent Assisted\n\n## Context\n\nThis system has four layers that break simultaneously when the database schema changes:\n\n| Layer | File \u002F System | What breaks |\n|-------|--------------|-------------|\n| YAML contract | `agentic_system\u002Fschema\u002Fgithub_events.yaml` | Contract no longer matches live DB |\n| NL2SQL prompt | `agentic_system\u002Fagents_core\u002Fnl2sql\u002Fprompts\u002Fsystem.md` | Agent generates SQL with old predicates → 0 rows, no error |\n| RAG prompt | `agentic_system\u002Fagents_core\u002Frag\u002Fprompts\u002Fsystem.md` | Agent describes wrong field semantics to the user |\n| ChromaDB chunks | `schema_docs`, `qa_examples` collections | RAG retrieves stale context with wrong field names |\n\n## Repair procedure\n\n### Step 1 — Introspect live schema\n\nQuery ClickHouse to see what the database actually has:\n\n```sql\nSELECT name, type FROM system.columns WHERE table = 'github_events' ORDER BY position\n```\n\nUse connection settings from `agentic_system\u002Fconfig.py` (host, port, user, password, database).\n\n### Step 2 — Diff against YAML contract\n\nLoad `agentic_system\u002Fschema\u002Fgithub_events.yaml` and compare column names and types.\nIdentify: removed columns, added columns, type changes.\n\n### Step 3 — Patch YAML contract\n\nUpdate `agentic_system\u002Fschema\u002Fgithub_events.yaml`:\n- Add entries for new columns with correct type and a clear post-migration description.\n- Update the type field for any column whose type changed.\n- Update descriptions for migration-sensitive columns (especially merge-related fields).\n\n### Step 4 — Patch agent prompts\n\nIn both `system.md` prompt files:\n- Replace old field name references with new names.\n- Replace old SQL predicates (e.g. `field = 1`) with new equivalents (e.g. `field IS NOT NULL`).\n- Update any type annotations in the schema table within the prompt.\n- Update state labels (`pre-migration` → `post-migration`).\n\n### Step 5 — Patch ChromaDB chunks\n\nConnect to ChromaDB at `http:\u002F\u002Flocalhost:8000` (settings from `agentic_system\u002Fconfig.py`).\nFor each collection (`schema_docs`, `qa_examples`):\n1. Get all items: `POST \u002Fapi\u002Fv2\u002Ftenants\u002Fdefault_tenant\u002Fdatabases\u002Fdefault_database\u002Fcollections\u002F{id}\u002Fget` with `{\"include\": [\"documents\", \"metadatas\"]}`\n2. Find items where `metadata.stale == True`.\n3. Apply the same text replacements to the document content.\n4. Re-embed using the deterministic hash function (64 dimensions, same algorithm as `db\u002Fvectordb\u002Finit\u002Fseed_vectors.py`).\n5. Upsert back: `POST ...\u002Fupsert` with updated documents, embeddings, and metadata (`stale: false`, `schema_state: post_migration_synced`).\n\n### Step 6 — Validate\n\n```bash\nuv run python scripts\u002Fvalidate_schema.py\n```\n\nExpected: `No drift — live schema matches YAML contract exactly.`\n\nAlso verify neither prompt file contains the old field predicate syntax.\n\n## Rollback\n\nTo restore the pre-sync state: revert the YAML and prompt file changes, then run `make seed-vectors` to restore ChromaDB chunks from source.\n","# Schema Sync — Agent Assisted\n\n## Context\n\nThis system has four layers that break simultaneously when the database schema changes:\n\n| Layer | File \u002F System | What breaks |\n|-------|--------------|-------------|\n| YAML contract | `agentic_system\u002Fschema\u002Fgithub_events.yaml` | Contract no longer matches live DB |\n| NL2SQL prompt | `agentic_system\u002Fagents_core\u002Fnl2sql\u002Fprompts\u002Fsystem.md` | Agent generates SQL with old predicates → 0 rows, no error |\n| RAG prompt | `agentic_system\u002Fagents_core\u002Frag\u002Fprompts\u002Fsystem.md` | Agent describes wrong field semantics to the user |\n| ChromaDB chunks | `schema_docs`, `qa_examples` collections | RAG retrieves stale context with wrong field names |\n\n## Repair procedure\n\n### Step 1 — Introspect live schema\n\nQuery ClickHouse to see what the database actually has:\n\n```sql\nSELECT name, type FROM system.columns WHERE table = 'github_events' ORDER BY position\n```\n\nUse connection settings from `agentic_system\u002Fconfig.py` (host, port, user, password, database).\n\n### Step 2 — Diff against YAML contract\n\nLoad `agentic_system\u002Fschema\u002Fgithub_events.yaml` and compare column names and types.\nIdentify: removed columns, added columns, type changes.\n\n### Step 3 — Patch YAML contract\n\nUpdate `agentic_system\u002Fschema\u002Fgithub_events.yaml`:\n- Add entries for new columns with correct type and a clear post-migration description.\n- Update the type field for any column whose type changed.\n- Update descriptions for migration-sensitive columns (especially merge-related fields).\n\n### Step 4 — Patch agent prompts\n\nIn both `system.md` prompt files:\n- Replace old field name references with new names.\n- Replace old SQL predicates (e.g. `field = 1`) with new equivalents (e.g. `field IS NOT NULL`).\n- Update any type annotations in the schema table within the prompt.\n- Update state labels (`pre-migration` → `post-migration`).\n\n### Step 5 — Patch ChromaDB chunks\n\nConnect to ChromaDB at `http:\u002F\u002Flocalhost:8000` (settings from `agentic_system\u002Fconfig.py`).\nFor each collection (`schema_docs`, `qa_examples`):\n1. Get all items: `POST \u002Fapi\u002Fv2\u002Ftenants\u002Fdefault_tenant\u002Fdatabases\u002Fdefault_database\u002Fcollections\u002F{id}\u002Fget` with `{\"include\": [\"documents\", \"metadatas\"]}`\n2. Find items where `metadata.stale == True`.\n3. Apply the same text replacements to the document content.\n4. Re-embed using the deterministic hash function (64 dimensions, same algorithm as `db\u002Fvectordb\u002Finit\u002Fseed_vectors.py`).\n5. Upsert back: `POST ...\u002Fupsert` with updated documents, embeddings, and metadata (`stale: false`, `schema_state: post_migration_synced`).\n\n### Step 6 — Validate\n\n```bash\nuv run python scripts\u002Fvalidate_schema.py\n```\n\nExpected: `No drift — live schema matches YAML contract exactly.`\n\nAlso verify neither prompt file contains the old field predicate syntax.\n\n## Rollback\n\nTo restore the pre-sync state: revert the YAML and prompt file changes, then run `make seed-vectors` to restore ChromaDB chunks from source.\n",{"name":5,"description":7},"main","8ded7bc0b28c6fd7e77369786a6503d0edb0f1ca","dev_tools\u002Fskill_examples\u002F02_agent_assisted",2,"https:\u002F\u002Fgithub.com\u002FDSmmartin\u002Fskills_talk_agent_camp_2026","https:\u002F\u002Fgithub.com\u002FDSmmartin","Data Scientist.\r\nTechnololgies: Pyhon, (PyTorch, Pandas, PySpark), Docker, Spark, Jupyter Notebook, Anaconda\r\nAreas: NLP, TS, RL","2026-04-18 18:48:52",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add DSmmartin\u002Fskills_talk_agent_camp_2026 --skill schema-sync-agent-assisted",{"tool":58,"command":59},"bunx","bunx skills add DSmmartin\u002Fskills_talk_agent_camp_2026 --skill schema-sync-agent-assisted",{"tool":61,"command":62},"pnpm","pnpm dlx skills add DSmmartin\u002Fskills_talk_agent_camp_2026 --skill schema-sync-agent-assisted","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDSmmartin\u002Fskills_talk_agent_camp_2026\u002Fblob\u002Fmain\u002Fdev_tools\u002Fskill_examples\u002F02_agent_assisted\u002FSKILL.md",true,[66],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"README.md","REFERENCE","参考文档",785,"https:\u002F\u002Fgithub.com\u002FDSmmartin\u002Fskills_talk_agent_camp_2026\u002Fblob\u002Fmain\u002Fdev_tools\u002Fskill_examples\u002F02_agent_assisted\u002FREADME.md",[73,98,118,134,153],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":39},"01M6NK4ZZ555G3WPQR4HYFXFDK","backlog-task-creator","Create or update `backlog\u002F\u003CTASK-ID>.md` task files for this repo using the established traceability format. Use when asked to add backlog task documents, standardize task scope and status, or derive task files from `PRODUCT_BACKLOG.md`.","https:\u002F\u002Fgithub.com\u002FDSmmartin\u002Fskills_talk_agent_camp_2026\u002Fblob\u002Fmain\u002Fskills\u002Fbacklog-task-creator\u002FSKILL.md",[],[80,81,82,83,84,85,86,25,87,88,89,90,91,92,93,94,95,96,97],"backlog task creator","task","backlog","backlog task","creator","traceability","add","scope","status","documents","create","update","id","product","format","repo","use","files",{"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":39},"01M6NK4W363DQMCEP102TZSZ7N","backlog-board-status","Fast status check for backlog tasks using `scripts\u002Fbacklog_board.py` and `backlog\u002Fboard.md`. Use when you need a compact view of task id, epic, status, and short description across sessions.","https:\u002F\u002Fgithub.com\u002FDSmmartin\u002Fskills_talk_agent_camp_2026\u002Fblob\u002Fmain\u002Fskills\u002Fbacklog-board-status\u002FSKILL.md",[],[88,105,82,106,107,108,109,81,96,110,111,112,113,114,92,115,116,25,117],"board","backlog board status","view","across","compact","EPIC","short","check","fast","tasks","scripts","you","sessions",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":39},"01M6NK4R3PRBCYAZ92DAG6JB66","schema-sync-fully-guided","Complete schema drift repair for the Ghost Contributors NL2SQL system. Patches all four layers (YAML contract, ChromaDB RAG chunks, NL2SQL prompt, RAG prompt) using validated tooling. Includes dry-run preview, step-by-step fallback, validation, and rollback.","https:\u002F\u002Fgithub.com\u002FDSmmartin\u002Fskills_talk_agent_camp_2026\u002Fblob\u002Fmain\u002Fdev_tools\u002Fskill_examples\u002F03_fully_guided\u002FSKILL.md",[],[125,20,21,126,32,23,25,127,128,28,30,129,130,131,132,33,34,36,133,38],"schema sync fully guided","complete","layers","dry","preview","drift","tooling","rollback","run",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":39},"01M6NK4BVDQ9B78RJAK3J3CPVT","schema-sync-structured","Fix an agentic NL2SQL system after a database schema change. Inspect the schema contract, agent prompts, and vector database chunks for stale field references and update them.","https:\u002F\u002Fgithub.com\u002FDSmmartin\u002Fskills_talk_agent_camp_2026\u002Fblob\u002Fmain\u002Fdev_tools\u002Fskill_examples\u002F01_structured\u002FSKILL.md",[],[141,142,20,21,143,144,145,28,146,147,148,149,150,33,25,37,91,151,23,152],"schema sync structured","structured","vector","inspect","database schema","references","stale","prompts","fix","vector database","change","agent prompts",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":39},"01M6NK47P82DFXGEAF2KAX9X2G","schema-sync-naive","The database schema changed and the agent is returning wrong answers. Fix it.","https:\u002F\u002Fgithub.com\u002FDSmmartin\u002Fskills_talk_agent_camp_2026\u002Fblob\u002Fmain\u002Fdev_tools\u002Fskill_examples\u002F00_naive\u002FSKILL.md",[],[21,20,160,161,162,145,149,37],"schema sync naive","Wrong","it"]