# develop-pdk-policy Drive the full lifecycle of a custom Flex Gateway policy with the Policy Development Kit (PDK) — verify prerequisites, scaffold the project, edit the gcl.yaml schema, build the WebAssembly artifact, exercise it locally with the Docker playground, then publish a dev version and cut a release to Anypoint Exchange. Use this skill whenever the user mentions PDK, Flex Gateway custom policies, `anypoint-cli-v4 pdk`, `cargo anypoint`, `make build` / `make publish` / `make release`, the `wasm32-wasip1` target, or asks to "create a custom policy", "scaffold a PDK project", "build a Flex Gateway policy", "publish a policy to Exchange", "test my policy locally", "upgrade PDK", or troubleshoots a PDK build / publish / release failure — even if they don't use the word "PDK" explicitly. - **Skill Source:** [SKILL.md](https://dev-portal.mulesoft.com/skills/mule-development/develop-pdk-policy/SKILL.md) ## Steps ### Step 1: Step 1: Verify Prerequisites ### Step 2: Step 2: Confirm Policy Name and Target Directory ### Step 3: Step 3: Create the Policy Project ### Step 4: Step 4: Set Up the Project ### Step 5: Step 5: Configure the Policy ### Step 6: Step 6: Build the Policy ### Step 7: Step 7: Run the Policy Locally ### Step 8: Step 8: Publish a Development Version ### Step 9: Step 9: Release a Production Version