[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M784YTD4B3TZ8WTQNK01CC0V":3,"skill-same:01M784YTD4B3TZ8WTQNK01CC0V":63},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M784YTD4B3TZ8WTQNK01CC0V","tdd",null,"Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests.","mhrsdev\u002FAI-Agent-Skills-Library","mhrsdev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F297913466?v=4","01M784VR2WC3PFWGB33RB1EVF9","MHRS","01M784VR3WX1XAH7SX6R2QZ99R",7,"MIT","https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fcode-quality-testing\u002Fmattpocock-skills\u002Fskills\u002Fengineering\u002Ftdd\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tdd\ndescription: Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests.\n---\n\n# Test-Driven Development\n\n## Philosophy\n\n**Core principle**: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.\n\n**Good tests** are integration-style: they exercise real code paths through public APIs. They describe _what_ the system does, not _how_ it does it. A good test reads like a specification - \"user can checkout with valid cart\" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.\n\n**Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.\n\nSee [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.\n\n## Anti-Pattern: Horizontal Slices\n\n**DO NOT write all tests first, then all implementation.** This is \"horizontal slicing\" - treating RED as \"write all tests\" and GREEN as \"write all code.\"\n\nThis produces **crap tests**:\n\n- Tests written in bulk test _imagined_ behavior, not _actual_ behavior\n- You end up testing the _shape_ of things (data structures, function signatures) rather than user-facing behavior\n- Tests become insensitive to real changes - they pass when behavior breaks, fail when behavior is fine\n- You outrun your headlights, committing to test structure before understanding the implementation\n\n**Correct approach**: Vertical slices via tracer bullets. One test → one implementation → repeat. Each test responds to what you learned from the previous cycle. Because you just wrote the code, you know exactly what behavior matters and how to verify it.\n\n```\nWRONG (horizontal):\n  RED:   test1, test2, test3, test4, test5\n  GREEN: impl1, impl2, impl3, impl4, impl5\n\nRIGHT (vertical):\n  RED→GREEN: test1→impl1\n  RED→GREEN: test2→impl2\n  RED→GREEN: test3→impl3\n  ...\n```\n\n## Workflow\n\n### 1. Planning\n\nWhen exploring the codebase, read `CONTEXT.md` (if it exists) so that test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.\n\nBefore writing any code:\n\n- [ ] Confirm with user what interface changes are needed\n- [ ] Confirm with user which behaviors to test (prioritize)\n- [ ] Identify opportunities for deep modules (small interface, deep implementation) — run the `\u002Fcodebase-design` skill for the vocabulary and the testability checks\n- [ ] List the behaviors to test (not implementation steps)\n- [ ] Get user approval on the plan\n\nAsk: \"What should the public interface look like? Which behaviors are most important to test?\"\n\n**You can't test everything.** Confirm with the user exactly which behaviors matter most. Focus testing effort on critical paths and complex logic, not every possible edge case.\n\n### 2. Tracer Bullet\n\nWrite ONE test that confirms ONE thing about the system:\n\n```\nRED:   Write test for first behavior → test fails\nGREEN: Write minimal code to pass → test passes\n```\n\nThis is your tracer bullet - proves the path works end-to-end.\n\n### 3. Incremental Loop\n\nFor each remaining behavior:\n\n```\nRED:   Write next test → fails\nGREEN: Minimal code to pass → passes\n```\n\nRules:\n\n- One test at a time\n- Only enough code to pass current test\n- Don't anticipate future tests\n- Keep tests focused on observable behavior\n\n### 4. Refactor\n\nAfter all tests pass, look for [refactor candidates](refactoring.md):\n\n- [ ] Extract duplication\n- [ ] Deepen modules (move complexity behind simple interfaces)\n- [ ] Apply SOLID principles where natural\n- [ ] Consider what new code reveals about existing code\n- [ ] Run tests after each refactor step\n\n**Never refactor while RED.** Get to GREEN first.\n\n## Checklist Per Cycle\n\n```\n[ ] Test describes behavior, not implementation\n[ ] Test uses public interface only\n[ ] Test would survive internal refactor\n[ ] Code is minimal for this test\n[ ] No speculative features added\n```\n","# Test-Driven Development\n\n## Philosophy\n\n**Core principle**: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.\n\n**Good tests** are integration-style: they exercise real code paths through public APIs. They describe _what_ the system does, not _how_ it does it. A good test reads like a specification - \"user can checkout with valid cart\" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.\n\n**Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.\n\nSee [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.\n\n## Anti-Pattern: Horizontal Slices\n\n**DO NOT write all tests first, then all implementation.** This is \"horizontal slicing\" - treating RED as \"write all tests\" and GREEN as \"write all code.\"\n\nThis produces **crap tests**:\n\n- Tests written in bulk test _imagined_ behavior, not _actual_ behavior\n- You end up testing the _shape_ of things (data structures, function signatures) rather than user-facing behavior\n- Tests become insensitive to real changes - they pass when behavior breaks, fail when behavior is fine\n- You outrun your headlights, committing to test structure before understanding the implementation\n\n**Correct approach**: Vertical slices via tracer bullets. One test → one implementation → repeat. Each test responds to what you learned from the previous cycle. Because you just wrote the code, you know exactly what behavior matters and how to verify it.\n\n```\nWRONG (horizontal):\n  RED:   test1, test2, test3, test4, test5\n  GREEN: impl1, impl2, impl3, impl4, impl5\n\nRIGHT (vertical):\n  RED→GREEN: test1→impl1\n  RED→GREEN: test2→impl2\n  RED→GREEN: test3→impl3\n  ...\n```\n\n## Workflow\n\n### 1. Planning\n\nWhen exploring the codebase, read `CONTEXT.md` (if it exists) so that test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.\n\nBefore writing any code:\n\n- [ ] Confirm with user what interface changes are needed\n- [ ] Confirm with user which behaviors to test (prioritize)\n- [ ] Identify opportunities for deep modules (small interface, deep implementation) — run the `\u002Fcodebase-design` skill for the vocabulary and the testability checks\n- [ ] List the behaviors to test (not implementation steps)\n- [ ] Get user approval on the plan\n\nAsk: \"What should the public interface look like? Which behaviors are most important to test?\"\n\n**You can't test everything.** Confirm with the user exactly which behaviors matter most. Focus testing effort on critical paths and complex logic, not every possible edge case.\n\n### 2. Tracer Bullet\n\nWrite ONE test that confirms ONE thing about the system:\n\n```\nRED:   Write test for first behavior → test fails\nGREEN: Write minimal code to pass → test passes\n```\n\nThis is your tracer bullet - proves the path works end-to-end.\n\n### 3. Incremental Loop\n\nFor each remaining behavior:\n\n```\nRED:   Write next test → fails\nGREEN: Minimal code to pass → passes\n```\n\nRules:\n\n- One test at a time\n- Only enough code to pass current test\n- Don't anticipate future tests\n- Keep tests focused on observable behavior\n\n### 4. Refactor\n\nAfter all tests pass, look for [refactor candidates](refactoring.md):\n\n- [ ] Extract duplication\n- [ ] Deepen modules (move complexity behind simple interfaces)\n- [ ] Apply SOLID principles where natural\n- [ ] Consider what new code reveals about existing code\n- [ ] Run tests after each refactor step\n\n**Never refactor while RED.** Get to GREEN first.\n\n## Checklist Per Cycle\n\n```\n[ ] Test describes behavior, not implementation\n[ ] Test uses public interface only\n[ ] Test would survive internal refactor\n[ ] Code is minimal for this test\n[ ] No speculative features added\n```\n",{"name":5,"description":7},"main","6d80f3aba1c1dd6c29729d8e3019577b9411126c","organized-skills\u002Fcode-quality-testing\u002Fmattpocock-skills\u002Fskills\u002Fengineering\u002Ftdd",0,"https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library","https:\u002F\u002Fgithub.com\u002Fmhrsdev","2026-07-05 06:21:49",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add mhrsdev\u002FAI-Agent-Skills-Library --skill tdd",{"tool":37,"command":38},"bunx","bunx skills add mhrsdev\u002FAI-Agent-Skills-Library --skill tdd",{"tool":40,"command":41},"pnpm","pnpm dlx skills add mhrsdev\u002FAI-Agent-Skills-Library --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fcode-quality-testing\u002Fmattpocock-skills\u002Fskills\u002Fengineering\u002Ftdd\u002FSKILL.md",true,[45,51,55,59],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"mocking.md","REFERENCE","参考文档",1481,"https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fcode-quality-testing\u002Fmattpocock-skills\u002Fskills\u002Fengineering\u002Ftdd\u002Fmocking.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"README.md",2293,"https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fcode-quality-testing\u002Fmattpocock-skills\u002Fskills\u002Fengineering\u002Ftdd\u002FREADME.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"refactoring.md",387,"https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fcode-quality-testing\u002Fmattpocock-skills\u002Fskills\u002Fengineering\u002Ftdd\u002Frefactoring.md",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"tests.md",1640,"https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fcode-quality-testing\u002Fmattpocock-skills\u002Fskills\u002Fengineering\u002Ftdd\u002Ftests.md",[64,71,77,84,91,98],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M785CANS10KGVX2B6JHZ2QX5","static-project-gallery-upload","Use when a user provides project\u002Fportfolio\u002Fgallery images for a static website and wants them displayed on the site, exact duplicate images removed, visually related building views kept together, images optimized, and a host upload folder such as \"UP FILE\" prepared. Triggers include Persian requests like \"عکس پروژه ها\", \"تکراری نباشن\", \"توی سایت نمایش داده بشن\", \"فایل های هاست\", \"UP FILE\".","https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fwebsite-business-builds\u002Fstatic-project-gallery-upload\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":6,"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},"01M785C3S56JQ75Y4QTPZWH9PG","contact-location-section","https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fwebsite-business-builds\u002Fcontact-location-section\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},"01M785BWRPMZH26VQYVK3X4VY3","azerbaijan-website-build","Build premium tri-lingual websites from scratch for Azerbaijani businesses. Handles data gathering (website scrape, social media, or interview), brand development, and full Astro + Tailwind build with AZ\u002FRU\u002FEN language support.","https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fwebsite-business-builds\u002F07-azerbaijan-website-build\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},"01M785BMQ7C9QPACPTVEPZ4C4X","local-business-rebuild","Build a stunning new website for a local business prospect. Adapted from the full website-rebuild skill but optimized for speculative local business pitches. 10-phase process: brand extraction, SEO audit, design audit, rebuild plan, full build with design system, copy optimization, combined QA, pre-deploy checklist, and output to monorepo. Uses scraped content from prospect-scrape as input. No tools\u002Fcalculator research phase. Single combined QA round. Triggers on: \"rebuild prospect\", \"local business rebuild\", \"build prospect site\", \"rebuild their site\", \"prospect rebuild\", or any request to build a new website for a qualified prospect.","https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fwebsite-business-builds\u002F06-local-business-rebuild\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},"01M785BA38WMK2QEA9QBX3G201","website-rebuild","Full website rebuild agent. Takes an existing website URL and rebuilds it from scratch into a world-class, SEO-optimized, WCAG AA accessible, visually stunning website using Astro + Tailwind CSS, deployed to Vercel via GitHub. Executes a rigorous 14-phase process: brand extraction, content scraping, SEO audit, design audit, rebuild planning, full build with design system, copy optimization, 3 QA rounds, competitive tools research, tools build, tools QA, pre-deploy checklist, and Vercel deployment. Produces 11+ documentation deliverables. Triggers on: \"rebuild website\", \"redesign website\", \"rebuild site from URL\", \"website rebuild\", \"redo this website\", \"make this website better\", \"rebuild from scratch\", \"full site redesign\", or any request to take an existing URL and create a new, professional website from it. Also triggers when the user provides a URL and asks to build\u002Fcreate\u002Fdesign a new version of that site.","https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fwebsite-business-builds\u002F05-website-rebuild\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},"01M785B6YDMSVJ30MTW6QDPME9","triage","Move issues and external PRs through a state machine of triage roles — categorise, verify, grill if needed, and write agent-ready briefs.","https:\u002F\u002Fgithub.com\u002Fmhrsdev\u002FAI-Agent-Skills-Library\u002Fblob\u002Fmain\u002Forganized-skills\u002Fskill-authoring-meta\u002Ftriage\u002FSKILL.md",[],[]]