Claude Code plugin and pre-submit guard
/ptkd skill and a pre-submit guard. Both run ptkd check on your machine. Nothing is uploaded./ptkd preflight
/ptkd preflight # this project
/ptkd preflight apps/mobile # another folder
/ptkd explain PTKD-CRED-SECRETClaude runs the check, then explains the result under the two questions: Is it safe? and Will it pass review? Blocking findings come first, each with where it is, why it matters and the fix. Leads PTKD could not prove are checked by Claude in your code and never block. Checks that could not run are named, with what would cover them.
Claude then offers to fix what can be fixed in code and runs the check again. A leaked live key must also be rotated with its provider: removing it from the code is not enough. PTKD lowers the risk of a rejection; Apple and Google make the decision.
The pre-submit guard
The plugin installs a hook that runs before Claude starts any of these commands: eas submit (and eas build --auto-submit), fastlane deliver, pilot or supply, xcrun altool, gradle bundleRelease, flutter build ipa or appbundle. Any other command runs without a check.
| Verdict | What the guard does |
|---|---|
| BLOCKED | Stops the command and gives Claude the findings and their fixes. |
| NOT CHECKED | Asks you before the command runs. |
| STALE | Lets it run, with a note that the store rules are old. |
| CLEAR | Lets it run. |
Set PTKD_GUARD_STRICT=1 to stop on NOT CHECKED as well. A scan that crashes or cannot be found counts as NOT CHECKED, never as CLEAR.
The same guard in any shell or CI
tools/guard-hook/ptkd-guard.sh # check; exit 1 when BLOCKED
tools/guard-hook/ptkd-guard.sh --exec -- eas submit -p ios # submit only if not blockedInstall
The plugin is not in a public marketplace yet. From a PTKD checkout, start Claude Code with claude --plugin-dir tools/skill. The skill finds ptkd on your PATH, or a PTKD checkout through PTKD_REPO (this needs bun).