/permit2:permit2-signature-transfer-contractfrom permit2
Solidity contract implementation for permitWitnessTransferFrom. Use when writing Solidity contracts that receive Permit2 signatures.
Ships in permit2. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Solidity implementation for permitWitnessTransferFrom pattern.
import {ISignatureTransfer} from "@uniswap/permit2/src/interfaces/ISignatureTransfer.sol";
contract IndexedexRouter {
address public constant PERMIT2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;
// Must match frontend exactly
string public constant WITNESS_TYPE_STRING =
"PermitWitnessTransferFrom(TokenPermissions permitted,address spender,uint256 nonce,uint256 deadline,Witness witness)"
"TokenPermissions(address token,uint256 amount)"
"Witness(bytes32 actionId)";
bytes32 public constant WITNESS_TYPEHASH = keccak256("Witness(bytes32 actionId)");
}
function handlePermitSignatureIn(
ISignatureTransfer.PermitTransferFrom calldata permit,
ISignatureTransfer.SignatureTransferDetails calldata transferDetails,
address owner,
bytes32 actionId,
bytes calldata signature
) external {
bytes32 witness = keccak256(abi.encode(WITNESS_TYPEHASH, actionId));
ISignatureTransfer(PERMIT2).permitWitnessTransferFrom(
permit,
transferDetails,
owner,
witness,
WITNESS_TYPE_STRING,
signature
);
// tokens now in this contract - execute the swap
}
For exact-out swaps, include maxAmountIn in the actionId:
bytes32 actionId = keccak256(abi.encodePacked(
tokenIn,
tokenOut,
vaultAddress,
amountOut,
maxAmountIn
));
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (cyotee/cyotee-claude-plugins) — no native marketplace selected
npx claudepluginhub p/cyotee-permit2-plugins-permit22 plugins ship this exact skill · first indexed Jul 20, 2026
10 skills in this plugin
/permit2-addressesCanonical Permit2 contract addresses by chain. Use when configuring multi-chain support./permit2-allowance-flowComplete approval flow with reset-to-zero pattern. Use when implementing full ERC20 and Permit2 approval workflow./permit2-allowance-transferUses AllowanceTransfer for persistent token approvals. Use when user grants recurring spend authority to the protocol./permit2-nonce-managementBitmap nonce patterns for Permit2 signature replay protection. Use when generating nonces for SignatureTransfer permits.