[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AWD1MBW64B98A9KG3AGMR2":3,"skill-same:01M7AWD1MBW64B98A9KG3AGMR2":45},{"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":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7AWD1MBW64B98A9KG3AGMR2","nim-defect-analysis",null,"Find reliability and security defects in Nim code. Use when reviewing Nim source for bugs, auditing parsers or protocol handlers for crashes, checking FFI or ownership code for memory safety, or reducing false positives in code review findings.","Vyrnexis\u002Fnim-agent-template","Vyrnexis","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F315210836?v=4","01M7AWARQX2P2CQ25GD7S71DHH","01M7AWARRJ3WF9DRPNJ6S1W9CG",5,"MIT","https:\u002F\u002Fgithub.com\u002FVyrnexis\u002Fnim-agent-template\u002Fblob\u002Fmain\u002Fskills\u002Fnim-defect-analysis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nim-defect-analysis\ndescription: Find reliability and security defects in Nim code. Use when reviewing Nim source for bugs, auditing parsers or protocol handlers for crashes, checking FFI or ownership code for memory safety, or reducing false positives in code review findings.\n---\n\n# Nim Defect Analysis\n\nA finding is real when you can demonstrate it; until then it is a hypothesis. Focus on finding and confirming defects, not on elaborate triage mechanics.\n\n# Rules\n\n## Look Broadly\n\nReview the code for correctness and reliability defects. Do not restrict\nattention to a fixed checklist of patterns or API names. Common bug sites\ninclude:\n\n- parsing, decoding, deserialization, and any external input handling\n- indexing, slicing, integer arithmetic, and size conversions\n- allocation and accumulation in `string`, `seq`, buffers, tables, and queues\n- async I\u002FO, cancellation, shared state, and callbacks\n- C FFI, `ptr`, `cstring`, `cast`, `{.emit.}`, manual allocation\n- custom `=destroy`, `=copy`, `=dup`, `=sink`, and `=wasMoved`\n- exception boundaries where `Defect` may escape `CatchableError` handlers\n- logic errors, off-by-one, wrong conditions, missing cases\n\nThis list is illustrative, not exhaustive. If something looks wrong, investigate\nit regardless of whether it matches a known pattern.\n\n## Search Efficiently\n\nUse `rg` to locate risky operations quickly — parsing functions, allocation,\npointer operations, casts, FFI imports, ownership hooks. But also read the code\nto understand its logic. Many bugs are logic errors that no pattern search will\nfind.\n\n## Trace Across Function Boundaries\n\nMost false positives and false negatives come from incomplete cross-function\nreasoning. Do not stop at the function where a risky operation sits.\n\nWhen a function calls another function with external input:\n\n- Read the callee. Does it validate, bounds-check, or truncate the input?\n- Check what the callee returns. Does it return a consumed length, a partial\n  result, or an error code the caller might ignore?\n- Trace the data path through every intermediate function, not just the entry\n  point and the crash site.\n- Read type definitions and `when defined(...)` branches that affect the path.\n\nIf you cannot trace the full path from input to failure, you do not have a\ncomplete trace. Say so and mark the finding `SUSPECTED`.\n\n## Classify By Evidence, Not Feelings\n\nUse four classes. They describe what you have done, not how confident you feel.\n\n| Class | Means |\n|---|---|\n| `CONFIRMED` | A reproducer, sanitizer, or test demonstrates the failure. |\n| `TRACED` | Complete static trace from external input to the failure, but no reproducer yet. |\n| `SUSPECTED` | Partial trace or unclear control flow. Something looks wrong but the path is not fully verified. |\n| `FALSE_POSITIVE` | A guard, type constraint, catch boundary, or unreachable path blocks the issue. |\n\nDo not assign numbers. Do not invent probability or confidence scores. State\nwhat you found and what evidence you have.\n\n## Test Guards, Do Not Debate Them\n\nIf you are unsure whether a guard blocks a path, write a reproducer that tests\nit. Do not spend time reasoning about whether a guard is sufficient when a\nthree-line test can settle it.\n\nCommon guard questions a reproducer can answer:\n\n- Does `except CatchableError` catch this exception? `Defect` subclasses\n  (`IndexDefect`, `OverflowDefect`, `AssertionDefect`) are not caught by it.\n- Does `-d:danger` change the behavior? `assert` and range checks are disabled;\n  `doAssert` remains active.\n- Does a bounds check, limit, range conversion, or parser guard actually block\n  the input shape you are testing?\n- Does a consumed-length parser leave trailing input unvalidated?\n\n## Use Compiler And Runtime As Primary Evidence\n\nCompiler output, runtime behavior, and sanitizer reports are stronger evidence\nthan pure reasoning. The hybrid approach — use tools, then reason about their\noutput — produces fewer false positives than reasoning alone.\n\nBuild and run reproducers with `nim c -r`. Use `doAssert` for assertions, not\n`assert` — `assert` is compiled out under `-d:danger`.\n\nDefault build:\n\n```bash\nnim c -r repro.nim\n```\n\nAdditional modes when the bug depends on them:\n\n```bash\nnim c --panics:on -r repro.nim        # Defect termination behavior\nnim c -d:danger -r repro.nim          # Overflow and assertion behavior\nnim c --mm:arc -r repro.nim           # Ownership and hook behavior\n```\n\nSanitizers for unsafe memory, FFI, or manual allocation:\n\n```bash\nnim c --cc:clang -g -d:noSignalHandler -d:useMalloc \\\n  --passC:\"-fsanitize=address,undefined -fno-omit-frame-pointer\" \\\n  --passL:\"-fsanitize=address,undefined -fno-omit-frame-pointer\" \\\n  -r repro.nim\n```\n\n`useMalloc` exposes Nim allocations to ASan. `noSignalHandler` lets ASan report\nsignal-based crashes.\n\n## Check For Guards\n\nBefore reporting, verify whether the path is actually reachable:\n\n- Does external input reach the defect site?\n- Is there a bounds check, limit, range type, or parser guard?\n- Does a `catch` boundary catch the exception? `Defect` subclasses\n  (`IndexDefect`, `OverflowDefect`, `AssertionDefect`) are not caught by\n  `except CatchableError`.\n- Does `-d:danger` change the behavior?\n- Are there `when defined(...)` branches that affect the path?\n- For parser defects: check whether functions that return a consumed length\n  leave trailing input unvalidated.\n- For FFI defects: check pointer lifetime, nullability, struct layout, calling\n  convention, and string ownership.\n- For ownership-hook defects: check move-after-destroy, self-copy, zero-length\n  allocation, and destroy-after-move.\n\nIf a guard blocks the path, report `FALSE_POSITIVE` with the blocking line.\n\n## Report Concisely\n\nEach finding needs:\n\n- file and line\n- what is wrong\n- how input reaches it\n- expected vs actual behavior\n- evidence: reproducer command and output for `CONFIRMED`, complete static\n  trace for `TRACED`, partial trace and what is missing for `SUSPECTED`,\n  blocking guard for `FALSE_POSITIVE`\n- remediation direction\n\nKeep the report short. Prefer a few well-evidenced findings over many\nspeculative ones.\n\n# Workflow\n\n1. **Read the code.** Understand what it does, where input enters, and where\n   sensitive operations happen. Read callee functions and type definitions, not\n   just the entry point. Look for anything that could go wrong.\n2. **Trace candidate defects.** For each suspicious site, trace the full path\n   from input to the operation across function boundaries. Check for guards\n   along the way. If you cannot complete the trace, mark it `SUSPECTED` and say\n   what is missing.\n3. **Write a minimal reproducer.** Confirm the bug with the smallest possible\n   input. If a guard's sufficiency is unclear, test it with a reproducer\n   instead of debating it. If you cannot reproduce a traced finding, keep it as\n   `TRACED` and state what is missing.\n4. **Report.** List `CONFIRMED` findings with reproducer evidence, `TRACED`\n   findings with their complete static traces, `SUSPECTED` findings with what\n   is missing, and `FALSE_POSITIVE` findings with the blocking guard.\n\n# Common Mistakes\n\n| Mistake | Why it is wrong |\n|---|---|\n| Marking a source-only claim `CONFIRMED` | Confirmation requires executable evidence. |\n| Stopping the trace at the function with the risky API | Most false positives come from not reading callees and cross-function data flow. |\n| Debating whether a guard blocks a path instead of testing it | A three-line reproducer settles it faster and more reliably. |\n| Reporting a risky API call without a reachable path | API presence is not a defect. |\n| Ignoring `Defect` vs `CatchableError` | `IndexDefect`, `OverflowDefect`, and `AssertionDefect` escape ordinary handlers. |\n| Treating `assert` as a reliable guard | `assert` is compiled out in `-d:danger`; use `doAssert` in tests. |\n| Assigning numerical confidence scores | Numbers add false precision without improving the analysis. |\n\n## References\n\nNo reference files.\n","# Nim Defect Analysis\n\nA finding is real when you can demonstrate it; until then it is a hypothesis. Focus on finding and confirming defects, not on elaborate triage mechanics.\n\n# Rules\n\n## Look Broadly\n\nReview the code for correctness and reliability defects. Do not restrict\nattention to a fixed checklist of patterns or API names. Common bug sites\ninclude:\n\n- parsing, decoding, deserialization, and any external input handling\n- indexing, slicing, integer arithmetic, and size conversions\n- allocation and accumulation in `string`, `seq`, buffers, tables, and queues\n- async I\u002FO, cancellation, shared state, and callbacks\n- C FFI, `ptr`, `cstring`, `cast`, `{.emit.}`, manual allocation\n- custom `=destroy`, `=copy`, `=dup`, `=sink`, and `=wasMoved`\n- exception boundaries where `Defect` may escape `CatchableError` handlers\n- logic errors, off-by-one, wrong conditions, missing cases\n\nThis list is illustrative, not exhaustive. If something looks wrong, investigate\nit regardless of whether it matches a known pattern.\n\n## Search Efficiently\n\nUse `rg` to locate risky operations quickly — parsing functions, allocation,\npointer operations, casts, FFI imports, ownership hooks. But also read the code\nto understand its logic. Many bugs are logic errors that no pattern search will\nfind.\n\n## Trace Across Function Boundaries\n\nMost false positives and false negatives come from incomplete cross-function\nreasoning. Do not stop at the function where a risky operation sits.\n\nWhen a function calls another function with external input:\n\n- Read the callee. Does it validate, bounds-check, or truncate the input?\n- Check what the callee returns. Does it return a consumed length, a partial\n  result, or an error code the caller might ignore?\n- Trace the data path through every intermediate function, not just the entry\n  point and the crash site.\n- Read type definitions and `when defined(...)` branches that affect the path.\n\nIf you cannot trace the full path from input to failure, you do not have a\ncomplete trace. Say so and mark the finding `SUSPECTED`.\n\n## Classify By Evidence, Not Feelings\n\nUse four classes. They describe what you have done, not how confident you feel.\n\n| Class | Means |\n|---|---|\n| `CONFIRMED` | A reproducer, sanitizer, or test demonstrates the failure. |\n| `TRACED` | Complete static trace from external input to the failure, but no reproducer yet. |\n| `SUSPECTED` | Partial trace or unclear control flow. Something looks wrong but the path is not fully verified. |\n| `FALSE_POSITIVE` | A guard, type constraint, catch boundary, or unreachable path blocks the issue. |\n\nDo not assign numbers. Do not invent probability or confidence scores. State\nwhat you found and what evidence you have.\n\n## Test Guards, Do Not Debate Them\n\nIf you are unsure whether a guard blocks a path, write a reproducer that tests\nit. Do not spend time reasoning about whether a guard is sufficient when a\nthree-line test can settle it.\n\nCommon guard questions a reproducer can answer:\n\n- Does `except CatchableError` catch this exception? `Defect` subclasses\n  (`IndexDefect`, `OverflowDefect`, `AssertionDefect`) are not caught by it.\n- Does `-d:danger` change the behavior? `assert` and range checks are disabled;\n  `doAssert` remains active.\n- Does a bounds check, limit, range conversion, or parser guard actually block\n  the input shape you are testing?\n- Does a consumed-length parser leave trailing input unvalidated?\n\n## Use Compiler And Runtime As Primary Evidence\n\nCompiler output, runtime behavior, and sanitizer reports are stronger evidence\nthan pure reasoning. The hybrid approach — use tools, then reason about their\noutput — produces fewer false positives than reasoning alone.\n\nBuild and run reproducers with `nim c -r`. Use `doAssert` for assertions, not\n`assert` — `assert` is compiled out under `-d:danger`.\n\nDefault build:\n\n```bash\nnim c -r repro.nim\n```\n\nAdditional modes when the bug depends on them:\n\n```bash\nnim c --panics:on -r repro.nim        # Defect termination behavior\nnim c -d:danger -r repro.nim          # Overflow and assertion behavior\nnim c --mm:arc -r repro.nim           # Ownership and hook behavior\n```\n\nSanitizers for unsafe memory, FFI, or manual allocation:\n\n```bash\nnim c --cc:clang -g -d:noSignalHandler -d:useMalloc \\\n  --passC:\"-fsanitize=address,undefined -fno-omit-frame-pointer\" \\\n  --passL:\"-fsanitize=address,undefined -fno-omit-frame-pointer\" \\\n  -r repro.nim\n```\n\n`useMalloc` exposes Nim allocations to ASan. `noSignalHandler` lets ASan report\nsignal-based crashes.\n\n## Check For Guards\n\nBefore reporting, verify whether the path is actually reachable:\n\n- Does external input reach the defect site?\n- Is there a bounds check, limit, range type, or parser guard?\n- Does a `catch` boundary catch the exception? `Defect` subclasses\n  (`IndexDefect`, `OverflowDefect`, `AssertionDefect`) are not caught by\n  `except CatchableError`.\n- Does `-d:danger` change the behavior?\n- Are there `when defined(...)` branches that affect the path?\n- For parser defects: check whether functions that return a consumed length\n  leave trailing input unvalidated.\n- For FFI defects: check pointer lifetime, nullability, struct layout, calling\n  convention, and string ownership.\n- For ownership-hook defects: check move-after-destroy, self-copy, zero-length\n  allocation, and destroy-after-move.\n\nIf a guard blocks the path, report `FALSE_POSITIVE` with the blocking line.\n\n## Report Concisely\n\nEach finding needs:\n\n- file and line\n- what is wrong\n- how input reaches it\n- expected vs actual behavior\n- evidence: reproducer command and output for `CONFIRMED`, complete static\n  trace for `TRACED`, partial trace and what is missing for `SUSPECTED`,\n  blocking guard for `FALSE_POSITIVE`\n- remediation direction\n\nKeep the report short. Prefer a few well-evidenced findings over many\nspeculative ones.\n\n# Workflow\n\n1. **Read the code.** Understand what it does, where input enters, and where\n   sensitive operations happen. Read callee functions and type definitions, not\n   just the entry point. Look for anything that could go wrong.\n2. **Trace candidate defects.** For each suspicious site, trace the full path\n   from input to the operation across function boundaries. Check for guards\n   along the way. If you cannot complete the trace, mark it `SUSPECTED` and say\n   what is missing.\n3. **Write a minimal reproducer.** Confirm the bug with the smallest possible\n   input. If a guard's sufficiency is unclear, test it with a reproducer\n   instead of debating it. If you cannot reproduce a traced finding, keep it as\n   `TRACED` and state what is missing.\n4. **Report.** List `CONFIRMED` findings with reproducer evidence, `TRACED`\n   findings with their complete static traces, `SUSPECTED` findings with what\n   is missing, and `FALSE_POSITIVE` findings with the blocking guard.\n\n# Common Mistakes\n\n| Mistake | Why it is wrong |\n|---|---|\n| Marking a source-only claim `CONFIRMED` | Confirmation requires executable evidence. |\n| Stopping the trace at the function with the risky API | Most false positives come from not reading callees and cross-function data flow. |\n| Debating whether a guard blocks a path instead of testing it | A three-line reproducer settles it faster and more reliably. |\n| Reporting a risky API call without a reachable path | API presence is not a defect. |\n| Ignoring `Defect` vs `CatchableError` | `IndexDefect`, `OverflowDefect`, and `AssertionDefect` escape ordinary handlers. |\n| Treating `assert` as a reliable guard | `assert` is compiled out in `-d:danger`; use `doAssert` in tests. |\n| Assigning numerical confidence scores | Numbers add false precision without improving the analysis. |\n\n## References\n\nNo reference files.\n",{"name":5,"description":7},"main","060e1c453fdad0410a2b385f59275494911d9a4b","skills\u002Fnim-defect-analysis",2,"https:\u002F\u002Fgithub.com\u002FVyrnexis\u002Fnim-agent-template","https:\u002F\u002Fgithub.com\u002FVyrnexis","https:\u002F\u002Fvyrnexis.github.io","2026-10-27 00:06:43",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add Vyrnexis\u002Fnim-agent-template --skill nim-defect-analysis",{"tool":37,"command":38},"bunx","bunx skills add Vyrnexis\u002Fnim-agent-template --skill nim-defect-analysis",{"tool":40,"command":41},"pnpm","pnpm dlx skills add Vyrnexis\u002Fnim-agent-template --skill nim-defect-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FVyrnexis\u002Fnim-agent-template\u002Fblob\u002Fmain\u002Fskills\u002Fnim-defect-analysis\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7AWEDMYZVEFGPQYGCVC4NQN","run-tests","Runs the project unit tests and validation suites.","https:\u002F\u002Fgithub.com\u002FVyrnexis\u002Fnim-agent-template\u002Fblob\u002Fmain\u002Fskills\u002Frun-tests\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M7AWE9HNJ36TDH5NPDVCEAHC","nimonyplugins","Build and debug Nimony compile-time plugins for code generation and DSL rewrites. Use when replacing Nim macros with Nimony plugins, writing or reviewing template, for-loop, module, type, or import plugins, or diagnosing NIF traversal and generated output.","https:\u002F\u002Fgithub.com\u002FVyrnexis\u002Fnim-agent-template\u002Fblob\u002Fmain\u002Fskills\u002Fnimonyplugins\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M7AWE4F7EJ1H837ETBHESE2T","nim-testing","Write and run deterministic Nim tests, including isolated test files, expected-exception checks, multi-configuration builds, and sanitizer integration. Use when setting up a Nim test suite, testing failure behavior, running tests across debug\u002Frelease\u002Fdanger modes, or adding AddressSanitizer support.","https:\u002F\u002Fgithub.com\u002FVyrnexis\u002Fnim-agent-template\u002Fblob\u002Fmain\u002Fskills\u002Fnim-testing\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7AWE0S8C3Y39VGR54R23FZD","nim-style-guide","Write clear, consistent Nim code in a simple stdlib-aligned style, covering imports, naming, proc vs func vs template choices, local variables, constructors, formatting, and control flow. Use when writing new Nim code or reviewing a Nim module for readability, consistency, and low-noise style decisions.","https:\u002F\u002Fgithub.com\u002FVyrnexis\u002Fnim-agent-template\u002Fblob\u002Fmain\u002Fskills\u002Fnim-style-guide\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7AWDWZAD6RQ547RT96RHA5B","nim-ownership-hooks","Implement and review Nim ARC\u002FORC ownership hooks for types that manually manage resources, including move-only, deep-copy, refcounted, and copy-on-write patterns. Use when a Nim type owns pointers, buffers, file descriptors, or custom heap memory and you need correct `=destroy`, `=copy`, `=dup`, `=sink`, or move semantics.","https:\u002F\u002Fgithub.com\u002FVyrnexis\u002Fnim-agent-template\u002Fblob\u002Fmain\u002Fskills\u002Fnim-ownership-hooks\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7AWDQ5JGN9XNNJ9FKJQ14GP","nim-mcp-tools","Use for Nim symbol navigation, diagnostics, and type resolution. MANDATORY: Use specialized MCP tools (nimFindSymbols, nimFindReferences, nimListSymbols, nimCheckFile, nimCheckProject, nimFindTypeDefinition) first; fall back to grep only on error or user confirmation.","https:\u002F\u002Fgithub.com\u002FVyrnexis\u002Fnim-agent-template\u002Fblob\u002Fmain\u002Fskills\u002Fnim-mcp-tools\u002FSKILL.md",[],[]]