Skip to content
Back to search

gatepack

MarketplaceWorks with Claude CodeGitHub

Check-before-you-publish gates for KDP books and short videos.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/essa366--gatepack/badge.svg)](/listings/essa366--gatepack)

HTML

<a href="/listings/essa366--gatepack"><img src="/api/listings/essa366--gatepack/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

pip install "gatepack[cover]"          # Python 3.10+; installs pypdf, and Pillow for the cover gate
gatepack list                          # what can be checked
gatepack check loudness clip.mp4       # needs ffmpeg on PATH for audio/video gates

Before the first PyPI release, install from the repository: `pip install "gatepack[cover] @ git+https://github.com/Essa366/gatepack"`.

Exit codes: `0` PASS or WARN, `1` FAIL (or WARN with `--strict`), `2` the gate could not run. Add `--json` for machine-readable output.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 15 lines
  1. {
  2. "name": "gatepack",
  3. "description": "Check-before-you-publish gates for KDP books and short videos.",
  4. "owner": {
  5. "name": "Essa",
  6. "url": "https://github.com/Essa366"
  7. },
  8. "plugins": [
  9. {
  10. "name": "gatepack",
  11. "description": "Run gatepack checks before reporting a book file or video as ready to publish.",
  12. "source": "./"
  13. }
  14. ]
  15. }
