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
{{ message }}
Repository navigation
Commit be2c3bf
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .claude/skills/layer5-blog-writer/SKILL.md
+21-35Lines changed: 21 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ You create complete, publication-ready blog posts for [layer5.io/blog](https://l
11
11
1. A fully-formed `index.mdx` at the correct path in the Layer5 repo
12
12
2. A branded hero image (raster, 1200x630) in the same directory
13
13
3. A linted post and a green local build
14
-
4. A signed-off commit on a dedicated branch in an isolated worktree
15
-
5. A pull request merged after CI passes (regular fast-forward, no review wait)
14
+
4. A signed-off commit on a dedicated branch in a leased treehouse worktree
15
+
5. A pull request landed through no-mistakes (at most three runs)
16
16
6. A brief handoff note covering what was created and the merged PR URL
17
17
18
18
## Layer5 Brand Voice
@@ -84,23 +84,19 @@ Before writing:
84
84
85
85
### Step 4 - Set up the git worktree
86
86
87
-
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.
87
+
All file writes for this blog post happen inside a leased treehouse worktree, never in the main clone. Other agent sessions and the no-mistakes pipeline share the main clone. Never create a worktree with `git worktree add` or a second clone.
WORKTREE_DIR=$(treehouse get --lease -b "$BRANCH")
97
95
98
96
cd"$WORKTREE_DIR"
99
97
```
100
98
101
-
`<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`.
102
-
103
-
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.
99
+
Treat `$WORKTREE_DIR` as the working root for every later step. Every path below (e.g. `src/collections/blog/...`) is relative to `$WORKTREE_DIR`. `treehouse status` lists the pool.
104
100
105
101
### Step 5 - Write the blog post
106
102
@@ -270,9 +266,9 @@ lost by scoping locally - it just happens on the runner instead of on your lapto
270
266
- [ ] Technical posts: consider `resource: true`
271
267
- [ ] The post reads as the author's own work. Naming an AI product is fine when it is the subject matter; claiming AI authorship is not
272
268
273
-
### Step 8 - Commit, push, auto-merge, and remove the worktree
269
+
### Step 8 - Commit, land through no-mistakes, and return the worktree
274
270
275
-
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`.
271
+
Land the post through the no-mistakes pipeline, which reviews, tests, pushes, and opens the pull request. Use at most three runs per pull request; after the third, merge the pull request as it stands and open an issue for anything still flagged.
276
272
277
273
**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.
278
274
@@ -289,33 +285,23 @@ git add "$POST_DIR"
289
285
git status --short # confirm nothing unexpected is staged
290
286
git commit -s -m "blog: ${TITLE}"
291
287
292
-
# Push and open the PR
293
-
git push -u origin "$BRANCH"
294
-
PR_URL=$(gh pr create \
295
-
--base master \
296
-
--head "$BRANCH" \
297
-
--title "blog: ${TITLE}" \
298
-
--body "Adds the \`${SLUG}\` blog post under \`src/collections/blog/\`.")
299
-
300
-
# Wait for CI before merging. checks.yml runs `npm run build` and eslint; a
301
-
# broken MDX post that lands on master breaks the production deploy.
302
-
gh pr checks "$PR_URL" --watch
303
-
304
-
# Merge only once checks are green (regular fast-forward, no review wait)
305
-
gh pr merge --merge --delete-branch "$PR_URL"
306
-
307
-
# Tear down the worktree once the merge is confirmed
308
-
cd "$REPO_ROOT"
309
-
git worktree remove "$WORKTREE_DIR"
310
-
git -C "$REPO_ROOT" pull --ff-only origin master
288
+
# Validate, push, and open the PR (a clone without a `no-mistakes` remote needs `no-mistakes init` once)
289
+
no-mistakes axi run --intent "Publish the ${SLUG} blog post"
290
+
no-mistakes axi status # current step and findings; answer a review gate with `no-mistakes axi respond`
291
+
```
292
+
293
+
Once the pull request has merged, release the worktree:
294
+
295
+
```bash
296
+
treehouse return"$WORKTREE_DIR"
311
297
```
312
298
313
299
Failure handling:
314
300
315
-
-**Never merge without green checks.**`gh pr merge` fires immediately by default; if it is called before CI finishes, a post that fails the build can land on `master`and surface only in the deploy workflow. `gh pr checks --watch` is what makes the local build in Step 7b a double check rather than the only check.
316
-
- If `gh pr checks`reports a failure, fix it in the worktree, commit with `-s`, push, and let the checks rerun. Do not merge past a red check.
317
-
- 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.
318
-
- If `git worktree remove` fails because the worktree has untracked files, investigate before forcing - there may be unsaved work. A leftover `hero-image.svg` from `--keep-svg` is the usual culprit; delete it rather than committing it.
301
+
-**Never merge without green checks.**checks.yml runs `npm run build` and eslint; a broken MDX post that lands on `master`breaks the production deploy. The local build in Step 7b is a double check, not the only check.
302
+
- If the pipeline or CI reports a failure, fix it in the worktree, commit with `-s`, and rerun, counting against the three-run limit.
303
+
- If the merge cannot complete (branch protection, conflicts on `master`), report the PR URL and the specific blocker; do not return the worktree until the user decides how to proceed.
304
+
- If `treehouse return` complains about untracked files, investigate before forcing - there may be unsaved work. A leftover `hero-image.svg` from `--keep-svg` is the usual culprit; delete it rather than committing it.
319
305
320
306
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).
0 commit comments