[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79BF9EKNSY1BD7QPDKPDCDW":3,"skill-same:01M79BF9EKNSY1BD7QPDKPDCDW":46},{"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":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M79BF9EKNSY1BD7QPDKPDCDW","context-isolation",null,"Enforce that untriggered knowledge is not loaded and irrelevant context is excluded. Three types: trigger, responsibility, and per-task isolation. v2: adds hierarchical decomposition protocol and per-task token budget enforcement.","sahil-kaushik1\u002FAuditing-Workflow","sahil-kaushik1","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F143880923?v=4","01M79BEEK3947RQYD3WC00K9W3","Sahil Kaushik","01M79BEEKVHPFPTNBDB0GFXBHE",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsahil-kaushik1\u002FAuditing-Workflow\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcontext-isolation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: context-isolation\ndescription: >\n  Enforce that untriggered knowledge is not loaded and irrelevant context\n  is excluded. Three types: trigger, responsibility, and per-task isolation.\n  v2: adds hierarchical decomposition protocol and per-task token budget enforcement.\n---\n\n# Context Isolation Skill v2\n\n## Purpose\n\n> \"If it is not triggered, do not read it. If it is irrelevant, do not place it in\n> the current context.\"\n\nSplitting prompts into files is NOT real isolation if the agent still reads all of them.\nThis skill enforces actual isolation at three levels plus a **budget enforcement layer**.\n\n---\n\n## Three Isolation Types\n\n### 1. Trigger Isolation\nSkills are loaded ONLY when their trigger condition is met.\n\n| Skill | Trigger | When NOT to load |\n|-------|---------|-----------------|\n| `foundry-harness` | During verification | During decomposition |\n| `defi-patterns` | During threat modeling | During verification |\n| `drift-detection` | During reasoning | During decomposition |\n| `economic-modeling` | Economic Analyst stage | All other stages |\n| `fuzzing-integration` | task.phase = 5\u002F6\u002F7 | All other phases |\n| `flow-compilation` | Flow Mapper stage | All other stages |\n\n**Rule**: If a skill's trigger condition is not met, the agent MUST NOT read it.\n\n### 2. Responsibility Isolation\nEach agent sees ONLY its role-relevant artifacts.\n\n| Agent | Can See | Cannot See |\n|-------|---------|------------|\n| Deep Reasoner | Task file, context package, target code | Verifier conclusions, other task reasoning |\n| Verifier | Task file, `claim.md` ONLY (stripped) | Full reasoning chain-of-thought |\n| Judge | Both reasoner and verifier outputs | Nothing restricted |\n| Decomposer | Source code headers first, SAST facts | Previous audit findings (anchoring bias) |\n| Threat Modeler | Flow slices, decomposition summary | Individual contract source code |\n| Skeptic | Reasoning output, task file | Verifier output, Economic Analyst output |\n\n**Rule**: Agents MUST NOT consume artifacts outside their responsibility boundary.\n\n### 3. Per-Task Context Isolation\nThe Context Builder (and `slice-context.sh`) provides ONLY task-relevant context.\n\nFor a task targeting `Vault.withdraw()`:\n- ✅ Include: `Vault.sol`, imported interfaces, ERC20 token contract\n- ✅ Include: State variables listed in the task's `Relevant State` field\n- ✅ Include: Functions transitively called by `withdraw()` (depth ≤ 2)\n- ❌ Exclude: `Governance.sol` (unless the task involves governance)\n- ❌ Exclude: Frontend config, test files, deployment scripts\n- ❌ Exclude: Contracts not reachable from the target function\n\n**Rule**: Context packages MUST document what was excluded and why.\n\n---\n\n## Hierarchical Decomposition Protocol (Large Codebases)\n\nFor protocols with > 10 contract files, context MUST be loaded hierarchically.\nThis is the primary mitigation for context window overflow.\n\n### Pass 1 — Header Scan (low token cost)\nLoad ONLY the structural header of every contract:\n```bash\n# For each .sol file:\ngrep -E \"^(pragma|contract|abstract|interface|library|    function|    event|    error|    struct|    mapping|    uint|    address)\" TargetContract.sol | head -40\n```\n\nThis gives you: contract name, all function signatures, all state variable types.\n**Do NOT load function bodies in Pass 1.**\n\nToken cost per contract: ~200-500 tokens (vs 5,000-20,000 for full file).\nFor 30 contracts: ~6,000-15,000 tokens total (fits in context easily).\n\n### Pass 2 — Priority Deep-Read (targeted)\nFrom Pass 1 results, identify the top-priority contracts:\n- Contracts holding user funds (balances, deposits, stakes)\n- Contracts callable by untrusted users\n- Contracts with known high-risk patterns (upgradeable, oracle-reading, fee-collecting)\n\n**Deep-read only these contracts** (full function bodies).\nTypical result: 3-7 contracts, ~15,000-40,000 tokens total.\n\n### Pass 3 — Dependency Pull (on demand)\nAs specific tasks are assigned, use `slice-context.sh` to pull:\n- The target function's body\n- Its direct callees (depth 1-2)\n- Relevant state variables\n- Required interfaces\n\n**Per-task budget**: respect `context.max_tokens_per_task` from `audit.config.yml`.\n\n---\n\n## Token Budget Enforcement\n\nThe Context Builder MUST enforce budget caps before handing off to Reasoners.\n\n| Severity | Max Context Tokens | Action if Over Budget |\n|----------|-------------------|-----------------------|\n| Critical | 8,000 | Re-slice with depth=1 |\n| High     | 6,000 | Re-slice with depth=1 |\n| Medium   | 4,000 | Header scan only |\n| Low      | 2,000 | Function signature only |\n\nIf re-slicing still exceeds budget:\n1. Keep: target function body + direct callees only (depth=0)\n2. Append: summary header of excluded files (\"These files were excluded due to budget: ...\")\n3. Document in task: `context_budget_warning: true`\n\n---\n\n## Enforcement\n\n1. **Context Builder** runs `slice-context.sh` for every task before assigning to Reasoner\n2. **Orchestrator** verifies `specs\u002Fcontext\u002FTASK-{N}-context.md` exists before dispatching\n3. **Judge** checks that reasoning outputs don't reference excluded context\n   (would indicate isolation violation or the agent loaded extra files)\n4. **Harness Critic** reviews isolation violations in the evolution cycle\n\n## Why This Matters\n\nWithout real isolation:\n- One huge prompt becomes several smaller prompt fragments (same problem)\n- Irrelevant context dilutes attention on the actual task\n- Anchoring bias from previous findings prevents fresh analysis\n- Context overload causes the model to take shortcuts (vulnerability drift)\n- 30-contract codebases become impossible to fully analyze in a single pass\n\nWith hierarchical + per-task isolation:\n- Every Reasoner gets a focused, ~4,000-8,000 token package\n- Full 50+ contract protocols become analyzable without context truncation\n- Reasoning quality improves because signal-to-noise is higher\n","# Context Isolation Skill v2\n\n## Purpose\n\n> \"If it is not triggered, do not read it. If it is irrelevant, do not place it in\n> the current context.\"\n\nSplitting prompts into files is NOT real isolation if the agent still reads all of them.\nThis skill enforces actual isolation at three levels plus a **budget enforcement layer**.\n\n---\n\n## Three Isolation Types\n\n### 1. Trigger Isolation\nSkills are loaded ONLY when their trigger condition is met.\n\n| Skill | Trigger | When NOT to load |\n|-------|---------|-----------------|\n| `foundry-harness` | During verification | During decomposition |\n| `defi-patterns` | During threat modeling | During verification |\n| `drift-detection` | During reasoning | During decomposition |\n| `economic-modeling` | Economic Analyst stage | All other stages |\n| `fuzzing-integration` | task.phase = 5\u002F6\u002F7 | All other phases |\n| `flow-compilation` | Flow Mapper stage | All other stages |\n\n**Rule**: If a skill's trigger condition is not met, the agent MUST NOT read it.\n\n### 2. Responsibility Isolation\nEach agent sees ONLY its role-relevant artifacts.\n\n| Agent | Can See | Cannot See |\n|-------|---------|------------|\n| Deep Reasoner | Task file, context package, target code | Verifier conclusions, other task reasoning |\n| Verifier | Task file, `claim.md` ONLY (stripped) | Full reasoning chain-of-thought |\n| Judge | Both reasoner and verifier outputs | Nothing restricted |\n| Decomposer | Source code headers first, SAST facts | Previous audit findings (anchoring bias) |\n| Threat Modeler | Flow slices, decomposition summary | Individual contract source code |\n| Skeptic | Reasoning output, task file | Verifier output, Economic Analyst output |\n\n**Rule**: Agents MUST NOT consume artifacts outside their responsibility boundary.\n\n### 3. Per-Task Context Isolation\nThe Context Builder (and `slice-context.sh`) provides ONLY task-relevant context.\n\nFor a task targeting `Vault.withdraw()`:\n- ✅ Include: `Vault.sol`, imported interfaces, ERC20 token contract\n- ✅ Include: State variables listed in the task's `Relevant State` field\n- ✅ Include: Functions transitively called by `withdraw()` (depth ≤ 2)\n- ❌ Exclude: `Governance.sol` (unless the task involves governance)\n- ❌ Exclude: Frontend config, test files, deployment scripts\n- ❌ Exclude: Contracts not reachable from the target function\n\n**Rule**: Context packages MUST document what was excluded and why.\n\n---\n\n## Hierarchical Decomposition Protocol (Large Codebases)\n\nFor protocols with > 10 contract files, context MUST be loaded hierarchically.\nThis is the primary mitigation for context window overflow.\n\n### Pass 1 — Header Scan (low token cost)\nLoad ONLY the structural header of every contract:\n```bash\n# For each .sol file:\ngrep -E \"^(pragma|contract|abstract|interface|library|    function|    event|    error|    struct|    mapping|    uint|    address)\" TargetContract.sol | head -40\n```\n\nThis gives you: contract name, all function signatures, all state variable types.\n**Do NOT load function bodies in Pass 1.**\n\nToken cost per contract: ~200-500 tokens (vs 5,000-20,000 for full file).\nFor 30 contracts: ~6,000-15,000 tokens total (fits in context easily).\n\n### Pass 2 — Priority Deep-Read (targeted)\nFrom Pass 1 results, identify the top-priority contracts:\n- Contracts holding user funds (balances, deposits, stakes)\n- Contracts callable by untrusted users\n- Contracts with known high-risk patterns (upgradeable, oracle-reading, fee-collecting)\n\n**Deep-read only these contracts** (full function bodies).\nTypical result: 3-7 contracts, ~15,000-40,000 tokens total.\n\n### Pass 3 — Dependency Pull (on demand)\nAs specific tasks are assigned, use `slice-context.sh` to pull:\n- The target function's body\n- Its direct callees (depth 1-2)\n- Relevant state variables\n- Required interfaces\n\n**Per-task budget**: respect `context.max_tokens_per_task` from `audit.config.yml`.\n\n---\n\n## Token Budget Enforcement\n\nThe Context Builder MUST enforce budget caps before handing off to Reasoners.\n\n| Severity | Max Context Tokens | Action if Over Budget |\n|----------|-------------------|-----------------------|\n| Critical | 8,000 | Re-slice with depth=1 |\n| High     | 6,000 | Re-slice with depth=1 |\n| Medium   | 4,000 | Header scan only |\n| Low      | 2,000 | Function signature only |\n\nIf re-slicing still exceeds budget:\n1. Keep: target function body + direct callees only (depth=0)\n2. Append: summary header of excluded files (\"These files were excluded due to budget: ...\")\n3. Document in task: `context_budget_warning: true`\n\n---\n\n## Enforcement\n\n1. **Context Builder** runs `slice-context.sh` for every task before assigning to Reasoner\n2. **Orchestrator** verifies `specs\u002Fcontext\u002FTASK-{N}-context.md` exists before dispatching\n3. **Judge** checks that reasoning outputs don't reference excluded context\n   (would indicate isolation violation or the agent loaded extra files)\n4. **Harness Critic** reviews isolation violations in the evolution cycle\n\n## Why This Matters\n\nWithout real isolation:\n- One huge prompt becomes several smaller prompt fragments (same problem)\n- Irrelevant context dilutes attention on the actual task\n- Anchoring bias from previous findings prevents fresh analysis\n- Context overload causes the model to take shortcuts (vulnerability drift)\n- 30-contract codebases become impossible to fully analyze in a single pass\n\nWith hierarchical + per-task isolation:\n- Every Reasoner gets a focused, ~4,000-8,000 token package\n- Full 50+ contract protocols become analyzable without context truncation\n- Reasoning quality improves because signal-to-noise is higher\n",{"name":5,"description":7},"main","39a25d63191d67efe43cdce5b7507069e2307f0f",".agents\u002Fskills\u002Fcontext-isolation","https:\u002F\u002Fgithub.com\u002Fsahil-kaushik1\u002FAuditing-Workflow","https:\u002F\u002Fgithub.com\u002Fsahil-kaushik1","https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1Te4TcrpgcN4j8DsYqVdjPl4QXVbs5XXo\u002Fview?usp=drive_link","Web3 security researcher \u002F developer","2026-10-18 15:17:21",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add sahil-kaushik1\u002FAuditing-Workflow --skill context-isolation",{"tool":38,"command":39},"bunx","bunx skills add sahil-kaushik1\u002FAuditing-Workflow --skill context-isolation",{"tool":41,"command":42},"pnpm","pnpm dlx skills add sahil-kaushik1\u002FAuditing-Workflow --skill context-isolation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsahil-kaushik1\u002FAuditing-Workflow\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcontext-isolation\u002FSKILL.md",true,[],[47,53,59,66,73,80],{"skillNo":48,"name":49,"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":50,"categories":51,"keywords":52,"publishedAt":19},"01M79BSEAG0SS9CC2EN1S51K2X","stripe-patterns","https:\u002F\u002Fgithub.com\u002Fsahil-kaushik1\u002FAuditing-Workflow\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsync\u002Frendertrust\u002F.claude\u002Fskills\u002Fstripe-patterns\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"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":56,"categories":57,"keywords":58,"publishedAt":19},"01M79BSBAZXQBWCPKYJP38A35B","payment-patterns","https:\u002F\u002Fgithub.com\u002Fsahil-kaushik1\u002FAuditing-Workflow\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsync\u002Fkeryk-ai\u002F.claude\u002Fskills\u002Fpayment-patterns\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79BS8PKZXFGBNQBS2GHNXZW","testing-patterns","Testing patterns for Jest and Playwright. Use when writing tests, setting up test fixtures, or validating RLS enforcement. Routes to existing test conventions.","https:\u002F\u002Fgithub.com\u002Fsahil-kaushik1\u002FAuditing-Workflow\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Ftesting-patterns\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M79BS3PR92A4QNEJAFNDKB2G","team-coordination","Agent Teams orchestration patterns for multi-agent SAFe workflows. Use when spawning agent teams, coordinating teammates, enforcing quality gates via task dependencies, or orchestrating the 11-agent SAFe pipeline. Covers team creation, messaging, shared task lists, and SAFe gate enforcement. Do NOT use for single-agent or simple subagent workflows.","https:\u002F\u002Fgithub.com\u002Fsahil-kaushik1\u002FAuditing-Workflow\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fteam-coordination\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M79BRZ422QD8D5QHQMXAVPWZ","task-compilation","Compile broad audit goals into structured proof obligations with 9 mandatory fields. Used after decomposition by the Threat Modeler agent.","https:\u002F\u002Fgithub.com\u002Fsahil-kaushik1\u002FAuditing-Workflow\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Ftask-compilation\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M79BRV2MK2AJZBNSE2BETP28","storage-layout-analysis","Proxy patterns, slot collisions, upgrade safety. Used during decomposition to identify storage-related vulnerabilities in upgradeable contracts.","https:\u002F\u002Fgithub.com\u002Fsahil-kaushik1\u002FAuditing-Workflow\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fstorage-layout-analysis\u002FSKILL.md",[],[]]