README.md · README · 120 lines
  1. # gatepack
  2. Check a book file or a video before you publish it. Each gate is one rule set with a cited source,
  3. a PASS/WARN/FAIL verdict, JSON output and an exit code, so a person, a CI job or an AI agent can stop
  4. a bad upload before the platform does.
  5. ```text
  6. $ gatepack check kdp-metadata book.json
  7. FAIL kdp-metadata book.json
  8. FAIL working-note: subtitle still contains a working note: "TODO"
  9. WARN trademark: title mentions "Minecraft" (the example trademark list); KDP disallows unauthorized references to trademarked terms [platform-rule]
  10. FAIL contact-info: description contains a URL, e-mail address or phone number [platform-rule]
  11. result: FAIL (2 fail, 1 warn)
  12. rule sources:
  13. - KDP: Metadata Guidelines for Books: https://kdp.amazon.com/en_US/help/topic/G201097560
  14. ```
  15. **Contributions welcome.** One gate = one pull request: a rule, its source, a PASS file and a FAIL file.
  16. [15 gates are waiting for an owner](docs/first-issues.md).
  17. ## Quick start
  18. ```bash
  19. pip install "gatepack[cover]" # Python 3.10+; installs pypdf, and Pillow for the cover gate
  20. gatepack list # what can be checked
  21. gatepack check loudness clip.mp4 # needs ffmpeg on PATH for audio/video gates
  22. ```
  23. Before the first PyPI release, install from the repository:
  24. `pip install "gatepack[cover] @ git+https://github.com/Essa366/gatepack"`.
  25. Exit codes: `0` PASS or WARN, `1` FAIL (or WARN with `--strict`), `2` the gate could not run.
  26. Add `--json` for machine-readable output.
  27. ## Gates
  28. | Gate | Checks | Rule source |
  29. |---|---|---|
  30. | [`kdp-metadata`](docs/gates/kdp-metadata.md) | title length, trademarks, sales-rank claims, contact details, review requests, coloring/puzzle books listed as eBooks, trim size and counts that contradict the book, leftover TODOs | [KDP Metadata Guidelines](https://kdp.amazon.com/en_US/help/topic/G201097560), [Keywords](https://kdp.amazon.com/en_US/help/topic/G201298500), [Kindle Content Quality](https://kdp.amazon.com/en_US/help/topic/G200952510) |
  31. | [`kdp-cover-safezone`](docs/gates/kdp-cover-safezone.md) | cover size, artwork in the trim, wrap and hinge zones, spine text rules | [Paperback cover](https://kdp.amazon.com/en_US/help/topic/G201953020), [Hardcover cover](https://kdp.amazon.com/en_US/help/topic/GDTKFJPNQCBTMRV6) |
  32. | [`kdp-pagecount`](docs/gates/kdp-pagecount.md) | page count limits, page size vs trim and bleed, pages promised in the listing | [Print Options](https://kdp.amazon.com/en_US/help/topic/G201834180), [Trim, Bleed, Margins](https://kdp.amazon.com/en_US/help/topic/GVBQ3CMEQW3W2VL6) |
  33. | [`epub`](docs/gates/epub.md) | mimetype, container, required metadata, missing files, broken XHTML, author name; runs EPUBCheck if installed | [EPUB 3.3](https://www.w3.org/TR/epub-33/), [EPUBCheck](https://github.com/w3c/epubcheck) |
  34. | [`dead-air`](docs/gates/dead-air.md) | long silences, silent start, silent file | heuristic, measured with [silencedetect](https://ffmpeg.org/ffmpeg-filters.html#silencedetect) |
  35. | [`freeze`](docs/gates/freeze.md) | picture that stops changing | heuristic, measured with [freezedetect](https://ffmpeg.org/ffmpeg-filters.html#freezedetect) |
  36. | [`loudness`](docs/gates/loudness.md) | integrated LUFS and true peak for streaming, podcast or broadcast | [Spotify](https://support.spotify.com/us/artists/article/loudness-normalization/), [Apple Podcasts](https://podcasters.apple.com/support/893-audio-requirements), [EBU R 128](https://tech.ebu.ch/publications/r128) |
  37. | [`tail`](docs/gates/tail.md) | ending cut off mid-sound, audio longer or shorter than the picture | heuristic |
  38. Every finding says where it comes from: `platform-rule` (a platform's help page), `standard`
  39. (a published standard), or `heuristic` (a threshold we chose and document, which you can change).
  40. ## Examples
  41. ```bash
  42. # Kindle eBook metadata, with your own list of trademarks to avoid
  43. gatepack check kdp-metadata book.json --brands my-brands.txt
  44. # Paperback interior: page limits and 6 x 9 trim with or without bleed
  45. gatepack check kdp-pagecount interior.pdf --trim 6x9 --metadata book.json
  46. # Full wrap cover (PNG/JPEG, or PDF with PyMuPDF installed)
  47. gatepack check kdp-cover-safezone cover.png --trim 6x9 --pages 120
  48. gatepack check kdp-cover-safezone cover.pdf --format hardcover --trim 6x9 --spine 0.6
  49. # Podcast episode against Apple's -16 LUFS, as JSON for a CI step
  50. gatepack check loudness episode.mp3 --profile podcast --json
  51. # Every short in a folder, blocking on warnings too
  52. gatepack check dead-air renders/*.mp4 --strict
  53. ```
  54. From Python:
  55. ```python
  56. import gatepack
  57. result = gatepack.check("tail", "short.mp4")
  58. print(result.status, [f.message for f in result.findings])
  59. ```
  60. ## Use it from Claude Code
  61. The repository is also a Claude Code plugin with a `gatepack` skill that tells the agent which gate to
  62. run before it reports a file as ready to upload:
  63. ```text
  64. /plugin marketplace add Essa366/gatepack
  65. /plugin install gatepack@gatepack
  66. ```
  67. The skill is in [`skills/gatepack/SKILL.md`](skills/gatepack/SKILL.md). Other agents can read the same file.
  68. ## What it does not do
  69. - It does not guarantee that KDP, a podcast host or a video platform will accept your file. Human
  70. reviewers apply rules no tool can see.
  71. - It never logs in, uploads, scrapes or publishes anything. gatepack makes no network calls, and it runs
  72. ffmpeg with a file-only protocol whitelist so a playlist cannot pull in URLs.
  73. - It is not a trademark database. The built-in list is a short example; bring your own.
  74. ## Add a gate
  75. ```bash
  76. git clone https://github.com/Essa366/gatepack && cd gatepack
  77. pip install -e ".[dev]"
  78. gatepack new youtube-thumbnail --category image # writes the module, docs page and fixture folders
  79. ```
  80. Fill in the rule and its source, add one file that must PASS and one that must FAIL, run `pytest`.
  81. The full walk-through is in [docs/adding-a-gate.md](docs/adding-a-gate.md), the rules for pull
  82. requests in [CONTRIBUTING.md](CONTRIBUTING.md).
  83. ## How it was built
  84. Written with Claude Code. The KDP rules come from book uploads that were rejected or flagged, and each
  85. one is checked against the platform page linked above. If a rule here disagrees with the platform's
  86. current page, the page wins: please open an issue.
  87. ## License
  88. [MIT](LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.