[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C4Y2QWSAXM4QMZT7B148R7":3,"skill-same:01M6C4Y2QWSAXM4QMZT7B148R7":51},{"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":25,"linkOnly":26,"markdownContent":27,"markdownBody":27,"frontMatter":28,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":13,"repositoryHtmlUrl":32,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M6C4Y2QWSAXM4QMZT7B148R7","content-ordering",null,"joshribakoff\u002Ffightingwithai.com","joshribakoff","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4021306?v=4","01M6C4XRSWK3RV2R7FF1CH2FGA","Josh Ribakoff","01M6C4XRYAPRF3PM6E2VY4MNXM",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjoshribakoff\u002Ffightingwithai.com\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcontent-ordering\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[23,24],"content","content ordering","2026-11-10 10:12:30",false,"# Content Collections & Ordering\n\n## Overview\n\nContent is organized into collections in `src\u002Fcontent\u002F`. The single source of truth for collection order is `COLLECTION_NAMES` in `src\u002Futils\u002Fcollections-config.ts`.\n\n| Collection | Path | Purpose |\n|------------|------|---------|\n| Concepts | `src\u002Fcontent\u002Fconcepts\u002F` | Foundational knowledge for AI-assisted work |\n| Prompt Engineering | `src\u002Fcontent\u002Fprompt-engineering\u002F` | How you write and structure prompts |\n| Context Engineering | `src\u002Fcontent\u002Fcontext-engineering\u002F` | What info AI has access to and when |\n| Workflow & Guardrails | `src\u002Fcontent\u002Fworkflow-guardrails\u002F` | How you guide AI through a task |\n| Failure Modes | `src\u002Fcontent\u002Ffailure-modes\u002F` | What goes wrong |\n| Tools | `src\u002Fcontent\u002Ftools\u002F` | AI coding assistants |\n\n## Ordering: Linked List via `dependsOn`\n\nInstead of numerical ordering (`order: 1, 2, 3`), content uses a **linked list** approach where each item points to its prerequisite.\n\n### Schema\n\n```typescript\n\u002F\u002F src\u002Fcontent\u002Fconfig.ts\nschema: z.object({\n  title: z.string(),\n  dependsOn: z.string().optional(), \u002F\u002F slug of prerequisite\n})\n```\n\n### Example Chain\n\n```yaml\n# large-language-models.md (HEAD - no dependsOn)\n---\ntitle: Large Language Models\n---\n\n# context.md\n---\ntitle: Context\ndependsOn: large-language-models\n---\n\n# tools.md\n---\ntitle: Tools\ndependsOn: context\n---\n```\n\n**Result:** LLMs → Context → Tools\n\n### Why Linked Lists?\n\n1. **Insert anywhere** - Add new content by pointing to predecessor, update successor\n2. **No renumbering** - Unlike `order: 1, 2, 3` where inserting means updating all subsequent items\n3. **Semantic** - `dependsOn` documents prerequisites, not just position\n\n## Sorting Implementation\n\nThe sorting logic lives in `src\u002Futils\u002FsortByDependency.ts`:\n\n```typescript\nimport { sortCollectionByDependency } from '..\u002Futils\u002FsortByDependency';\n\nconst concepts = sortCollectionByDependency(await getCollection(\"concepts\"));\n```\n\n**Algorithm:** Topological sort - finds items with no `dependsOn` (heads), then walks the chain.\n\n## Adding New Content\n\n1. Create the markdown file in the appropriate collection folder\n2. Set `dependsOn` to the slug of what should come before it\n3. If inserting between A and B: set new item's `dependsOn` to A, update B's `dependsOn` to new item\n\n## Adding New Collections\n\nTo add a new collection:\n\n1. Create the directory: `src\u002Fcontent\u002Fnew-collection\u002F`\n2. Add to `src\u002Fcontent\u002Fconfig.ts` schema\n3. Add to `COLLECTION_NAMES` array in `src\u002Futils\u002Fcollections-config.ts` (this controls order)\n4. Add to `COLLECTION_CONFIG` in the same file (display name, description, sort method)\n5. Add to `AnyCollectionEntry` type in `src\u002Futils\u002Fcollections.ts`\n\nEverything else (sidebar, pages, navigation) will automatically pick up the new collection.\n\n## Tests\n\nRun `npm test` - the sorting logic has 22 tests covering:\n- Empty\u002Fsingle items\n- Simple chains\n- Multiple independent chains\n- Missing dependencies (treated as heads)\n- Cycle handling\n- Deterministic ordering\n\n## Files\n\n| File | Purpose |\n|------|---------|\n| `src\u002Fcontent\u002Fconfig.ts` | Schema definitions |\n| `src\u002Futils\u002Fcollections-config.ts` | Collection names, order, and metadata |\n| `src\u002Futils\u002Fcollections.ts` | Astro integration and fetching |\n| `src\u002Futils\u002FsortByDependency.ts` | Sorting utility |\n| `src\u002Futils\u002FsortByDependency.test.ts` | Test suite |\n| `src\u002Flayouts\u002FLayout.astro` | Uses sorting for nav |\n",{},"main","456b6e5999d9613b2065544f7789689d31742769",".claude\u002Fskills\u002Fcontent-ordering","https:\u002F\u002Fgithub.com\u002Fjoshribakoff\u002Ffightingwithai.com","https:\u002F\u002Ffightingwithai.vercel.app","https:\u002F\u002Fgithub.com\u002Fjoshribakoff","joshribakoff.com","2026-01-22 14:44:35",{"source":7,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add joshribakoff\u002Ffightingwithai.com --skill content-ordering",{"tool":43,"command":44},"bunx","bunx skills add joshribakoff\u002Ffightingwithai.com --skill content-ordering",{"tool":46,"command":47},"pnpm","pnpm dlx skills add joshribakoff\u002Ffightingwithai.com --skill content-ordering","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjoshribakoff\u002Ffightingwithai.com\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcontent-ordering\u002FSKILL.md",true,[],[52,59,67,74,85,97],{"skillNo":53,"name":54,"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":55,"categories":56,"keywords":57,"publishedAt":25},"01M6C4Y9B23N3BZYDHRRVW13PF","simple-commands","https:\u002F\u002Fgithub.com\u002Fjoshribakoff\u002Ffightingwithai.com\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsimple-commands\u002FSKILL.md",[],[58],"simple commands",{"skillNo":60,"name":61,"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":62,"categories":63,"keywords":64,"publishedAt":25},"01M6C4Y7XQM8QNRMDDFXTDMW7P","meta-skill","https:\u002F\u002Fgithub.com\u002Fjoshribakoff\u002Ffightingwithai.com\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmeta-skill\u002FSKILL.md",[],[65,66],"Meta","meta skill",{"skillNo":68,"name":69,"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":70,"categories":71,"keywords":72,"publishedAt":25},"01M6C4Y65GQJC86RRJN64NZ4R5","magic-links","https:\u002F\u002Fgithub.com\u002Fjoshribakoff\u002Ffightingwithai.com\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmagic-links\u002FSKILL.md",[],[73],"magic links",{"skillNo":75,"name":76,"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":77,"categories":78,"keywords":84,"publishedAt":25},"01M6C4Y508MC06FWACP82JNYMN","copywriting","https:\u002F\u002Fgithub.com\u002Fjoshribakoff\u002Ffightingwithai.com\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcopywriting\u002FSKILL.md",[79],{"categoryNo":80,"categoryName":81,"taxonomyType":82,"taxonomyTypeDesc":83},"01JBSEEDCAT000000000000018","写作与文案","SCENARIO","使用场景",[76],{"skillNo":86,"name":87,"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":88,"categories":89,"keywords":93,"publishedAt":25},"01M6C4Y0W01TCYVVFE4ZSQ8K02","code-cleanup","https:\u002F\u002Fgithub.com\u002Fjoshribakoff\u002Ffightingwithai.com\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcode-cleanup\u002FSKILL.md",[90],{"categoryNo":91,"categoryName":92,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000030","开发工程师",[94,95,96],"cleanup","code","code cleanup",{"skillNo":98,"name":99,"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":100,"categories":101,"keywords":102,"publishedAt":25},"01M6C4XYDC6W16Y6KTY347S6ZC","astro-islands","https:\u002F\u002Fgithub.com\u002Fjoshribakoff\u002Ffightingwithai.com\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fastro-islands\u002FSKILL.md",[],[103,104],"astro","astro islands"]