[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75BPCEQWHZ1BVDA19X17A84":3,"skill-same:01M75BPCEQWHZ1BVDA19X17A84":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M75BPCEQWHZ1BVDA19X17A84","api-test-suite-builder",null,"Use when the user asks to generate API tests, create integration test suites, test REST endpoints, or build contract tests.","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fapi-test-suite-builder\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: \"api-test-suite-builder\"\ndescription: \"Use when the user asks to generate API tests, create integration test suites, test REST endpoints, or build contract tests.\"\n---\n\n# API Test Suite Builder\n\n**Tier:** POWERFUL\n**Category:** Engineering\n**Domain:** Testing \u002F API Quality\n\n---\n\n## Overview\n\nScans API route definitions across frameworks (Next.js App Router, Express, FastAPI, Django REST) and\nauto-generates comprehensive test suites covering auth, input validation, error codes, pagination, file\nuploads, and rate limiting. Outputs ready-to-run test files for Vitest+Supertest (Node) or Pytest+httpx\n(Python).\n\n---\n\n## Core Capabilities\n\n- **Route detection** — scan source files to extract all API endpoints\n- **Auth coverage** — valid\u002Finvalid\u002Fexpired tokens, missing auth header\n- **Input validation** — missing fields, wrong types, boundary values, injection attempts\n- **Error code matrix** — 400\u002F401\u002F403\u002F404\u002F422\u002F500 for each route\n- **Pagination** — first\u002Flast\u002Fempty\u002Foversized pages\n- **File uploads** — valid, oversized, wrong MIME type, empty\n- **Rate limiting** — burst detection, per-user vs global limits\n\n---\n\n## When to Use\n\n- New API added — generate test scaffold before writing implementation (TDD)\n- Legacy API with no tests — scan and generate baseline coverage\n- API contract review — verify existing tests match current route definitions\n- Pre-release regression check — ensure all routes have at least smoke tests\n- Security audit prep — generate adversarial input tests\n\n---\n\n## Route Detection\n\n### Next.js App Router\n```bash\n# Find all route handlers\nfind .\u002Fapp\u002Fapi -name \"route.ts\" -o -name \"route.js\" | sort\n\n# Extract HTTP methods from each route file\ngrep -rn \"export async function\\|export function\" app\u002Fapi\u002F**\u002Froute.ts | \\\n  grep -oE \"(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\" | sort -u\n\n# Full route map\nfind .\u002Fapp\u002Fapi -name \"route.ts\" | while read f; do\n  route=$(echo $f | sed 's|.\u002Fapp||' | sed 's|\u002Froute.ts||')\n  methods=$(grep -oE \"export (async )?function (GET|POST|PUT|PATCH|DELETE)\" \"$f\" | \\\n    grep -oE \"(GET|POST|PUT|PATCH|DELETE)\")\n  echo \"$methods $route\"\ndone\n```\n\n### Express\n```bash\n# Find all router files\nfind .\u002Fsrc -name \"*.ts\" -o -name \"*.js\" | xargs grep -l \"router\\.\\(get\\|post\\|put\\|delete\\|patch\\)\" 2>\u002Fdev\u002Fnull\n\n# Extract routes with line numbers\ngrep -rn \"router\\.\\(get\\|post\\|put\\|delete\\|patch\\)\\|app\\.\\(get\\|post\\|put\\|delete\\|patch\\)\" \\\n  src\u002F --include=\"*.ts\" | grep -oE \"(get|post|put|delete|patch)\\(['\\\"][^'\\\"]*['\\\"]\"\n\n# Generate route map\ngrep -rn \"router\\.\\|app\\.\" src\u002F --include=\"*.ts\" | \\\n  grep -oE \"\\.(get|post|put|delete|patch)\\(['\\\"][^'\\\"]+['\\\"]\" | \\\n  sed \"s\u002F\\.\\(.*\\)('\\(.*\\)'\u002F\\U\\1 \\2\u002F\"\n```\n\n### FastAPI\n```bash\n# Find all route decorators\ngrep -rn \"@app\\.\\|@router\\.\" . --include=\"*.py\" | \\\n  grep -E \"@(app|router)\\.(get|post|put|delete|patch)\"\n\n# Extract with path and function name\ngrep -rn \"@\\(app\\|router\\)\\.\\(get\\|post\\|put\\|delete\\|patch\\)\" . --include=\"*.py\" | \\\n  grep -oE \"@(app|router)\\.(get|post|put|delete|patch)\\(['\\\"][^'\\\"]*['\\\"]\"\n```\n\n### Django REST Framework\n```bash\n# urlpatterns extraction\ngrep -rn \"path\\|re_path\\|url(\" . --include=\"*.py\" | grep \"urlpatterns\" -A 50 | \\\n  grep -E \"path\\(['\\\"]\" | grep -oE \"['\\\"][^'\\\"]+['\\\"]\" | head -40\n\n# ViewSet router registration\ngrep -rn \"router\\.register\\|DefaultRouter\\|SimpleRouter\" . --include=\"*.py\"\n```\n\n---\n\n## Test Generation Patterns\n\n### Auth Test Matrix\n\nFor every authenticated endpoint, generate:\n\n| Test Case | Expected Status |\n|-----------|----------------|\n| No Authorization header | 401 |\n| Invalid token format | 401 |\n| Valid token, wrong user role | 403 |\n| Expired JWT token | 401 |\n| Valid token, correct role | 2xx |\n| Token from deleted user | 401 |\n\n### Input Validation Matrix\n\nFor every POST\u002FPUT\u002FPATCH endpoint with a request body:\n\n| Test Case | Expected Status |\n|-----------|----------------|\n| Empty body `{}` | 400 or 422 |\n| Missing required fields (one at a time) | 400 or 422 |\n| Wrong type (string where int expected) | 400 or 422 |\n| Boundary: value at min-1 | 400 or 422 |\n| Boundary: value at min | 2xx |\n| Boundary: value at max | 2xx |\n| Boundary: value at max+1 | 400 or 422 |\n| SQL injection in string field | 400 or 200 (sanitized) |\n| XSS payload in string field | 400 or 200 (sanitized) |\n| Null values for required fields | 400 or 422 |\n\n---\n\n## Example Test Files\n→ See references\u002Fexample-test-files.md for details\n\n## Generating Tests from Route Scan\n\nWhen given a codebase, follow this process:\n\n1. **Scan routes** using the detection commands above\n2. **Read each route handler** to understand:\n   - Expected request body schema\n   - Auth requirements (middleware, decorators)\n   - Return types and status codes\n   - Business rules (ownership, role checks)\n3. **Generate test file** per route group using the patterns above\n4. **Name tests descriptively**: `\"returns 401 when token is expired\"` not `\"auth test 3\"`\n5. **Use factories\u002Ffixtures** for test data — never hardcode IDs\n6. **Assert response shape**, not just status code\n\n---\n\n## Common Pitfalls\n\n- **Testing only happy paths** — 80% of bugs live in error paths; test those first\n- **Hardcoded test data IDs** — use factories\u002Ffixtures; IDs change between environments\n- **Shared state between tests** — always clean up in afterEach\u002FafterAll\n- **Testing implementation, not behavior** — test what the API returns, not how it does it\n- **Missing boundary tests** — off-by-one errors are extremely common in pagination and limits\n- **Not testing token expiry** — expired tokens behave differently from invalid ones\n- **Ignoring Content-Type** — test that API rejects wrong content types (xml when json expected)\n\n---\n\n## Best Practices\n\n1. One describe block per endpoint — keeps failures isolated and readable\n2. Seed minimal data — don't load the entire DB; create only what the test needs\n3. Use `beforeAll` for shared setup, `afterAll` for cleanup — not `beforeEach` for expensive ops\n4. Assert specific error messages\u002Ffields, not just status codes\n5. Test that sensitive fields (password, secret) are never in responses\n6. For auth tests, always test the \"missing header\" case separately from \"invalid token\"\n7. Add rate limit tests last — they can interfere with other test suites if run in parallel\n","# API Test Suite Builder\n\n**Tier:** POWERFUL\n**Category:** Engineering\n**Domain:** Testing \u002F API Quality\n\n---\n\n## Overview\n\nScans API route definitions across frameworks (Next.js App Router, Express, FastAPI, Django REST) and\nauto-generates comprehensive test suites covering auth, input validation, error codes, pagination, file\nuploads, and rate limiting. Outputs ready-to-run test files for Vitest+Supertest (Node) or Pytest+httpx\n(Python).\n\n---\n\n## Core Capabilities\n\n- **Route detection** — scan source files to extract all API endpoints\n- **Auth coverage** — valid\u002Finvalid\u002Fexpired tokens, missing auth header\n- **Input validation** — missing fields, wrong types, boundary values, injection attempts\n- **Error code matrix** — 400\u002F401\u002F403\u002F404\u002F422\u002F500 for each route\n- **Pagination** — first\u002Flast\u002Fempty\u002Foversized pages\n- **File uploads** — valid, oversized, wrong MIME type, empty\n- **Rate limiting** — burst detection, per-user vs global limits\n\n---\n\n## When to Use\n\n- New API added — generate test scaffold before writing implementation (TDD)\n- Legacy API with no tests — scan and generate baseline coverage\n- API contract review — verify existing tests match current route definitions\n- Pre-release regression check — ensure all routes have at least smoke tests\n- Security audit prep — generate adversarial input tests\n\n---\n\n## Route Detection\n\n### Next.js App Router\n```bash\n# Find all route handlers\nfind .\u002Fapp\u002Fapi -name \"route.ts\" -o -name \"route.js\" | sort\n\n# Extract HTTP methods from each route file\ngrep -rn \"export async function\\|export function\" app\u002Fapi\u002F**\u002Froute.ts | \\\n  grep -oE \"(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\" | sort -u\n\n# Full route map\nfind .\u002Fapp\u002Fapi -name \"route.ts\" | while read f; do\n  route=$(echo $f | sed 's|.\u002Fapp||' | sed 's|\u002Froute.ts||')\n  methods=$(grep -oE \"export (async )?function (GET|POST|PUT|PATCH|DELETE)\" \"$f\" | \\\n    grep -oE \"(GET|POST|PUT|PATCH|DELETE)\")\n  echo \"$methods $route\"\ndone\n```\n\n### Express\n```bash\n# Find all router files\nfind .\u002Fsrc -name \"*.ts\" -o -name \"*.js\" | xargs grep -l \"router\\.\\(get\\|post\\|put\\|delete\\|patch\\)\" 2>\u002Fdev\u002Fnull\n\n# Extract routes with line numbers\ngrep -rn \"router\\.\\(get\\|post\\|put\\|delete\\|patch\\)\\|app\\.\\(get\\|post\\|put\\|delete\\|patch\\)\" \\\n  src\u002F --include=\"*.ts\" | grep -oE \"(get|post|put|delete|patch)\\(['\\\"][^'\\\"]*['\\\"]\"\n\n# Generate route map\ngrep -rn \"router\\.\\|app\\.\" src\u002F --include=\"*.ts\" | \\\n  grep -oE \"\\.(get|post|put|delete|patch)\\(['\\\"][^'\\\"]+['\\\"]\" | \\\n  sed \"s\u002F\\.\\(.*\\)('\\(.*\\)'\u002F\\U\\1 \\2\u002F\"\n```\n\n### FastAPI\n```bash\n# Find all route decorators\ngrep -rn \"@app\\.\\|@router\\.\" . --include=\"*.py\" | \\\n  grep -E \"@(app|router)\\.(get|post|put|delete|patch)\"\n\n# Extract with path and function name\ngrep -rn \"@\\(app\\|router\\)\\.\\(get\\|post\\|put\\|delete\\|patch\\)\" . --include=\"*.py\" | \\\n  grep -oE \"@(app|router)\\.(get|post|put|delete|patch)\\(['\\\"][^'\\\"]*['\\\"]\"\n```\n\n### Django REST Framework\n```bash\n# urlpatterns extraction\ngrep -rn \"path\\|re_path\\|url(\" . --include=\"*.py\" | grep \"urlpatterns\" -A 50 | \\\n  grep -E \"path\\(['\\\"]\" | grep -oE \"['\\\"][^'\\\"]+['\\\"]\" | head -40\n\n# ViewSet router registration\ngrep -rn \"router\\.register\\|DefaultRouter\\|SimpleRouter\" . --include=\"*.py\"\n```\n\n---\n\n## Test Generation Patterns\n\n### Auth Test Matrix\n\nFor every authenticated endpoint, generate:\n\n| Test Case | Expected Status |\n|-----------|----------------|\n| No Authorization header | 401 |\n| Invalid token format | 401 |\n| Valid token, wrong user role | 403 |\n| Expired JWT token | 401 |\n| Valid token, correct role | 2xx |\n| Token from deleted user | 401 |\n\n### Input Validation Matrix\n\nFor every POST\u002FPUT\u002FPATCH endpoint with a request body:\n\n| Test Case | Expected Status |\n|-----------|----------------|\n| Empty body `{}` | 400 or 422 |\n| Missing required fields (one at a time) | 400 or 422 |\n| Wrong type (string where int expected) | 400 or 422 |\n| Boundary: value at min-1 | 400 or 422 |\n| Boundary: value at min | 2xx |\n| Boundary: value at max | 2xx |\n| Boundary: value at max+1 | 400 or 422 |\n| SQL injection in string field | 400 or 200 (sanitized) |\n| XSS payload in string field | 400 or 200 (sanitized) |\n| Null values for required fields | 400 or 422 |\n\n---\n\n## Example Test Files\n→ See references\u002Fexample-test-files.md for details\n\n## Generating Tests from Route Scan\n\nWhen given a codebase, follow this process:\n\n1. **Scan routes** using the detection commands above\n2. **Read each route handler** to understand:\n   - Expected request body schema\n   - Auth requirements (middleware, decorators)\n   - Return types and status codes\n   - Business rules (ownership, role checks)\n3. **Generate test file** per route group using the patterns above\n4. **Name tests descriptively**: `\"returns 401 when token is expired\"` not `\"auth test 3\"`\n5. **Use factories\u002Ffixtures** for test data — never hardcode IDs\n6. **Assert response shape**, not just status code\n\n---\n\n## Common Pitfalls\n\n- **Testing only happy paths** — 80% of bugs live in error paths; test those first\n- **Hardcoded test data IDs** — use factories\u002Ffixtures; IDs change between environments\n- **Shared state between tests** — always clean up in afterEach\u002FafterAll\n- **Testing implementation, not behavior** — test what the API returns, not how it does it\n- **Missing boundary tests** — off-by-one errors are extremely common in pagination and limits\n- **Not testing token expiry** — expired tokens behave differently from invalid ones\n- **Ignoring Content-Type** — test that API rejects wrong content types (xml when json expected)\n\n---\n\n## Best Practices\n\n1. One describe block per endpoint — keeps failures isolated and readable\n2. Seed minimal data — don't load the entire DB; create only what the test needs\n3. Use `beforeAll` for shared setup, `afterAll` for cleanup — not `beforeEach` for expensive ops\n4. Assert specific error messages\u002Ffields, not just status codes\n5. Test that sensitive fields (password, secret) are never in responses\n6. For auth tests, always test the \"missing header\" case separately from \"invalid token\"\n7. Add rate limit tests last — they can interfere with other test suites if run in parallel\n",{"name":5,"description":7},"main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Fapi-test-suite-builder",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add agisota\u002Fold-one --skill api-test-suite-builder",{"tool":38,"command":39},"bunx","bunx skills add agisota\u002Fold-one --skill api-test-suite-builder",{"tool":41,"command":42},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill api-test-suite-builder","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fapi-test-suite-builder\u002FSKILL.md",true,[],[47,54,61,70,77,84],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":65,"licenseFileUrl":66,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]