Skip to content
Agentmart
Submit a tool

protect

Why preserved plans are immutable and how pk protect enforces it

Skill by markwharton

IndexedMIT★ 12
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/markwharton-protect

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Why preserved plans are immutable and how pk protect enforces it

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/protect

What's inside

Skill name
protect
Description
Why preserved plans are immutable and how pk protect enforces it
License
MIT
Instructions
25 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# pk protect

`pk protect` is a PreToolUse hook on Edit and Write. It denies any write
under the plans directory, `preserve.dir` in `.pk.json`, because a
preserved plan is a record of what was approved, and a record that can
be edited is not one.

The check resolves symlinks and compares case-insensitively on
Windows, so the directory cannot be reached through an alias.

## Amending a plan

Plans are superseded, never edited. When the approach changes, write
and approve a new plan. The sequence in the plans directory is the
history of decisions, reversals included.

`pk protect` is a no-op in an unconfigured repository (no `.pk.json`).

## Flags

<!-- generated: flags -->
Every command also accepts `--plain`, `--project-dir <value>`, and `--quiet`; see `pk help help`.
<!-- /generated: flags -->

From markwharton/plankit, MIT.

More from markwharton/plankit

Signals

Stars
12
Forks
0
Open issues
0
Last commit (this folder)
Sep 26, 2026 (1 month ago)
Last release
Oct 19, 2026 (11 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from markwharton

Cite this page

protect skill. Agent Mart. https://agentmart.dev/skills/markwharton-protect (last updated 2026-10-24)