# Permission Flags Risk Assessment

> You are auditing a Uniswap V4 hook and need to assess the risk level of its permission flags configuration.

- Skill: `tools-only/permission-flags-risk-assessment` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add tools-only/permission-flags-risk-assessment`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/permission-flags-risk-assessment/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-09-29
- Page: https://skillmd.com/skills/tools-only/permission-flags-risk-assessment

---

# Permission Flags Risk Assessment

You are auditing a Uniswap V4 hook and need to assess the risk level of its permission flags configuration.

## Context

A developer has submitted the following hook permissions for review:

```solidity
function getHookPermissions() public pure override returns (Hooks.Permissions memory) {
    return Hooks.Permissions({
        beforeInitialize: false,
        afterInitialize: true,
        beforeAddLiquidity: true,
        afterAddLiquidity: false,
        beforeRemoveLiquidity: true,
        afterRemoveLiquidity: false,
        beforeSwap: true,
        afterSwap: true,
        beforeDonate: false,
        afterDonate: false,
        beforeSwapReturnDelta: true,
        afterSwapReturnDelta: false,
        afterAddLiquidityReturnDelta: false,
        afterRemoveLiquidityReturnDelta: false
    });
}
```

## Questions

1. Assess the risk level of each enabled permission flag (LOW, MEDIUM, HIGH, CRITICAL).
2. What is the overall risk score for this hook configuration?
3. Which enabled permissions are the most concerning and why?
4. What audit tier would you recommend for a hook with this configuration?

## Requirements

Your response should:

1. Provide a risk assessment for each enabled permission
2. Explain the specific threats associated with high-risk permissions
3. Calculate or estimate an overall risk score
4. Recommend appropriate security measures based on the risk level

## Expected Output

A structured risk assessment that categorizes each permission and provides actionable recommendations.

