Skip to content
Skills Library
Marketing & content · Automation

publish

/publish

Publish or queue an approved Build in Public draft. Use when the user says "publish this draft", "queue my build in public post", or "send this to Buffer". Only acts on a draft the user has explicitly approved.

Repository
skills ↗
Licence
MIT
Last repository change
08.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 08.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Publish or queue an approved Build in Public draft. Use when the user says "publish this draft", "queue my build in public post", or "send this to Buffer". Only acts on a draft the user has explicitly approved.

Triggers from the description

publish this draftqueue my build in public postsend this to Buffer

Arguments

/publish <path-to-approved-draft.md>
Original author description

Publish or queue an approved Build in Public draft. Use when the user says "publish this draft", "queue my build in public post", or "send this to Buffer". Only acts on a draft the user has explicitly approved.

How it works

  1. Step 1: Locate and read the draft
  2. Step 2: Show the draft and ask for explicit approval
  3. Step 3: Load config
  4. Step 4: Publish via the determined route
  5. Step 5: Record in posted.jsonl (SUCCESS ONLY)
  6. Step 6: Confirm to the user
  7. Invariants (enforce throughout)
Original SKILL.md headings · 209 lines, 1,245 words
SKILL.md preview
---
name: publish
description: Publish or queue an approved Build in Public draft. Use when the user says "publish this draft", "queue my build in public post", or "send this to Buffer". Only acts on a draft the user has explicitly approved.
argument-hint: "<path-to-approved-draft.md>"
allowed-tools: Bash, Read, Edit, AskUserQuestion
---

You are the Build in Public publisher. Your job is to take a single approved draft file and queue or copy it — and only after the user explicitly confirms they have reviewed and approved it.

**Never queue or publish without explicit approval. Never mark a moment as posted unless the action succeeded.**

---

## Step 1: Locate and read the draft

The user should have passed the path to an approved draft file as the argument (e.g., `~/.build-in-public/drafts/2026-06-18-linkedin-my-feature.md`).

If no argument was provided, tell the user:
> No draft path provided. Usage: `/build-in-public:publish <path-to-approved-draft.md>`

Then STOP — do not proceed.

Read the file at the given path. Parse the YAML frontmatter to extract:
- `moment_id` — the moment identifier
- `axis` — dominant axis (Innovation | Insight | Lesson | Shipped)
- `score` — composite score integer
- `receipt` — the grounding receipt string
- `platform` — target platform (`x` or `linkedin`)
- `humanizer_score` — AI-tell score (integer or `not_run`)

Extract the post body: everything after the closing `---` of the frontmatter block.

If the file cannot be read, or the frontmatter is missing `moment_id` or `platform`, tell the user verbatim what was wrong and STOP.

If `humanizer_score` is `not_run` or the frontmatter contains `not-humanized: true`, warn the user:
> Warning: This draft was not run through the Humanizer. It may contain AI-tells. You can still publish, but consider running `/build-in-public:draft` again after installing the humanizer dependency.

Continue only if the user explicitly says to proceed anyway.

---

## Step 2: Show the draft and ask for explicit approval

Display the full post body to the user in a fenced code block, and show a one-line summary of the frontmatter:

```
Platform : <platform>
Axis     : <axis>
Score    : <score>
Receipt  : <receipt>
Moment   : <moment_id>
```

Then ask:
> Have you reviewed this draft and are you ready to publish it? Reply "yes" to continue, or tell me any changes to make first.

Use `AskUserQuestion` to ask for approval. Wait for the response.

- If the response is anything other than an unambiguous affirmative ("yes", "go", "publish it", "queue it", etc.), do NOT proceed. Offer to make edits or explain what would need to change. STOP until you have a clear affirmative.

---

## Step 3: Load config

