agentleFS
defi-iodefi-io/smarts/.claude/skills/publish-article/SKILL.md

publish-article

Skill1 starsChanged 6 months agoMITView on GitHub

Publish a multilingual draft from docs/drafts/<slug>/ to smarts.md and, by default, schedule a zh-CN + en X thread in the same call. Triggers: "发布 <slug> 到 smarts", "发 <slug> 到 smarts", "publish <slug> to smarts", and the follow-up "发X" when the article was published article-only. Single-letter flags follow the slug (e.g. "发布 wy 到 smarts a").

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. OpenClaudia/openclaudia-skills★ 731same name
    2. shimo4228/writing★ 3same name
    3. shimo4228/zenn-content★ 3same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When user says "发布 <slug> 到 smarts" / "发 <slug> 到 smarts" / "publish <slug> to smarts":

    line 20
  2. Very specific:

    Read docs/drafts/<slug>/meta.json and every <locale>.md.

    line 45
  3. Distinctive:

    Default structure per tweet:

    line 54
  4. Very specific:

    Call the appropriate publish tool with slug, meta, content, and (when tweeting) tweets: { "<locale>": [...] } + thread: true (omit or set …

    line 66
  5. Very specific:

    If l is set: mcp__smarts_local__publish_article

    line 69
  6. Very specific:

    When the article was published with a and the user later says "发X" / "发推" / "send X posts": run step 3-7 from Stage 1 with the same slug / …

    line 86
  7. Distinctive:

    Don't over-confirm. Default flow is publish + X in one call.

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

publish-article

A draft lives at docs/drafts/<slug>/ with meta.json + one markdown file per locale (en.md, zh-CN.md, zh-TW.md). Two stages; run only what the user asks for. Cross-posting to other platforms (Pickful etc.) is not part of this skill — the user decides those manually.

Stage 1 — Publish to smarts.md (+ X by default)

When user says "发布 <slug> 到 smarts" / "发 <slug> 到 smarts" / "publish <slug> to smarts":

Default behavior: publish the article AND schedule a zh-CN + en 4-tweet thread in the same publish_article call. One round-trip, one confirmation.

Flags (single letters, appended after the slug or anywhere in the line — combinable, e.g. "发布 wy 到 smarts s c"):

FlagMeaning
lPublish to smarts_local instead of smarts.md.
aArticle only — skip tweets entirely.
sSingle tweet per locale (hook + URL), not a thread.
cRestrict tweets to zh-CN only.
eRestrict tweets to en only.

Notes:

  • l selects the target MCP endpoint: mcp__smarts_local__publish_article (with l) vs mcp__smarts__publish_article (default).
  • a overrides s / c / e (no tweets means locale/form don't matter).
  • c and e together = both locales = same as no flag.
  • Article always publishes in every locale present in meta.json regardless of flags. Flags only affect the tweets.

Flow:

  1. Read docs/drafts/<slug>/meta.json and every <locale>.md.
  2. Validate inline with mcp__smarts__validate_article_draft — pass slug, meta, and content (locale → markdown body).
  3. Unless a is set, draft tweets for the locales selected by c / e (default: both zh-CN and en). Thread length scales with article depth:

    • Shallow articles (< 5KB, simple topic): 3-4 tweets
    • Medium articles (5-10KB, moderate depth): 5-6 tweets
    • Deep articles (> 10KB, multiple concepts, code/data): 7-8 tweets

    Default structure per tweet:

    • T1: concrete pain point (no jargon)
    • T2: why existing approach falls short
    • T3+: key insights, data, code patterns (varies by depth)
    • T(n): who should read + article URL (https://smarts.md/<slug> for en, https://smarts.md/cn/<slug> for zh-CN, https://smarts.md/tw/<slug> for zh-TW)

    Goal: each tweet adds value, no filler. Show user the draft before sending. For s (single), collapse to: hook + URL.

  4. Show the tweet draft to the user before sending. One confirmation covers both the article and the tweets — don't ask twice.
  5. Call the appropriate publish tool with slug, meta, content, and (when tweeting) tweets: { "<locale>": [...] } + thread: true (omit or set false for s):
    • If l is set: mcp__smarts_local__publish_article
    • Otherwise: mcp__smarts__publish_article
  6. On success, move the draft out of docs/drafts/: mv docs/drafts/<slug> docs/published/<slug> (create docs/published/ first if it doesn't exist). Skip the move if the publish call returned any error. Skip the move when l (smarts_local) — local publishes are for testing and shouldn't archive the draft.
  7. Report per-locale URLs and tweets_scheduled / tweet_errors.

Why pass meta + content inline: the server only sees its own docs/drafts/ directory, which won't contain a draft that lives only in this repo. Inline mode is always safe.

Each tweet ≤ 280 characters. URL counts as ~23 chars in X's algorithm.

Stage 2 — Schedule X after the fact

When the article was published with a and the user later says "发X" / "发推" / "send X posts": run step 3-7 from Stage 1 with the same slug / meta / content. Source files now live at docs/published/<slug>/ (Stage 1 moved them there on success) — read from there, not docs/drafts/. The same s / c / e flags apply. The tool is idempotent on content — only tweets_scheduled changes. Step 6 (move draft) is a no-op the second time since the directory is already under docs/published/.

Style rules

  • Tweets are user-facing — no agent internals ("called N MCP tools", "validated draft", etc.). Speak as Bob, not as the tool.
  • Titles: no formulaic X:最简介绍 / X: A Guide. Use the title already in meta.json.
  • Don't over-confirm. Default flow is publish + X in one call; show the tweet draft once and proceed unless user objects. Only ask about locale/form when the user's modifier is ambiguous.

When not to run this skill

  • Editing or reviewing a draft (read the files directly).
  • mcp__smarts__list_article_drafts only returns server-side drafts; local drafts live under docs/drafts/. Use ls for the local list.
  • Polymarket / contract / on-chain queries — those are unrelated tools.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.