[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CSH0MTFEJK7RF3SW3A9SS6":3,"skill-same:01M7CSH0MTFEJK7RF3SW3A9SS6":49},{"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":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7CSH0MTFEJK7RF3SW3A9SS6","defi-amm-security",null,"Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, CEI ordering, donation or inflation attacks, oracle manipulation, slippage, admin controls, and integer math.","Henrique1601\u002FSkiilsToIAs","Henrique1601","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F92006691?v=4","01M7CRXVT0GVXVK80JT1GR687S","Henrique Bezerra Dos Santos","01M7CRXVTN5Y8TMWJ1MDSKCQ1T",0,"MIT","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fbackend-database\u002Fdefi-amm-security\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: defi-amm-security\ndescription: Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, CEI ordering, donation or inflation attacks, oracle manipulation, slippage, admin controls, and integer math.\nmetadata:\n  origin: ECC direct-port adaptation\nversion: \"1.0.0\"\n---\n\n# DeFi AMM Security\n\nCritical vulnerability patterns and hardened implementations for Solidity AMM contracts, LP vaults, and swap functions.\n\n## When to Use\n\n- Writing or auditing a Solidity AMM or liquidity-pool contract\n- Implementing swap, deposit, withdraw, mint, or burn flows that hold token balances\n- Reviewing any contract that uses `token.balanceOf(address(this))` in share or reserve math\n- Adding fee setters, pausers, oracle updates, or other admin functions to a DeFi protocol\n\n## How It Works\n\nUse this as a checklist-plus-pattern library. Review every user entrypoint against the categories below and prefer the hardened examples over hand-rolled variants.\n\n## Execution Safety\n\nThe shell commands in this skill are local audit examples. Run them only in a trusted checkout or disposable sandbox, and do not splice untrusted contract names, paths, RPC URLs, private keys, or user-supplied flags into shell commands. Ask before installing tools or running long fuzzing\u002Fstatic-analysis jobs that may consume significant local or paid resources.\n\nNever include secrets, private keys, seed phrases, API tokens, or mainnet signing credentials in command examples, logs, or reports.\n\n## Examples\n\n### Reentrancy: enforce CEI order\n\nVulnerable:\n\n```solidity\nfunction withdraw(uint256 amount) external {\n    require(balances[msg.sender] >= amount);\n    token.transfer(msg.sender, amount);\n    balances[msg.sender] -= amount;\n}\n```\n\nSafe:\n\n```solidity\nimport {ReentrancyGuard} from \"@openzeppelin\u002Fcontracts\u002Futils\u002FReentrancyGuard.sol\";\nimport {SafeERC20} from \"@openzeppelin\u002Fcontracts\u002Ftoken\u002FERC20\u002Futils\u002FSafeERC20.sol\";\n\nusing SafeERC20 for IERC20;\n\nfunction withdraw(uint256 amount) external nonReentrant {\n    require(balances[msg.sender] >= amount, \"Insufficient\");\n    balances[msg.sender] -= amount;\n    token.safeTransfer(msg.sender, amount);\n}\n```\n\nDo not write your own guard when a hardened library exists.\n\n### Donation or inflation attacks\n\nUsing `token.balanceOf(address(this))` directly for share math lets attackers manipulate the denominator by sending tokens to the contract outside the intended path.\n\n```solidity\n\u002F\u002F Vulnerable\nfunction deposit(uint256 assets) external returns (uint256 shares) {\n    shares = (assets * totalShares) \u002F token.balanceOf(address(this));\n}\n```\n\n```solidity\n\u002F\u002F Safe\nuint256 private _totalAssets;\n\nfunction deposit(uint256 assets) external nonReentrant returns (uint256 shares) {\n    uint256 balBefore = token.balanceOf(address(this));\n    token.safeTransferFrom(msg.sender, address(this), assets);\n    uint256 received = token.balanceOf(address(this)) - balBefore;\n\n    shares = totalShares == 0 ? received : (received * totalShares) \u002F _totalAssets;\n    _totalAssets += received;\n    totalShares += shares;\n}\n```\n\nTrack internal accounting and measure actual tokens received.\n\n### Oracle manipulation\n\nSpot prices are flash-loan manipulable. Prefer TWAP.\n\n```solidity\nuint32[] memory secondsAgos = new uint32[](2);\nsecondsAgos[0] = 1800;\nsecondsAgos[1] = 0;\n(int56[] memory tickCumulatives,) = IUniswapV3Pool(pool).observe(secondsAgos);\nint24 twapTick = int24(\n    (tickCumulatives[1] - tickCumulatives[0]) \u002F int56(uint56(30 minutes))\n);\nuint160 sqrtPriceX96 = TickMath.getSqrtRatioAtTick(twapTick);\n```\n\n### Slippage protection\n\nEvery swap path needs caller-provided slippage and a deadline.\n\n```solidity\nfunction swap(\n    uint256 amountIn,\n    uint256 amountOutMin,\n    uint256 deadline\n) external returns (uint256 amountOut) {\n    require(block.timestamp \u003C= deadline, \"Expired\");\n    amountOut = _calculateOut(amountIn);\n    require(amountOut >= amountOutMin, \"Slippage exceeded\");\n    _executeSwap(amountIn, amountOut);\n}\n```\n\n### Safe reserve math\n\n```solidity\nimport {FullMath} from \"@uniswap\u002Fv3-core\u002Fcontracts\u002Flibraries\u002FFullMath.sol\";\n\nuint256 result = FullMath.mulDiv(a, b, c);\n```\n\nFor large reserve math, avoid naive `a * b \u002F c` when overflow risk exists.\n\n### Admin controls\n\n```solidity\nimport {Ownable2Step} from \"@openzeppelin\u002Fcontracts\u002Faccess\u002FOwnable2Step.sol\";\n\ncontract MyAMM is Ownable2Step {\n    function setFee(uint256 fee) external onlyOwner { ... }\n    function pause() external onlyOwner { ... }\n}\n```\n\nPrefer explicit acceptance for ownership transfer and gate every privileged path.\n\n## Security Checklist\n\n- Reentrancy-exposed entrypoints use `nonReentrant`\n- CEI ordering is respected\n- Share math does not depend on raw `balanceOf(address(this))`\n- ERC-20 transfers use `SafeERC20`\n- Deposits measure actual tokens received\n- Oracle reads use TWAP or another manipulation-resistant source\n- Swaps require `amountOutMin` and `deadline`\n- Overflow-sensitive reserve math uses safe primitives like `mulDiv`\n- Admin functions are access-controlled\n- Emergency pause exists and is tested\n- Static analysis and fuzzing are run before production\n\n## Audit Tools\n\n```bash\npip install slither-analyzer\nslither . --exclude-dependencies\n\nechidna-test . --contract YourAMM --config echidna.yaml\n\nforge test --fuzz-runs 10000\n```\n","# DeFi AMM Security\n\nCritical vulnerability patterns and hardened implementations for Solidity AMM contracts, LP vaults, and swap functions.\n\n## When to Use\n\n- Writing or auditing a Solidity AMM or liquidity-pool contract\n- Implementing swap, deposit, withdraw, mint, or burn flows that hold token balances\n- Reviewing any contract that uses `token.balanceOf(address(this))` in share or reserve math\n- Adding fee setters, pausers, oracle updates, or other admin functions to a DeFi protocol\n\n## How It Works\n\nUse this as a checklist-plus-pattern library. Review every user entrypoint against the categories below and prefer the hardened examples over hand-rolled variants.\n\n## Execution Safety\n\nThe shell commands in this skill are local audit examples. Run them only in a trusted checkout or disposable sandbox, and do not splice untrusted contract names, paths, RPC URLs, private keys, or user-supplied flags into shell commands. Ask before installing tools or running long fuzzing\u002Fstatic-analysis jobs that may consume significant local or paid resources.\n\nNever include secrets, private keys, seed phrases, API tokens, or mainnet signing credentials in command examples, logs, or reports.\n\n## Examples\n\n### Reentrancy: enforce CEI order\n\nVulnerable:\n\n```solidity\nfunction withdraw(uint256 amount) external {\n    require(balances[msg.sender] >= amount);\n    token.transfer(msg.sender, amount);\n    balances[msg.sender] -= amount;\n}\n```\n\nSafe:\n\n```solidity\nimport {ReentrancyGuard} from \"@openzeppelin\u002Fcontracts\u002Futils\u002FReentrancyGuard.sol\";\nimport {SafeERC20} from \"@openzeppelin\u002Fcontracts\u002Ftoken\u002FERC20\u002Futils\u002FSafeERC20.sol\";\n\nusing SafeERC20 for IERC20;\n\nfunction withdraw(uint256 amount) external nonReentrant {\n    require(balances[msg.sender] >= amount, \"Insufficient\");\n    balances[msg.sender] -= amount;\n    token.safeTransfer(msg.sender, amount);\n}\n```\n\nDo not write your own guard when a hardened library exists.\n\n### Donation or inflation attacks\n\nUsing `token.balanceOf(address(this))` directly for share math lets attackers manipulate the denominator by sending tokens to the contract outside the intended path.\n\n```solidity\n\u002F\u002F Vulnerable\nfunction deposit(uint256 assets) external returns (uint256 shares) {\n    shares = (assets * totalShares) \u002F token.balanceOf(address(this));\n}\n```\n\n```solidity\n\u002F\u002F Safe\nuint256 private _totalAssets;\n\nfunction deposit(uint256 assets) external nonReentrant returns (uint256 shares) {\n    uint256 balBefore = token.balanceOf(address(this));\n    token.safeTransferFrom(msg.sender, address(this), assets);\n    uint256 received = token.balanceOf(address(this)) - balBefore;\n\n    shares = totalShares == 0 ? received : (received * totalShares) \u002F _totalAssets;\n    _totalAssets += received;\n    totalShares += shares;\n}\n```\n\nTrack internal accounting and measure actual tokens received.\n\n### Oracle manipulation\n\nSpot prices are flash-loan manipulable. Prefer TWAP.\n\n```solidity\nuint32[] memory secondsAgos = new uint32[](2);\nsecondsAgos[0] = 1800;\nsecondsAgos[1] = 0;\n(int56[] memory tickCumulatives,) = IUniswapV3Pool(pool).observe(secondsAgos);\nint24 twapTick = int24(\n    (tickCumulatives[1] - tickCumulatives[0]) \u002F int56(uint56(30 minutes))\n);\nuint160 sqrtPriceX96 = TickMath.getSqrtRatioAtTick(twapTick);\n```\n\n### Slippage protection\n\nEvery swap path needs caller-provided slippage and a deadline.\n\n```solidity\nfunction swap(\n    uint256 amountIn,\n    uint256 amountOutMin,\n    uint256 deadline\n) external returns (uint256 amountOut) {\n    require(block.timestamp \u003C= deadline, \"Expired\");\n    amountOut = _calculateOut(amountIn);\n    require(amountOut >= amountOutMin, \"Slippage exceeded\");\n    _executeSwap(amountIn, amountOut);\n}\n```\n\n### Safe reserve math\n\n```solidity\nimport {FullMath} from \"@uniswap\u002Fv3-core\u002Fcontracts\u002Flibraries\u002FFullMath.sol\";\n\nuint256 result = FullMath.mulDiv(a, b, c);\n```\n\nFor large reserve math, avoid naive `a * b \u002F c` when overflow risk exists.\n\n### Admin controls\n\n```solidity\nimport {Ownable2Step} from \"@openzeppelin\u002Fcontracts\u002Faccess\u002FOwnable2Step.sol\";\n\ncontract MyAMM is Ownable2Step {\n    function setFee(uint256 fee) external onlyOwner { ... }\n    function pause() external onlyOwner { ... }\n}\n```\n\nPrefer explicit acceptance for ownership transfer and gate every privileged path.\n\n## Security Checklist\n\n- Reentrancy-exposed entrypoints use `nonReentrant`\n- CEI ordering is respected\n- Share math does not depend on raw `balanceOf(address(this))`\n- ERC-20 transfers use `SafeERC20`\n- Deposits measure actual tokens received\n- Oracle reads use TWAP or another manipulation-resistant source\n- Swaps require `amountOutMin` and `deadline`\n- Overflow-sensitive reserve math uses safe primitives like `mulDiv`\n- Admin functions are access-controlled\n- Emergency pause exists and is tested\n- Static analysis and fuzzing are run before production\n\n## Audit Tools\n\n```bash\npip install slither-analyzer\nslither . --exclude-dependencies\n\nechidna-test . --contract YourAMM --config echidna.yaml\n\nforge test --fuzz-runs 10000\n```\n",{"name":5,"version":24,"metadata":25,"description":7},"1.0.0",{"origin":26},"ECC direct-port adaptation","main","a73152352c0612252131e5cf84e91312a6cf17dc","backend-database\u002Fdefi-amm-security","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs","https:\u002F\u002Fgithub.com\u002FHenrique1601","https:\u002F\u002Fbezerraportifolio.netlify.app\u002F","Full Stack Developer | React, Next.js, TypeScript, Node.js & IA | Construindo produtos digitais e soluções SaaS","2026-11-15 02:56:04",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add Henrique1601\u002FSkiilsToIAs --skill defi-amm-security",{"tool":41,"command":42},"bunx","bunx skills add Henrique1601\u002FSkiilsToIAs --skill defi-amm-security",{"tool":44,"command":45},"pnpm","pnpm dlx skills add Henrique1601\u002FSkiilsToIAs --skill defi-amm-security","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fbackend-database\u002Fdefi-amm-security\u002FSKILL.md",true,[],[50,57,64,72,79,86],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7E2ANBW9V6AVX5JXNCEAWF8","rag-architect-agent","Agente Arquiteto de RAG, Embeddings & Busca Vetorial. Especialista em design e implementação de pipelines de Retrieval-Augmented Generation de alta fidelidade: chunking semântico, modelagem pgvector no PostgreSQL (Neon\u002FSupabase), busca híbrida (cosseno + BM25), reranking, validação via TypeSafe AI e filosofia Ponytail (anti-overengineering).","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fcustom-agents\u002Frag-architect-agent\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7E29KKF8R02ZRGYE2MJM67G","rag-architecture-patterns","Padrões arquiteturais e implementação de pipelines RAG (Retrieval-Augmented Generation) de alta fidelidade para qualquer projeto ou sistema. Cobre chunking semântico, embeddings, busca híbrida (pgvector + BM25), reranking, validação via TypeSafe AI e filosofia Ponytail (anti-overengineering).","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Frag-architecture-patterns\u002FSKILL.md",[],[],{"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":68,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7CWRA8E3BJ7CPY8N8EG28J1","skill-repair","Use this to fix and re-install agent skills that have failed installation.\nThis skill provides the necessary context and permissions to surgically update\nthe `manifest.json` after a fix has been applied.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fskill-repair\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7CWR66FZP8FA47WVZ4Z2EXC","security-scan","Scan your Claude Code configuration (.claude\u002F directory) for security vulnerabilities, misconfigurations, and injection risks using AgentShield. Checks CLAUDE.md, settings.json, MCP servers, hooks, and agent definitions.","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fsecurity-scan\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7CWR0QPY58QPTR1P759TFNG","security-review","Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment\u002Fsensitive features. Provides comprehensive security checklist and patterns.","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fsecurity-review\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7CWQXCE40XWT4FZ3VWZFGDP","security-bounty-hunter","Hunt for exploitable, bounty-worthy security issues in repositories. Focuses on remotely reachable vulnerabilities that qualify for real reports instead of noisy local-only findings.","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fsecurity-bounty-hunter\u002FSKILL.md",[],[]]