Add blog-post CLI and ship cli-tools as a moshcode plugin marketplace - #5
Merged
Conversation
The blog at ~/public_html/blog has no build step — writing a file is publishing — so its conventions live only in the files already there and nothing catches a mistake before it is live. Three posts were recently dated 7-10 hours in the future, which pinned them above every real post and made feed.xml look like it had stopped updating. blog-post encodes the conventions: next NNN-post.html, the smolweb-valid template with the AI-drafting acknowledgment, the index.html entry, and a build-feed.mjs run. It refuses a future date unless forced, requires the description that becomes the RSS summary, and writes with 'wx' so two concurrent runs cannot land on the same number and lose a post. `blog-post check` reports what silently breaks the feed — missing, unparseable or future dates, empty summaries, missing h1 — and exits non-zero, so it works as a gate. Also adds .claude-plugin/ so the repo is an installable marketplace, exposing /blog:post, /blog:check, /blog:list and /blog:feed. Additive: no existing file changes except 48 new lines of README. 14 new tests (66 total), typecheck clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ralyodio
force-pushed
the
blog-post-tool
branch
from
August 16, 2026 15:18
d866169 to
aef4e8d
Compare
ThreatCrush Security Scan2 finding(s) MEDIUM: 2
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The blog at
~/public_html/bloghas no build step — writing a file ispublishing — so every convention lives only in the existing files, and nothing
catches a mistake before it goes live.
That bit us: three posts were dated 7–10 hours in the future, which pinned
them above every real post in
feed.xmland caused readers that filter futureitems to drop them. The feed looked like it had stopped updating while every
file on disk looked perfect.
What's here
blog-postencodes the conventions so a new post cannot quietly get one wrong:NNN-post.html<html lang>,<meta http-equiv="Content-Type">rather than a bare<meta charset>, every<p>closed) with the AI-drafting acknowledgmentindex.htmlbuild-feed.mjsIt refuses a future date unless you pass
--allow-future, requires thedescription that becomes the RSS summary, and writes with the
wxflag so twoconcurrent runs cannot pick the same number and silently lose a post.
blog-post checkreports exactly what breaks the feed in silence: missing orunparseable
<meta name="date">(the generator skips those posts without auseful message), future dates, empty descriptions, missing
<h1>. Non-zero exit,so it works as a pre-publish gate.
Plugin marketplace. The repo now exposes
/blog:post,/blog:check,/blog:listand/blog:feedin moshcode:Testing
11 unit tests (
node --test), covering the template shape, attribute escapingof a hostile description, index splicing idempotency, every lint rule, and the
concurrent-create race.
Verified against the real blog:
blog-post checkreports clean andblog-post listreads all 11 posts.🤖 Generated with Claude Code