/kindle-dedrm:manage [setup|sync|update|cleanup|status] [--dry-run] [--soft|--full]from kindle-dedrm
Manages the Kindle for PC + Calibre DeDRM workflow for personal-use ebook DRM removal on Windows. Provides setup, sync, update, cleanup, and status actions.
Ships in kindle-dedrm. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Personal-use Kindle DRM removal is a fragile multi-tool workflow with state mutations that, if forgotten, leave the user's machine in an awkward state (silent auto-update, stuck firewall rules, half-installed Calibre plugins). This skill captures the lifecycle as discrete reversible actions and tracks every upstream source that drifts independently (Amazon's Kindle for PC release cadence, Satsuoni's DeDRM_tools fork, Kindle_Key_Finder zip with rolling date in URL, techy-notes.com tutorial article).
Scope: Windows-only (Kindle for PC + KFXKeyExtractor are Windows binaries). Single-user. Books the user owns.
Probe current state on every invocation. Run scripts/status.sh and read the JSON output before deciding which action applies.
bash "${CLAUDE_PLUGIN_ROOT}/skills/manage/scripts/status.sh"
Output reports: Kindle for PC version, firewall rule presence, ICACLS deny presence, ~/Tools/Kindle_Key_Finder presence, ~/Downloads installer presence, Calibre install presence, Calibre plugin presence (best-effort), book count in My Kindle Content + Calibre Library.
| Action | When | What it does |
|---|---|---|
| (empty) | Default. Auto-detect from status | If pristine → recommend /kindle-dedrm:setup. If state OK + user mentioned new books → recommend sync. Otherwise emit status report |
setup | First-time install | Delegates to the dedicated /kindle-dedrm:setup skill (uniform check/apply contract): provisioning walkthrough: download, install Kindle for PC 2.8.0, sign-in checkpoint, sync books, install Calibre plugins, run keyfinder, apply firewall + ICACLS lockdown |
sync | New books purchased after initial setup | Disable firewall, prompt user to sync in Kindle, delete cached installer, re-enable firewall, re-run keyfinder |
update | Periodic drift check | HEAD-probe the pinned URLs + gh API for upstream releases, diff against captured baselines in reference/sources.md, emit drift report. No mutations |
cleanup | Decommission | Walk through every reversible mutation with per-item Y/N. Default (confirm-each) offers the firewall rule, ICACLS deny, keyfinder, and downloads; --soft limits to tools + downloads (keeps the firewall/ICACLS lock and Kindle for PC); --full also offers to uninstall Kindle for PC and remove Calibre plugins. The Calibre Library is never offered |
status | Diagnostic | Same as default empty action |
Smart auto-detect when action is empty: read the status.sh JSON, classify state, recommend the most-fitting action OR emit status if classification is ambiguous. Never commit to setup/sync/cleanup without user confirmation when ambiguous.
Apply across every action. Violating any risks losing the working 2.8.0 setup or stranding the user with an upgraded Kindle that can't be downgraded without re-extracting from a different machine.
%LOCALAPPDATA%\Amazon\Kindle\updates\KindleForPC-installer.exe. This is the auto-update payload that breaks key extraction. Delete it whenever it appears.--no-confirm flags or batch-confirm cleanup. Each reversal is independent; some harder to redo than others (re-pinning Kindle 2.8.0 is easy; re-syncing 50 books isn't). This holds when the user asks for "yes to all": never write, run or hand over a script or command that pipes yes, skips the prompts or loops over the reversals without asking.My Kindle Content/ folder, and run no calibredb, ebook-convert or DeDRM on the others.First-time provisioning lives in the dedicated /kindle-dedrm:setup skill, which conforms to the
uniform check/apply contract: check probes prerequisites and current state read-only, apply runs the
full provisioning walkthrough (reference/workflow.md). The gated artifact download, install,
firewall block, ICACLS lock, Calibre plugins, and keyfinder. When this router's smart auto-detect finds
a pristine machine, recommend /kindle-dedrm:setup rather than provisioning inline; the sequence has a
single owner (/kindle-dedrm:setup → reference/workflow.md).
Re-sync new books purchased after initial setup. Idempotent. Safe to re-run.
# Dry-run preview first
bash "${CLAUDE_PLUGIN_ROOT}/skills/manage/scripts/sync-prep.sh" --dry-run
Sequence:
setup first).scripts/firewall.ps1 disable).%LOCALAPPDATA%\Amazon\Kindle\updates\* (scripts/sync-finalize.sh). ICACLS deny prevents future writes but doesn't stop one that lands during the brief firewall-disabled window.scripts/firewall.ps1 enable).~/Tools/Kindle_Key_Finder/Run_keyfinder_admin.vbs). Saved config auto-loads; tool processes only new books.If user reports a cached installer popped up during step 3, that's expected. Amazon staged 2.9.x. Delete it via step 4 immediately and verify Kindle.exe still reports 2.8.0.70980.
Drift check. No mutations. Diffs upstream sources against captured baselines in reference/sources.md + reference/versions.md.
bash "${CLAUDE_PLUGIN_ROOT}/skills/manage/scripts/check-drift.sh"
Sources monitored:
| Source | Drift signal | Captured baseline |
|---|---|---|
kindleforpc.s3.amazonaws.com/70980/KindleForPC-installer-2.8.70980.exe | HEAD request returns non-200 | URL pinned in reference/versions.md; alternate mirror needed if revoked |
github.com/Satsuoni/DeDRM_tools releases | Newest pre-release tag differs from baseline | Last-known-good tag in reference/versions.md |
techy-notes.com/drm-removal-from-kindle-ebook-purchases-old-method/ article (subscriber-gated) | HEAD non-200 (article moved again) | Slug + status in reference/sources.md |
techy-notes.com/content/files/<YYYY>/<MM>/Kindle_Key_Finder_<YYYY.MM.DD>.JH.zip | HEAD non-200 on the pinned direct URL (revoked / rolled) | Pinned direct URL in reference/versions.md |
Two further sources are tracked in reference/sources.md but have no automated probe: the epubor
companion article, and the supported-version list in Kindle_Key_Finder's code/modules/utils.py.
Check those by hand when a drift report leaves a question open.
Output: drift report listing each source's status (current / stale / unreachable) and recommended action (re-download / update version pin / manual review). User decides what to act on; update action itself does not apply changes.
When the user accepts a drift recommendation, the re-pin edit is maintainer work, gated
on a working-tree checkout: applying it requires ${CLAUDE_PLUGIN_ROOT} to be inside a
git working tree (git -C "${CLAUDE_PLUGIN_ROOT}" rev-parse --is-inside-work-tree
succeeds, a marketplace clone or a --plugin-dir load). In installed form
${CLAUDE_PLUGIN_ROOT} is the read-only plugin cache: stop after the drift report and
direct the change to the plugin's source repository (file an issue or PR there); never
edit bundled files in the cache. Consumers then receive the re-pin through
/plugin marketplace update.
In a checkout, when the user accepts a drift recommendation:
reference/versions.md (update pin, refresh page summary). The
single source of truth; check-drift.sh parses its pins from that file, so no second
copy needs editing.setup (e.g., re-download DeDRM_tools if a new pre-release is selected).sync mode against a single test book).Reverse every mutation made by this skill. Per-item confirmation by default.
bash "${CLAUDE_PLUGIN_ROOT}/skills/manage/scripts/cleanup.sh" # confirm-each (default)
bash "${CLAUDE_PLUGIN_ROOT}/skills/manage/scripts/cleanup.sh --soft" # tools + downloads only
bash "${CLAUDE_PLUGIN_ROOT}/skills/manage/scripts/cleanup.sh --full" # everything including Kindle for PC + Calibre plugins
Reversal matrix (every row maps a mutation made by setup/sync to its compensating reversal):
| Mutation | Compensating reversal | Confirm by default? |
|---|---|---|
| Windows Firewall rule "Block Kindle for PC (lock 2.8.0)" | Remove-NetFirewallRule -DisplayName "Block Kindle for PC (lock 2.8.0)" | Yes |
ICACLS deny on %LOCALAPPDATA%\Amazon\Kindle\updates | icacls "<path>" /remove:d "<user>" | Yes |
~/Tools/Kindle_Key_Finder/ directory | rm -rf | Yes |
~/Tools/Kindle_Key_Finder/key_finder_config.json (saved prefs) | Removed with directory above | Implicit |
~/Downloads/KindleForPC-installer-2.8.70980.exe | rm | Yes |
~/Downloads/DeDRM_tools-v*.zip + extracted dir | rm -rf | Yes |
~/Downloads/Kindle_Key_Finder_*.JH.zip | rm | Yes |
Cached installer at %LOCALAPPDATA%\Amazon\Kindle\updates\* | rm (lock removed first if --full) | Yes |
Kindle for PC install (%LOCALAPPDATA%\Amazon\Kindle\application\) | uninstall.exe (interactive) | Only on --full |
| Calibre KFX Input plugin | Manual via Calibre Preferences → Plugins | Only on --full, GUI step |
| Calibre DeDRM plugin | Manual via Calibre Preferences → Plugins | Only on --full, GUI step |
Calibre dedrm.json (key store) | rm "$APPDATA\calibre\plugins\dedrm.json" | Only on --full |
| Calibre Library books (decrypted EPUBs) | NEVER auto-deleted; user keeps these | Manual only, never offered |
The skill should NEVER offer to delete the user's Calibre Library. Those are the decrypted books the entire workflow exists to produce. This holds when the user asks to wipe it: never run, write or hand over a command or script that deletes it; say the library stays, and that removing it is theirs to do by hand.
My Kindle Content/.cleanup --full).| Reference | Load when |
|---|---|
reference/workflow.md | Walking a user through setup: the exact command, rationale, and check per step. |
reference/sources.md | Running update, or an upstream URL stopped resolving and you need its drift baseline. |
reference/versions.md | Verifying a downloaded artifact's SHA256, or checking whether an installed Kindle version is still supported. |
reference/troubleshooting.md | A setup, sync, or cleanup step failed and you need the diagnosis and recovery path. |
scripts/ | Running a helper named above; these are executed, not read. |
| Condition | Action |
|---|---|
| Amazon revokes Kindle for PC 2.8.0.70980 from S3 | Find alternate mirror; update reference/versions.md; widen the supported version pin if a newer version still works with KFXKeyExtractor |
| Satsuoni archives the DeDRM_tools repo | Find current maintained fork; update repo URL in reference/sources.md |
| techy-notes.com tutorial 404s or moves | Pivot to epubor.com tutorial (secondary); update reference/sources.md |
Kindle for PC ships a version > 2.9.1 not in KFXARCHIVER_TOOL_MAP | Wait for KFXArchiver update; document in reference/troubleshooting.md |
| Calibre's KFX Input plugin renamed in catalog | Update plugin name reference in reference/workflow.md |
| User reports a sync that left a 2.9.x cached installer past firewall re-enable | Tighten timing in scripts/sync-prep.sh. Possibly add an automatic sync-finalize.sh invocation when Kindle.exe quits |
The reference/ files write the plugin's root directory as <plugin-root>, which is
${CLAUDE_PLUGIN_ROOT}. Put that path in place of the placeholder before running a command or
writing it into a brief; never hand a ${…} token from those files to the Bash tool.
${…} reference resolves and what the Bash tool's environment
carries, fetch
Where each variable resolves
live.reference/sources.md (opens in a new tab)reference/troubleshooting.md (opens in a new tab)reference/versions.md (opens in a new tab)reference/workflow.md (opens in a new tab)scripts/check-drift.sh (opens in a new tab)scripts/check-drift.test.sh (opens in a new tab)scripts/cleanup.sh (opens in a new tab)scripts/firewall.ps1 (opens in a new tab)scripts/lock-updates.sh (opens in a new tab)scripts/status.sh (opens in a new tab)scripts/sync-finalize.sh (opens in a new tab)scripts/sync-prep.sh (opens in a new tab)scripts/sync-prep.test.sh (opens in a new tab)tests/firewall.Tests.ps1 (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
npx claudepluginhub melodic-software/claude-code-plugins --plugin kindle-dedrmOther plugins' skills for the same job