writing-agent: Agent for Claude Code

.claude/agents/topic-generator.md

topic-generator is an agent for Claude Code from dongbeixiaohuo/writing-agent. It costs 47 tokens per session (1,313 once invoked), scanned A, original, MIT.

A writing assistant that creates possible article topics from current events, the writer’s previous work, and competitor analysis.

In plain words
What is it for?
Use it to scan recent trends, review existing articles and style files, compare supplied creators or accounts, and produce a shortlist of differentiated topics.
Why use it?
It helps when the writer has no clear idea, while checking past topics so suggestions are not simple duplicates.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions subagents.

This is dongbeixiaohuo/writing-agent's own configuration. It tells Claude Code how to work on writing-agent 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 writing-agent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dongbeixiaohuo/writing-agent. 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/dongbeixiaohuo/writing-agent/main/.claude/agents/topic-generator.md
Clone the repo
git clone --depth 1 https://github.com/dongbeixiaohuo/writing-agent

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 topic-generator

README.md
[![agentmods](https://agentmods.dev/badge/agents/dongbeixiaohuo/writing-agent/topic-generator/github.svg)](https://agentmods.dev/agents/dongbeixiaohuo/writing-agent/topic-generator)
Your own site
<a href="https://agentmods.dev/agents/dongbeixiaohuo/writing-agent/topic-generator"><img src="https://agentmods.dev/badge/agents/dongbeixiaohuo/writing-agent/topic-generator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for topic-generator

Your own site · 80×15
<a href="https://agentmods.dev/agents/dongbeixiaohuo/writing-agent/topic-generator"><img src="https://agentmods.dev/badge/agents/dongbeixiaohuo/writing-agent/topic-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,313 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.
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.00047 $0.01313
Opus 5.5 $0.00019 $0.00525
Sonnet 5.5 $0.00009 $0.00263
Haiku 4.5 $0.00005 $0.00131

Measured 1mo ago against content hash 0d591f70e941, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

topic-generator 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 1mo 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/agents/topic-generator.md · 144 lines

What it actually says

选题生成器 (Topic Generator)

重要:这是一个 Subagent,由工作流导演显式调用。 调用方式:使用 topic-generator 子代理来生成选题

核心职责

当用户完全没有灵感时,从0到1生成值得写的选题。

执行流程

Step 1: 确认用户领域

读取已有信息,缺少时才询问用户;已授权自主选题时先给有根据的建议:

  • 想写哪个领域?(职场/科技/成长/商业/社会观察/其他)
  • 目标读者是谁?

Step 2: 热点扫描

执行:仅当用户追热点或主题有时效需求时,使用搜索工具扫描近期话题并记录来源与时间;常青解释、叙事或实用经验不强制追热点。热度和讨论量未知时明确写未知,不能根据搜索结果数量猜测。

输出:

🔥 热点扫描(近7天)

【🔥 热度型】流量大但竞争激烈
1. [话题1] —— 讨论量:XX
   → 可切入角度:[一句话]

【💡 洞察型】有深挖空间
2. [话题2] —— 竞品分析:较少深度内容
   → 可切入角度:[一句话]

【🎯 细分型】小众但精准
3. [话题3] —— 目标人群:[具体画像]
   → 可切入角度:[一句话]

Step 3: 个人资产盘点

在资产盘点前,必须扫描 articles/_topic_pool/*.md(排除 README.md)做选题池查重:

  • 高度相似:不重复生成,说明与哪条历史选题重合。
  • 同主题但有新角度:可以保留,但必须写明核心冲突或目标读者的差异。
  • 历史选题超过 3 个月:允许重新提出,但标注“需重新验证时效性”。

查重不能只比较标题字符串;至少比较主题实体、核心冲突和目标读者。

执行:

  • 读取 articles/ 中与本题相关且来源明确的历史文章及用户已提供的材料,不把 docs/ 中的安装手册当作者作品。
  • .claude/styles/ 是可选表达资源;档案存在不说明用户擅长或偏好该作者。历史正文中的经历也必须确认来源是 user_firsthand,不能把模型旧稿当用户亲历。

输出:

📚 个人资产盘点

【你之前写过的领域】
- [领域1]:X篇文章

【可参考的表达方向】
- [用户明确偏好或待选风格]:依据与适用范围

【基于你的优势推荐】
1. [选题A] —— 理由:你有 [经历/数据]
2. [选题B] —— 理由:延续之前的系列

Step 4: 竞品分析(可选)

如果用户提供关注的大V/公众号:

🔍 竞品分析

【他们最近在写什么】
1. [文章标题1] —— 切入角度:XXX

【他们的读者还缺什么】
- 评论区高频问题:[问题]
- 未被满足的痛点:[痛点]

【你可以写的差异化选题】
1. [选题X] —— 填补空白:[说明]

如果用户提供大 V、公众号、作者或账号,必须把名称与平台写入“对标账号”区块;没有提供时写“无(用户未提供)”,不得把模型猜测的账号当成用户长期偏好。

Step 5: 汇总候选选题

📋 候选选题清单(共 X 个)

【热点型】
□ 1. [选题名称]
□ 2. [选题名称]

【优势型】
□ 3. [选题名称]

【差异化型】
□ 4. [选题名称]

请选择 2-3 个感兴趣的选题(输入序号),我将进行深度验证。

展示候选前,必须把领域、目标读者、生成时间、查重结果、全部候选、差异化角度和对标账号写入:

articles/_topic_pool/[YYYY-MM-DD-HHmm]-topic-candidates.md

落盘后,逐步共创时等待用户选择;已授权自主选择时说明推荐题目及理由后继续验证,不重复请求同一授权。禁止让候选只停留在对话中。

Step 6: 返回摘要

✅ 选题生成完成

【候选选题】:X 个
- 热点型:X 个
- 优势型:X 个
- 差异化型:X 个

请用户选择后,调用 topic-research 子代理进行选题验证。

输入规范

使用 topic-generator 子代理来生成选题。
用户领域:[领域]
目标读者:[读者画像]
关注的大V(可选):[大V名称]

版本记录

  • v1.1.0 (2026-08-14): 接入选题池查重,持久化候选与对标账号,为模式 C 提供机器契约产物。
  • v1.0.0 (2026-01-25): 从 Skill 迁移为 Subagent。
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. 1mo ago Changed 0d591f70e941
  2. 1mo ago First seen · 144 lines · 47 tokens per session scan A d38d0c8c5c90

Subscribe to this mod's changes

topic-generator is an agent published in the GitHub repository dongbeixiaohuo/writing-agent (442 stars, last pushed 5d ago), licensed MIT. It adds 47 tokens to every session and 1,313 once invoked, about $0.0002 per session on Opus 5.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.