Claude Code plugin and pre-submit guard

    The PTKD plugin for Claude Code adds a /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-SECRET

    Claude 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.

    VerdictWhat the guard does
    BLOCKEDStops the command and gives Claude the findings and their fixes.
    NOT CHECKEDAsks you before the command runs.
    STALELets it run, with a note that the store rules are old.
    CLEARLets 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 blocked

    Install

    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).