feat: add ghost-cli skill — Ghost CMS CLI #12

Merged
magnus merged 1 commit from feat/ghost-cli-skill into main 2026-05-21 23:30:05 -04:00
Contributor

CLI wrapper for Ghost CMS Admin API v5/v6. Commands: site, posts, create-post, pages, tags. JWT auth handled internally.

Signed-off-by: Jasper magnus@groktop.us

CLI wrapper for Ghost CMS Admin API v5/v6. Commands: site, posts, create-post, pages, tags. JWT auth handled internally. Signed-off-by: Jasper <magnus@groktop.us>
CLI wrapper for the Ghost CMS Admin API v5/v6. Commands: site,
posts (list), create-post, pages (list), tags (list).

All cli-builder patterns: --json, --dry-run, --quiet, --verbose,
lazy auth, emit() dual-output, structured logging, pre-parsed
global flags. Auth via GHOST_URL and GHOST_ADMIN_KEY (id:secret
format). JWT token generation handled internally (HS256, 5-min expiry).

Signed-off-by: Jasper <magnus@groktop.us>
magnus merged commit dfb038f5f1 into main 2026-05-21 23:30:05 -04:00
jasper left a comment

Automated Review — Jasper

Reviewed ghost-cli/SKILL.md and ghost-cli/scripts/ghost-cli (344-line Python CLI).

What looks good

  • JWT generation (lines 86-95): Hand-rolled HS256 JWT without external deps — clean, self-contained, 5-min expiry.
  • Defensive .get() usage throughout — e.g. line 265 handles the None-from-empty-dict edge case correctly.
  • Lazy auth: --help and --dry-run work without env vars. Good UX, implemented cleanly.
  • Comprehensive Gotchas section in SKILL.md: documents create_tag unwired, no update/delete commands.

🔧 Issues

  1. Module-level warning suppression (line 15): simplefilter("ignore") silences ALL Python warnings globally. Scope to just RequestsDependencyWarning or defer to --json/--quiet mode.
  2. Triplicated HTTP methods (lines 100-160): _get, _post, _put share ~95% logic. Refactor into a single _request(method, path, **kwargs).
  3. Doc inconsistency (SKILL.md, line 92): Flags work "anywhere" is only true for the 4 GLOBAL_BOOLS flags. Subcommand flags before the verb error. Clarify docs.
  4. Inconsistent subparser style (lines 308-309): .add_argument() chained off .add_parser() loses the parser reference. Inconsistent with other subcommands.

Verdict

Solid first pass. Logic correct, error handling thorough, JWT implementation a highlight. Four cleanup points — nothing blocking.

— Jasper (automated review)

## Automated Review — Jasper Reviewed `ghost-cli/SKILL.md` and `ghost-cli/scripts/ghost-cli` (344-line Python CLI). ### ✅ What looks good - **JWT generation** (lines 86-95): Hand-rolled HS256 JWT without external deps — clean, self-contained, 5-min expiry. - **Defensive .get() usage** throughout — e.g. line 265 handles the None-from-empty-dict edge case correctly. - **Lazy auth**: --help and --dry-run work without env vars. Good UX, implemented cleanly. - **Comprehensive Gotchas section** in SKILL.md: documents create_tag unwired, no update/delete commands. ### 🔧 Issues 1. **Module-level warning suppression (line 15)**: `simplefilter("ignore")` silences ALL Python warnings globally. Scope to just `RequestsDependencyWarning` or defer to `--json`/`--quiet` mode. 2. **Triplicated HTTP methods (lines 100-160)**: `_get`, `_post`, `_put` share ~95% logic. Refactor into a single `_request(method, path, **kwargs)`. 3. **Doc inconsistency (SKILL.md, line 92)**: Flags work "anywhere" is only true for the 4 GLOBAL_BOOLS flags. Subcommand flags before the verb error. Clarify docs. 4. **Inconsistent subparser style (lines 308-309)**: `.add_argument()` chained off `.add_parser()` loses the parser reference. Inconsistent with other subcommands. ### Verdict Solid first pass. Logic correct, error handling thorough, JWT implementation a highlight. Four cleanup points — nothing blocking. — Jasper (automated review)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
magnus/agent-skills!12
No description provided.