agents/skills/injectable/account-abstraction-security/SKILL.md
Protocol Type Trigger account_abstraction (detected when ERC-4337 interfaces, EntryPoint, UserOperation, or Paymaster patterns found) - Inject Into Breadth agents, depth-external
npx skillsauth add plamentsv/plamen account-abstraction-securityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Protocol Type Trigger:
account_abstraction(detected when ERC-4337 interfaces, EntryPoint, UserOperation, or Paymaster patterns found) Inject Into: Breadth agents, depth-external Language: EVM only (other VMs handle account abstraction natively without smart contract validation stacks) Finding prefix:[AA-N]
When decomposing this skill into depth agent investigation questions, map sections to domains:
Recon detects ERC-4337 patterns: UserOperation, IAccount, IPaymaster, EntryPoint, validateUserOp, validatePaymasterUserOp, postOp, isValidSignature (ERC-1271), or smart account/wallet factory patterns.
For each validateUserOp implementation:
userOpHash computed correctly (includes chainId, entryPoint, nonce)?validateUserOp must return validationData encoding (authorizer, validUntil, validAfter).0 (success) vs 1 (failure) vs packed data follow the spec?Tag: [TRACE:validateUserOp → sig_scheme={scheme} → hash_includes_chainId={YES/NO} → nonce_check={method}]
For each validatePaymasterUserOp implementation:
validatePaymasterUserOp (pre-execution)?postOp (post-execution)?postOp: what happens if postOp reverts? Does the paymaster eat the cost?validatePaymasterUserOp success → execute expensive operation → postOp fails to collect payment)If paymaster accepts ERC-20 for gas payment:
validatePaymasterUserOp or postOp?postOp? (inner execution context)context from validatePaymasterUserOp to postOp: can it be tampered with?postOp handle all three modes? (opSucceeded, opReverted, postOpReverted)Tag: [TRACE:paymaster_validate → deferred_checks={list} → postOp_can_fail={YES/NO} → payment_collected={guaranteed/conditional}]
For each isValidSignature implementation:
0x1626ba7e (valid) for ANY hash? (always-true validator)isValidSignature calls?If session keys or scoped permissions are supported:
Tag: [TRACE:isValidSignature → delegated_to={module} → registry_access={control} → always_valid={YES/NO}]
CREATE2(salt=hash(owner)) is safe. CREATE2(salt=nonce) without binding owner → attacker deploys with their own owner at the victim's expected address.initialize() be called again?initializer/reinitializer) correctly applied?Tag: [TRACE:factory_deploy → salt_binds_owner={YES/NO} → pre_deploy_funds={safe/vulnerable}]
validateUserOp correctly verify signatures against the operation hash including chain ID?postOp?postOp failure doesn't lose fundsCREATE2 salt includes keccak256(owner) → counterfactual address is owner-specific| Section | Required | Completed? | Notes |
|---------|----------|------------|-------|
| 1. UserOperation Validation | IF validateUserOp present | | Signature, nonce, return value |
| 2. Paymaster Validation | IF paymaster present | | Pre/post validation, payment token |
| 3. Signature Validation Modules | IF ERC-1271 / modules | | Delegation, session keys |
| 4. Factory and Initialization | IF wallet factory present | | Address binding, re-init |
development
Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project documentation checks. Generates a scored Audit Readiness Report and optionally runs static analysis. Trigger on: "prepare for audit", "audit readiness", "pre-audit check", "audit prep", "NatSpec check", or any request to review a Solidity codebase before a security review.
development
Launch the Plamen deterministic Web3 security audit pipeline
development
Run the Plamen smart-contract audit wizard in Codex
testing
Launch the Plamen deterministic L1 infrastructure audit pipeline