reactuse: Skill for Claude Code

.claude/skills/publish-juejin/SKILL.md

publish-juejin is a skill for Claude Code from childrentime/reactuse. It costs 140 tokens per session (2,312 once invoked), scanned A, original, Unlicense.

A publishing workflow that sends a Markdown blog post to Juejin, a Chinese developer publishing site, using browser automation. It uses a Simplified Chinese version of the article.

In plain words
What is it for?
Use it when you want to publish or synchronise a new blog post on Juejin, either alone or as one step in a multi-site release.
Why use it?
It removes the need to copy and format the article manually in Juejin’s editor. It also fits Juejin into a wider process for sharing one post on several platforms.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is childrentime/reactuse's own configuration. It tells Claude Code how to work on reactuse itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything reactuse configures →

About the project

ReactUse is a TypeScript library of reusable React Hooks for browser APIs, state, sensors, animations, and DOM interactions. React developers use it when building React applications that need these common behaviors. The catalogue skills and commands help coding agents discover or work with ReactUse hooks.

childrentime/reactuse · 1,051 stars · on GitHub · reactuse.com

Reuse

Borrowing it

Nothing to install: this file belongs to childrentime/reactuse. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/childrentime/reactuse/main/.claude/skills/publish-juejin/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/childrentime/reactuse

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for publish-juejin

README.md
[![agentmods](https://agentmods.dev/badge/skills/childrentime/reactuse/publish-juejin.svg)](https://agentmods.dev/skills/childrentime/reactuse/publish-juejin)
Your own site
<a href="https://agentmods.dev/skills/childrentime/reactuse/publish-juejin"><img src="https://agentmods.dev/badge/skills/childrentime/reactuse/publish-juejin.svg" alt="Measured on agentmods" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,312 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00140 $0.02312
Opus 5 $0.00070 $0.01156
Sonnet 5 $0.00028 $0.00462
Haiku 4.5 $0.00014 $0.00231

Measured 8d ago against content hash 07963742ead8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

publish-juejin scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/publish-juejin/SKILL.md · 163 lines

How it starts

The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.

publish-juejin — 跨发到掘金(opencli 浏览器自动化)

reactuse.com 的博客在掘金做简体中文分发,触达国内 React 开发者。掘金没有公开 API(2026-06 之前都是让用户手动复制 juejin.md),现在统一走 opencli 浏览器自动化,和 publish-hashnode / publish-medium 一致。

✅ 好消息:掘金编辑器吃 markdown

掘金「写文章」用的是 ByteMD(CodeMirror 内核的 markdown 编辑器),不像 Medium 那样要转 HTML。直接:

  • 标题:填 input.title-input(React 受控,要触发 onChange)
  • 正文:调 CodeMirror 的 setValue(md) API(ByteMD 监听 CM change,自动同步并触发草稿 auto-save)

触发场景

  1. 用户明说:"发到掘金" / "publish to juejin" / "把这篇发掘金"
  2. 刚写完一篇博客并说"发出去" / "同步发布" / "推平台"——默认包括掘金
  3. 多平台分发流程的一步(dev.to + Medium + Hashnode + 掘金)

⚠️ 不要触发:用户只让发别的平台时,不要顺手也发掘金。

⚠️ 顺序:先推 GitHub,再跨发

跨发前先把博客 commit + push 到 GitHub(触发 Netlify 部署),让原文 reactuse.com/blog/<slug>/ 真的存在。掘金发的是中文翻译版、独立站,正文里的 reactuse.com 链接是普通外链(不是 canonical),约束没英文平台那么硬,但保持「先推后发」的统一顺序更省心。

前置检查

opencli --version                    # 需要 ≥ 1.7.22
opencli doctor                       # 必须看到 Connectivity: connected

工作流程

步骤 1:确认目标文章 + 标题

正文用 blog-external/post-N-<slug>/juejin.md(简体中文,已剥 frontmatter / truncate,含 H1)。从 zh-hans 源文件 frontmatter 拿中文 title

步骤 2:打开掘金新草稿

opencli browser default open "https://juejin.cn/editor/drafts/new"
opencli browser default get title          # 应是 "写文章 - 掘金"(说明已登录)

如果跳登录:让用户先在该 Chrome 登录掘金,再重来。

步骤 3:灌标题 + 正文

正文去掉首个 H1(标题单独填),base64 传进 eval:

SCRATCH=<scratchpad>
python3 -c "import re,base64; s=open('blog-external/post-N-<slug>/juejin.md').read(); s=re.sub(r'^#\s+.*\n+','',s,1); print(base64.b64encode((s.strip()+'\n').encode()).decode())" > "$SCRATCH/jj_b64.txt"
B64=$(cat "$SCRATCH/jj_b64.txt")
opencli browser default eval '(() => {
  const TITLE = "<中文标题>";
  const MD = new TextDecoder().decode(Uint8Array.from(atob("'"$B64"'"), c => c.charCodeAt(0)));
  // 标题:React 受控,native setter + input 事件
  const t = document.querySelector("input.title-input");
  const setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set;
  setter.call(t, TITLE); t.dispatchEvent(new Event("input", {bubbles: true}));
  // 正文:CodeMirror setValue(ByteMD 监听 CM change → 自动 auto-save)
  const cm = document.querySelector(".CodeMirror").CodeMirror;
  cm.setValue(MD);
  return JSON.stringify({title: t.value.slice(0,40), bodyLen: cm.getValue().length});
})()'

Read the full file on GitHub · 163 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 163 lines · 140 tokens per session scan A 07963742ead8

Subscribe to this mod's changes

publish-juejin is a skill published in the GitHub repository childrentime/reactuse (1,051 stars, last pushed today), licensed Unlicense. It adds 140 tokens to every session and 2,312 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

reactuse

Practical playbook for React teams to choose and apply reactuse hooks across state, async flows, browser APIs, and UI interactions. Use it when replacing custom hook logic with production-ready patterns that stay compatible with SSR and Next.js.

siberiacancode/agent-skills · 50 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-dev-loop

Verify Next.js runtime behavior after editing app code. Use this skill to confirm a change actually works in a running app — not just that it compiles or type-checks. Combines /next/mcp (Next.js's view) with agent-browser (the browser's view). Requires a running next dev.

vercel/next.js · 68 tokens

react-grab

Use when the user wants a hands-free loop where grabbing UI elements in the browser with React Grab feeds tasks to the agent automatically, with no copy-paste or manual handoff. Triggers: "watch react grab", "monitor my grabs", "auto-process react grab", "watch my clipboard for grabs". Not for a one-off paste of a…

aidenybai/react-grab · 86 tokens