Read `~/.build-in-public/config.md`. Parse the YAML frontmatter to extract:
- `buffer_org_id` — Buffer organization ID (optional)
- `buffer_channel_id_linkedin` or `buffer_channel_id_x` — Buffer channel ID for this platform (use the key matching the draft's `platform` value)
- `buffer_token_path` — path to a file containing the Buffer personal access token (optional)

If the file does not exist, treat all Buffer config values as absent (no scheduler configured).

Resolve the channel ID for this platform: read `buffer_channel_id_<platform>` from config (e.g., `buffer_channel_id_linkedin` for a LinkedIn draft, `buffer_channel_id_x` for an X draft).

Obtain the Buffer token: if `buffer_token_path` is present in config, read the token by running:
```bash
buffer_token=$(cat "$buffer_token_path")
```
If the file cannot be read, surface the error verbatim and STOP — do NOT proceed without a valid token.

Determine the scheduling route:
- **Buffer-MCP route:** `buffer_org_id` AND the platform channel id (`buffer_channel_id_<platform>`) AND `buffer_token_path` are all present and the token file was read successfully.
- **HTTP fallback route:** Same credentials present and token read successfully, but the Buffer MCP tool `mcp__buffer__create_post` is not available.
- **Clipboard route:** `buffer_org_id` or the platform channel id or `buffer_token_path` is absent from config (no scheduler configured).

---

## Step 4: Publish via the determined route

### Route A: Buffer MCP

Call the `mcp__buffer__create_post` tool with:
- `organizationId`: value of `buffer_org_id` from config
- `channelIds`: array containing the single `buffer_channel_id_<platform>` value resolved in Step 3
- `text`: the post body (extracted in Step 1)
- `schedulingType`: `"addToQueue"`

Do NOT hardcode any organization ID, channel ID, or token. All values must come from `~/.build-in-public/config.md`.

If the tool call succeeds and returns a post ID, capture it as `post_id`. Proceed to Step 5.

If the tool call returns an error, surface the error verbatim to the user:
> Buffer MCP error: <verbatim error message>

Do NOT proceed to Step 5. Do NOT append to `posted.jsonl`. STOP.

---

### Route B: Buffer HTTP fallback

If the Buffer MCP tool is not available but Buffer creds (`buffer_token_path`, `buffer_org_id`, `buffer_channel_id_<platform>`) are all configured and the token was read successfully in Step 3, use the Buffer API directly.

Use the channel ID (`buffer_channel_id_<platform>`) and token (`$buffer_token`) resolved in Step 3.

Run:

```bash
curl -s -X POST https://mcp.buffer.com/mcp \
  -H "Authorization: Bearer $buffer_token" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_post","arguments":{"organizationId":"<buffer_org_id>","channelIds":["<buffer_channel_id_<platform>>"],"text":"<post body>","schedulingType":"addToQueue"}}}'
```

Build this command dynamically using the values from config. Do NOT hardcode any value.

If the HTTP response contains a post id in the result, capture it as `post_id`. Proceed to Step 5.

If the response contains an error or `"success":false`, surface it verbatim:
> Buffer HTTP error: <verbatim response body>

Do NOT proceed to Step 5. Do NOT append to `posted.jsonl`. STOP.

---

### Route C: Clipboard

If no Buffer creds are configured, copy the post body to the clipboard.

Detect the OS and run the appropriate command:

```bash
# macOS
echo "<post body>" | pbcopy

# Linux (fallback)
echo "<post body>" | xclip -selection clipboard 2>/dev/null \
  || echo "<post body>" | xsel --clipboard --input
```

Run the copy command. Confirm it exited with code 0.

If the copy command exits non-zero, surface the error verbatim AND surface the post body:
> Clipboard copy failed: <verbatim error>. Here is the post text — copy it manually:
> <post body>

Do NOT proceed to Step 5. Do NOT append to `posted.jsonl`. STOP.

If the copy command exits 0, tell the user:
> Post copied to clipboard. Open <platform>'s compose window and paste it in.

Set `post_id` to `null`. Proceed to Step 5 (with `post_id: null`).

---

## Step 5: Record in posted.jsonl (SUCCESS ONLY)

Only reach this step if the action in Step 4 succeeded (Buffer returned a post ID, or clipboard copy exited 0).

Append one JSON line to `~/.build-in-public/posted.jsonl`:

```bash
python3 -c "
import json, datetime, sys

entry = {
    'moment_id': '<moment_id>',
    'platform':  '<platform>',
    'axis':      '<axis>',
    'ts':        datetime.datetime.utcnow().isoformat() + 'Z',
    'post_id':   <post_id_or_null>,
}
line = json.dumps(entry)
with open('$HOME/.build-in-public/posted.jsonl', 'a') as f:
    f.write(line + '\n')
print('Recorded:', line)
"
```

Substitute `<moment_id>`, `<platform>`, `<axis>`, and `<post_id_or_null>` with the actual values extracted earlier. Use `None` (Python) for a null post_id, which will serialize as JSON `null`.

If the append fails (e.g., permission error), warn the user:
> Warning: Post was queued/copied successfully, but failed to write to posted.jsonl: <error>. Your posting history may be incomplete — you can add the entry manually.

---

## Step 6: Confirm to the user

Report back with a summary:

**If Buffer (MCP or HTTP):**
> Queued to Buffer — platform: **<platform>**, moment: `<moment_id>`, post ID: `<post_id>`. History updated in `~/.build-in-public/posted.jsonl`.

**If clipboard:**
> Copied to clipboard — platform: **<platform>**, moment: `<moment_id>`. Paste into <platform>'s composer to post. History updated in `~/.build-in-public/posted.jsonl`.

---

## Invariants (enforce throughout)

1. **Never act without explicit approval.** Step 2's `AskUserQuestion` gate is mandatory.
2. **Never hardcode any token, org ID, or channel ID.** All credentials come from `~/.build-in-public/config.md`.
3. **Never append to `posted.jsonl` if the action failed.** A failed queue or a failed clipboard copy is not a post.
4. **Surface every error verbatim.** Do not swallow, summarize, or retry silently.
5. **Stop on any missing required field.** Missing `moment_id` or `platform` in the frontmatter = hard stop before any external action.

Versions

RepositoryScoreLicence
This page · eclecticv/skills100MIT
kochetkov-ma/claude-brewcode100MIT
mickeyyaya/evolve-loop100Apache-2.0
zimoliao/scholaraio100MIT
tencentcloud/octop100MIT
harbor-framework/harbor100Apache-2.0
a8cteam51/claude-code-plugins100MIT
aetheria-labs1/storefront-skills100MIT
mhycheung/open-science100MIT

Database snapshot: 13.11.2026 · package version 1561f119ef3f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 4 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 85soc-210-publish-an-approved-post
    Publish a social media post exactly as approved, on the approved channel and at the approved time, after checking nothing has changed since approval. Use whenever posting or scheduling a post on the owner's public accounts.
  • 90queue-pilot-fix-drafts
    Use when the person wants to change or remove drafts Queue Pilot saved in their Buffer queue. Triggers include "shorten Tuesday's LinkedIn draft", "rewrite that post", "delete the Friday draft", "fix the draft that broke my rule". Only drafts Queue Pilot wrote can be changed.…
  • 96mp-draft-push
    将现成的文章内容发布到微信公众号草稿箱。当用户说"发布文章"、"发布到草稿箱"、"publish to draft"、"推送到公众号"时触发。
  • 90ce-produce
    Use to produce a publish-ready draft from an approved content brief - "draft the approved brief", "write this post", /organic-os:produce. Runs the six-stage pipeline.
  • 90onsite-publish
    Use to publish an APPROVED, drafted content item via the CMS adapter (WordPress or git-static) - "publish the draft", /organic-os:publish. Refuses unapproved items.
  • 100postsider-content-publishing
    Create a PostSider draft, schedule a post, or publish a post now after resolving the target channel and validating the requested content. Use when the user asks to draft, schedule, queue, or publish social content.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.