You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/layer5-blog-writer/SKILL.md
+75-10Lines changed: 75 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,13 @@ description: Creates complete, publication-ready blog posts for layer5.io/blog w
5
5
6
6
# Layer5 Blog Writer
7
7
8
-
You create complete, publication-ready blog posts for [layer5.io/blog](https://layer5.io/blog) and generate branded hero images. You produce:
8
+
You create complete, publication-ready blog posts for [layer5.io/blog](https://layer5.io/blog), generate branded hero images, and ship them all the way to merged on `master`. You produce:
9
9
10
10
1. A fully-formed `index.mdx` at the correct path in the Layer5 repo
11
11
2. A branded hero image (SVG) in the same directory
12
-
3. A brief handoff note covering what was created
12
+
3. A signed-off commit on a dedicated branch in an isolated worktree
13
+
4. A pull request that is auto-merged (regular fast-forward, no review wait)
14
+
5. A brief handoff note covering what was created and the merged PR URL
-**Design embed**: Does this post walk through a specific infrastructure topology (Redis, Dapr, a Kubernetes Deployment, an AWS pattern)? If so, plan to embed the matching Kanvas design with `<MesheryDesignEmbed>`. The available designs and their IDs are in `references/blog-structure.md`.
80
82
81
-
### Step 4 — Write the blog post
83
+
### Step 4 — Set up the git worktree
84
+
85
+
All file writes for this blog post happen inside an isolated git worktree, never in the main checkout. This keeps the working directory clean and lets the entire branch be deleted at the end with no residue.
`<repo>/.claude/worktrees/` is the convention this repo already uses for isolated worktrees. Treat `$WORKTREE_DIR` as the working root for every later step. Every path below (e.g. `src/collections/blog/...`) is relative to `$WORKTREE_DIR`.
100
+
101
+
If the worktree path already exists from a prior run, `git worktree add` will fail. Pick a different slug, or run `git worktree remove "$WORKTREE_DIR"` first. Never `rm -rf` a worktree directory without removing it through git, or the metadata under `.git/worktrees/` will go stale.
102
+
103
+
### Step 5 — Write the blog post
82
104
83
105
Read `references/blog-structure.md` for the full format spec.
- Five's colors are never modified: black skeleton, teal (#00B39F) shoes and hands
121
141
- Five appears large (occupying the right ~42% of the frame, nearly full height) - not a small decorative accent
122
142
123
-
Pass `--repo-root` as the absolute path to the Layer5 repo root (use `git rev-parse --show-toplevel` from inside the repo). Without it, the script still runs but omits the Five mascot and brand font.
143
+
Pass `--repo-root` as the absolute path to the worktree root (`$WORKTREE_DIR` from Step 4). Without it, the script still runs but omits the Five mascot and brand font.
124
144
125
145
See `assets/sample-hero-images/` for visual reference across different category palettes.
126
146
@@ -131,7 +151,9 @@ thumbnail: ./hero-image.svg
131
151
darkthumbnail: ./hero-image.svg
132
152
```
133
153
134
-
### Step 6 — Final quality check
154
+
### Step 7 — Final quality check
155
+
156
+
Run from inside `$WORKTREE_DIR`. Do not proceed to Step 8 until every box is checked.
- [ ] Tags match the approved list casing exactly (e.g. `ai` is lowercase, `Open Source` is title case) - see `references/tags-categories.md`
165
187
- [ ] Category is exactly one from the approved list
166
188
189
+
**Authorship:**
190
+
191
+
- [ ] No reference to AI assistants, AI tooling, or automated authorship anywhere in the post, frontmatter, metadata, alt text, or comments. The post must read as the author's own work.
192
+
193
+
### Step 8 — Commit, push, auto-merge, and remove the worktree
194
+
195
+
Land the post on `master` without leaving a PR open for review. The repo's standard merge strategy is regular fast-forward; the workflow below produces a single signed-off commit on top of `origin/master` and merges it via `gh pr merge --merge --delete-branch`.
196
+
197
+
**Authorship rule (non-negotiable):** the commit message, PR title, PR body, and any other text introduced by this skill must contain no reference to AI assistants, AI authoring tools, "Co-Authored-By" trailers, or automation by name. The signoff is the user's configured `user.name <user.email>`, appended only by `git commit -s`. Do not add `--author`, do not add trailers, do not add "generated with" lines.
198
+
199
+
```bash
200
+
# Run from inside $WORKTREE_DIR
201
+
cd "$WORKTREE_DIR"
202
+
203
+
TITLE="<the blog post's title>" # same as the post's frontmatter title
204
+
git add "src/collections/blog/$(date -u +%Y)/" # or the explicit YYYY/MM-DD-slug path
205
+
git commit -s -m "blog: ${TITLE}"
206
+
207
+
# Push and open the PR
208
+
git push -u origin "$BRANCH"
209
+
PR_URL=$(gh pr create \
210
+
--base master \
211
+
--head "$BRANCH" \
212
+
--title "blog: ${TITLE}" \
213
+
--body "Adds the \`${SLUG}\` blog post under \`src/collections/blog/\`.")
214
+
215
+
# Auto-merge on behalf of the user (regular fast-forward, no review wait)
216
+
gh pr merge --merge --delete-branch "$PR_URL"
217
+
218
+
# Tear down the worktree once the merge is confirmed
219
+
cd "$REPO_ROOT"
220
+
git worktree remove "$WORKTREE_DIR"
221
+
git -C "$REPO_ROOT" pull --ff-only origin master
222
+
```
223
+
224
+
Failure handling:
225
+
226
+
- If `gh pr merge` reports the PR is not yet mergeable (e.g. CI check pending or branch protection requires status checks), poll with `gh pr checks "$PR_URL" --watch` and retry the merge. Do not leave the PR half-shipped.
227
+
- If the merge cannot complete (branch protection blocks `--merge`, conflicts on `master`), report the PR URL and the specific blocker; do not remove the worktree until the user decides how to proceed.
228
+
- If `git worktree remove` fails because the worktree has untracked files, investigate before forcing - there may be unsaved work.
229
+
230
+
End the run with a one-paragraph handoff: the merged PR URL, the post path on `master`, and any follow-ups (e.g. broken cross-links, a Kanvas design ID still to be confirmed).
231
+
167
232
## Reference files
168
233
169
234
- **`references/blog-structure.md`** — Complete MDX format, frontmatter fields, all component patterns including `<MesheryDesignEmbed>` with the full table of available designs. Read before writing.
0 commit comments