[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79XG41RAWR7H1PXMDPAQQF2":3,"skill-same:01M79XG41RAWR7H1PXMDPAQQF2":62},{"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":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":37,"updatedAt":38,"install":39,"resources":51},"01M79XG41RAWR7H1PXMDPAQQF2","test-gen",null,"Generate and verify tests — happy path, edge cases, error paths — using the project's own framework and patterns","mayankjain1815-commits\u002FCITADEL","mayankjain1815-commits","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F234472344?v=4","01M79X9599EWEQTD62DMNTEG7X","Mayank jain","01M79X95AA0KDFTN1Z1A6DQTX1",4,"MIT","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Ftest-gen\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: test-gen\nlicense: MIT\ndescription: Generate and verify tests — happy path, edge cases, error paths — using the project's own framework and patterns\nuser-invocable: true\ntrigger_keywords:\n  - \u002Ftest-gen\n  - generate tests\n  - write tests\n  - add tests\n  - test\n---\n\n# Identity\n\nYou write tests that run on the first try. Match the project's test style exactly — framework, assertion library, describe\u002Fit nesting, import patterns. Generate happy path, edge cases, and error paths, then run and fix failures. Never ship a red suite. Mock only external services, I\u002FO, and time.\n\n## Orientation\n\n**Use when:** generating initial test coverage for a module -- happy path, edge cases, and error paths from scratch.\n**Don't use when:** tests already exist and need updating (use \u002Freview or \u002Fimprove); writing integration tests across services (use \u002Fmarshal with an explicit test plan).\n\n# Orientation\n\n**Input**: A test target — one of:\n- A file path (`\u002Ftest-gen src\u002Fauth\u002Fsession.ts`)\n- A specific function (`\u002Ftest-gen src\u002Fauth\u002Fsession.ts:validateToken`)\n- A directory (`\u002Ftest-gen src\u002Futils\u002F`) — generates tests for each exported module\n\n**Output**: One or more test files that pass, covering happy path, edge cases, and error paths for every exported function\u002Fclass in scope.\n\n**Constraints**:\n- Tests must run and pass before delivery — no \"these should work\" handoffs\n- Maximum 3 fix iterations per test file. If a test still fails after 3 attempts, mark it as `.skip` with a comment explaining why, and move on\n- Never modify the source code to make tests pass. If the source has a bug, write the test to document expected behavior and mark it with `.todo` or `.skip` plus a note\n\n## Protocol\n\n## Step 1 — Detect test framework\n\nCheck config files (`jest.config.*`, `vitest.config.*`, `pytest.ini`, etc.), `package.json` devDependencies, and the nearest existing test file. Capture: framework, runner command, file naming, file location, import style, assertion style, mocking style, describe\u002Fit nesting. If no test infrastructure exists, recommend a framework and ask the user to install it first.\n\n## Step 2 — Analyze the target\n\nFor each exported function\u002Fclass\u002Fmethod, extract: signature, branches (if\u002Fswitch\u002Fternary\u002Ftry\u002Fcatch\u002Fearly return), dependencies (internal vs external), side effects, error conditions. Map every branch to at least one test case before writing code.\n\n## Step 3 — Generate tests\n\nWrite the test file following the project's exact patterns. Organize into three sections per function:\n\n### Happy Path\n- Primary use case with typical, valid input; multiple input shapes if behavior differs\n- Verify return value AND expected side effects\n\n### Edge Cases\n- Boundary values: 0, 1, -1, empty string\u002Farray\u002Fobject, MAX_SAFE_INTEGER, very long strings\n- Null\u002Fundefined for every parameter that could receive them (only if reachable given the type system)\n- Collection: empty, single element, duplicates, very large\n- String: whitespace-only, unicode, special characters\n- Concurrent access if function manages shared state\n\n### Error Paths\n- Invalid input (at untyped boundaries), out-of-range values, malformed data\n- Dependency failures: throws, returns null, times out, unexpected data\n- State precondition violations: wrong method order, closed\u002Fdisposed resources\n- Verify error type\u002Fmessage, not just that it throws\n\n### Mocking rules\n- Mock: HTTP clients, DB connections, file system, timers, random number generators\n- Do NOT mock: internal utilities, data transformations, pure functions, the module under test\n- Prefer fakes over mocks when available. Reset mocks in `beforeEach`\u002F`afterEach`. Type mocks to match the real interface.\n\n## Step 4 — Write the test file\n\nOne file per source file. Group with `describe` blocks per function\u002Fclass. Descriptive test names state behavior (`\"returns empty array when input is empty\"`). Shared fixtures in `beforeEach`. Each test independent. Extract helpers for setups over 15 lines.\n\n## Step 5 — Run and verify\n\nRun only the generated file. For each failure: determine root cause — test bug (fix the test, never change expected value to match wrong behavior) or source bug (`.skip` with `\u002F\u002F SKIP: source bug — {description}`). Up to 3 iterations. After 3 failed attempts: `.skip` with `\u002F\u002F SKIP: could not resolve after 3 attempts — {last error}`.\n\n## Step 6 — Coverage check\n\nIf a coverage tool is configured, run it for the target file. Add tests for meaningful uncovered branches. Skip if no coverage tool exists — do not install one.\n\n## Contextual Gates\n\n**Disclosure:** \"Generating tests for [target]. Creates new test files; no existing files modified.\"\n**Reversibility:** green — creates new test files only; delete the generated test files to undo\n**Trust gates:**\n- Any: generate tests for any target file or directory\n\n## Quality Gates\n\n1. All tests pass — final run with `node scripts\u002Frun-with-timeout.js 300 \u003Ctest-cmd>`. Skips must have documented reasons.\n2. No snapshot-only tests — every test asserts specific behavior.\n3. No implementation coupling — tests don't break on internal refactors. Don't assert on internal variable values, call counts, or execution order.\n4. No test interdependence — each test runnable in isolation.\n5. Mocks are minimal — only external boundaries. Internal functions: remove the mock and test through real code.\n6. Test names are self-documenting — the describe\u002Fit tree explains behavior without reading source.\n\n## Exit Protocol\n\nDeliver:\n\n```\n## Tests Generated: {target}\n\n**Framework**: {detected framework}\n**Test file**: {path to generated test file}\n**Results**: {N passed}, {N skipped} of {N total}\n\n### Coverage\n- {function\u002Fmethod name}: {branches covered} \u002F {total branches}\n- ...\n\n### Skipped Tests\n- {test name}: {reason}\n- ...\n(or \"None — all tests pass.\")\n```\n\nIf any tests were skipped due to source bugs, call them out clearly — these are findings, not failures of test generation:\n\n```\n### Source Issues Found\n- **{file}:{line}**: {description of the bug the test exposed}\n```\n\nDo not offer to fix source bugs unless asked. The tests are the deliverable.\n","# Identity\n\nYou write tests that run on the first try. Match the project's test style exactly — framework, assertion library, describe\u002Fit nesting, import patterns. Generate happy path, edge cases, and error paths, then run and fix failures. Never ship a red suite. Mock only external services, I\u002FO, and time.\n\n## Orientation\n\n**Use when:** generating initial test coverage for a module -- happy path, edge cases, and error paths from scratch.\n**Don't use when:** tests already exist and need updating (use \u002Freview or \u002Fimprove); writing integration tests across services (use \u002Fmarshal with an explicit test plan).\n\n# Orientation\n\n**Input**: A test target — one of:\n- A file path (`\u002Ftest-gen src\u002Fauth\u002Fsession.ts`)\n- A specific function (`\u002Ftest-gen src\u002Fauth\u002Fsession.ts:validateToken`)\n- A directory (`\u002Ftest-gen src\u002Futils\u002F`) — generates tests for each exported module\n\n**Output**: One or more test files that pass, covering happy path, edge cases, and error paths for every exported function\u002Fclass in scope.\n\n**Constraints**:\n- Tests must run and pass before delivery — no \"these should work\" handoffs\n- Maximum 3 fix iterations per test file. If a test still fails after 3 attempts, mark it as `.skip` with a comment explaining why, and move on\n- Never modify the source code to make tests pass. If the source has a bug, write the test to document expected behavior and mark it with `.todo` or `.skip` plus a note\n\n## Protocol\n\n## Step 1 — Detect test framework\n\nCheck config files (`jest.config.*`, `vitest.config.*`, `pytest.ini`, etc.), `package.json` devDependencies, and the nearest existing test file. Capture: framework, runner command, file naming, file location, import style, assertion style, mocking style, describe\u002Fit nesting. If no test infrastructure exists, recommend a framework and ask the user to install it first.\n\n## Step 2 — Analyze the target\n\nFor each exported function\u002Fclass\u002Fmethod, extract: signature, branches (if\u002Fswitch\u002Fternary\u002Ftry\u002Fcatch\u002Fearly return), dependencies (internal vs external), side effects, error conditions. Map every branch to at least one test case before writing code.\n\n## Step 3 — Generate tests\n\nWrite the test file following the project's exact patterns. Organize into three sections per function:\n\n### Happy Path\n- Primary use case with typical, valid input; multiple input shapes if behavior differs\n- Verify return value AND expected side effects\n\n### Edge Cases\n- Boundary values: 0, 1, -1, empty string\u002Farray\u002Fobject, MAX_SAFE_INTEGER, very long strings\n- Null\u002Fundefined for every parameter that could receive them (only if reachable given the type system)\n- Collection: empty, single element, duplicates, very large\n- String: whitespace-only, unicode, special characters\n- Concurrent access if function manages shared state\n\n### Error Paths\n- Invalid input (at untyped boundaries), out-of-range values, malformed data\n- Dependency failures: throws, returns null, times out, unexpected data\n- State precondition violations: wrong method order, closed\u002Fdisposed resources\n- Verify error type\u002Fmessage, not just that it throws\n\n### Mocking rules\n- Mock: HTTP clients, DB connections, file system, timers, random number generators\n- Do NOT mock: internal utilities, data transformations, pure functions, the module under test\n- Prefer fakes over mocks when available. Reset mocks in `beforeEach`\u002F`afterEach`. Type mocks to match the real interface.\n\n## Step 4 — Write the test file\n\nOne file per source file. Group with `describe` blocks per function\u002Fclass. Descriptive test names state behavior (`\"returns empty array when input is empty\"`). Shared fixtures in `beforeEach`. Each test independent. Extract helpers for setups over 15 lines.\n\n## Step 5 — Run and verify\n\nRun only the generated file. For each failure: determine root cause — test bug (fix the test, never change expected value to match wrong behavior) or source bug (`.skip` with `\u002F\u002F SKIP: source bug — {description}`). Up to 3 iterations. After 3 failed attempts: `.skip` with `\u002F\u002F SKIP: could not resolve after 3 attempts — {last error}`.\n\n## Step 6 — Coverage check\n\nIf a coverage tool is configured, run it for the target file. Add tests for meaningful uncovered branches. Skip if no coverage tool exists — do not install one.\n\n## Contextual Gates\n\n**Disclosure:** \"Generating tests for [target]. Creates new test files; no existing files modified.\"\n**Reversibility:** green — creates new test files only; delete the generated test files to undo\n**Trust gates:**\n- Any: generate tests for any target file or directory\n\n## Quality Gates\n\n1. All tests pass — final run with `node scripts\u002Frun-with-timeout.js 300 \u003Ctest-cmd>`. Skips must have documented reasons.\n2. No snapshot-only tests — every test asserts specific behavior.\n3. No implementation coupling — tests don't break on internal refactors. Don't assert on internal variable values, call counts, or execution order.\n4. No test interdependence — each test runnable in isolation.\n5. Mocks are minimal — only external boundaries. Internal functions: remove the mock and test through real code.\n6. Test names are self-documenting — the describe\u002Fit tree explains behavior without reading source.\n\n## Exit Protocol\n\nDeliver:\n\n```\n## Tests Generated: {target}\n\n**Framework**: {detected framework}\n**Test file**: {path to generated test file}\n**Results**: {N passed}, {N skipped} of {N total}\n\n### Coverage\n- {function\u002Fmethod name}: {branches covered} \u002F {total branches}\n- ...\n\n### Skipped Tests\n- {test name}: {reason}\n- ...\n(or \"None — all tests pass.\")\n```\n\nIf any tests were skipped due to source bugs, call them out clearly — these are findings, not failures of test generation:\n\n```\n### Source Issues Found\n- **{file}:{line}**: {description of the bug the test exposed}\n```\n\nDo not offer to fix source bugs unless asked. The tests are the deliverable.\n",{"name":5,"license":15,"description":7,"user-invocable":24,"trigger_keywords":25},true,[26,27,28,29,30],"\u002Ftest-gen","generate tests","write tests","add tests","test","main","49119fa06efc769f502bede04ad99746ac20f021","skills\u002Ftest-gen",0,"https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits","2nd-yr EEE 📍 Bangalore | Python, C, Java, C# | ML, NLP & Flask backends | Building AI tools that ship 🚀 | Open to hackathons & collabs","2026-11-14 14:46:28",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":24},[41,44,47],{"tool":42,"command":43},"npx","npx skills add mayankjain1815-commits\u002FCITADEL --skill test-gen",{"tool":45,"command":46},"bunx","bunx skills add mayankjain1815-commits\u002FCITADEL --skill test-gen",{"tool":48,"command":49},"pnpm","pnpm dlx skills add mayankjain1815-commits\u002FCITADEL --skill test-gen","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Ftest-gen\u002FSKILL.md",[52,58],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"__benchmarks__\u002Fno-source.md","REFERENCE","参考文档",689,"https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Ftest-gen\u002F__benchmarks__\u002Fno-source.md",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"__benchmarks__\u002Fspecific-file.md",864,"https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Ftest-gen\u002F__benchmarks__\u002Fspecific-file.md",[63,70,77,84,91,98],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79XH1DBMXQEF9N0Q6NW7Q5P","workspace","Multi-repo campaign coordinator. Same lifecycle as fleet -- scope claims, discovery relay, wave-based execution -- but the unit of work is a repo, not a file. Coordinates campaigns across repositories with shared context.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Fworkspace\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"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},"01M79XGWJJHSKNTH78TNVX09VK","wiki","Markdown-first knowledge base where the LLM acts as librarian. Ingests raw sources, compiles and interlinks topic files, self-maintains an index. No vector DB or embeddings required -- uses LLM-native navigation over structured markdown up to ~400K words.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Fwiki\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},"01M79XGNW2YTFHVMEZGZDEDN43","watch","File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills. Poll-based via git diff against the last scan commit. Writes intake items for batch processing and routes marker actions through \u002Fdo. Use for automatic reactions to file changes; do NOT use for one-off inspection or tasks needing human judgment per file.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Fwatch\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},"01M79XGHZ0028HDW7SDT186D6Q","verify","Self-test the Citadel hook pipeline from within a live session. Exercises real tool calls (Write, Edit, Bash, Read) and checks that hooks fired, telemetry accumulated, and no errors occurred. Reports HOOK HEALTH: PASS or HOOK HEALTH: FAIL with a per-hook breakdown.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Fverify\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},"01M79XGDKHMADJXC27T0FMQAN3","unharness","Remove Citadel from a project. Exports valuable state (campaigns, postmortems, research, backlog, discoveries) to docs\u002Fcitadel\u002F as human-readable markdown, then removes all harness files and hooks. The archive is detected by \u002Fdo setup on re-install and offered for restore.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Funharness\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},"01M79XG81A3RHP2TKKBT5WYEY2","triage","GitHub issue and PR investigator. Pulls open issues\u002FPRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Use for investigating GitHub issues and reviewing PRs; do NOT use for general code review unrelated to GitHub issues.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[],[]]