redpress CLAUDE.md

Project instructions for redpress, a tool that turns drafts into finished Xiaohongshu posts, a Chinese social-media format combining images and text. They describe its rendering, posting, manual handoff, and private account-specific data boundaries.

In plain words
What is it for?
Use them when developing redpress, rendering post cards, preparing manual or automated Xiaohongshu publishing, and checking limits for titles, text, tags, and cover cards.
Why use it?
They keep reusable publishing tools separate from private account information and require explicit control over how much a draft is rewritten before publication.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/jackjin1997/redpress/claude-md
Clone the repo
git clone --depth 1 https://github.com/jackjin1997/redpress
Per session 939 This file is loaded in full into every session.
When invoked 939 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00939 $0.00939
Opus 5 $0.00469 $0.00469
Sonnet 5 $0.00188 $0.00188
Haiku 4.5 $0.00094 $0.00094

Measured 3d ago against content hash e6172374dce2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

redpress CLAUDE.md 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 3d 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.md · 63 lines

How it starts

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

redpress

小红书的发布印刷机——草稿进,成品图文帖出。

项目定位与边界

redpress 管"怎么发",lab 管"发什么、效果如何"。

  • 本仓库(公开):渲染引擎、卡片模板/风格库、xhs-post skill(流程编排 + 通用小红书规则)、MCP 发布接入
  • lab/(嵌套私有 repo redpress-lab,被 gitignore):真实帖子档案、互动数据、账号文风基线、经验笔记
  • 个人化的东西(账号偏好、数据结论)只进 lab,不进本仓库——工具层保持任何人可用

核心产品原则

  1. 改写力度是用户的显式选择,不是默认行为。收到草稿后必须先问力度档位(见 .claude/skills/xhs-post/SKILL.md 的 L0-L4),不要自作主张大改
  2. 文案两级机制:本仓库 skill 写通用规则(平台限制、结构方法论),lab/notes/ 写账号个性基线;账号基线覆盖通用默认,写文案前先读 lab/notes
  3. 图片风格走 DESIGN.md 沉淀:HTML 生图的色板/字体/构图规范逐渐累积到 DESIGN.md(待建,需要专门讨论),模板系统朝多风格演进(templates/<style>/

架构

编排层  .claude/skills/xhs-post/SKILL.md   流程 + 通用文案规则
渲染层  scripts/render.ts + templates/     post.json → 3:4 PNG 卡片
发布层  两个并列产出末端:
  自动  xiaohongshu-mcp(外部)            localhost:18060/mcp
        ⚠️ vendor/ 二进制是自维护 fork(jackjin1997/xiaohongshu-mcp)
        = upstream + #592(评论少时找不到评论)+ #711(导航重试,我们提的)
        上游修复合并前不要用官方 release 覆盖;fork 源码在 ../xiaohongshu-mcp-fork
  人工  scripts/handoff.ts + src/handoff.ts  cards/ → 自包含 handoff.html
        文字一键复制、图片下载/复制,手动发;唯一零风控敞口的发布路径
数据层  lab/scripts/track.ts               互动快照 → lab/metrics/

post.json 契约见 src/types.ts(标题 ≤20 字、正文 ≤1000 字、tags 不带 #、首卡 cover)。

开发约定

  • TypeScript strict,运行时 Bun(见下方 Bun 指引)
  • 测试 bun test;渲染改动跑 bun scripts/render.ts posts/fixture/ 目检
  • conventional commits,不加 Co-Authored-By
  • ⚠️ cookies.json(小红书登录态)和 lab/ 绝不提交到本仓库

风控红线

  • 同一账号不要在其他网页端登录(会踢掉 MCP 登录态)
  • 发布前必须过用户确认门;发布失败先查登录态,不盲目重试

Bun 使用指引

Default to using Bun instead of Node.js.

  • Use bun <file> instead of node <file> or ts-node <file>
  • Use bun test instead of jest or vitest
  • Use bun install instead of npm install or yarn install or pnpm install
  • Use bunx <package> <command> instead of npx <package> <command>
  • Bun automatically loads .env, so don't use dotenv.
  • Prefer Bun.file over node:fs's readFile/writeFile
  • Bun.$\ls`` instead of execa.

更多 Bun API 参考 node_modules/bun-types/docs/**.mdx

Read the full file on GitHub · 63 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. 3d ago First seen · 63 lines · 939 tokens per session scan A e6172374dce2

Subscribe to this mod's changes

redpress CLAUDE.md is an instructions file published in the GitHub repository jackjin1997/redpress (2 stars, last pushed 1mo ago), licensed MIT. It adds 939 tokens to every session, about $0.0047 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-31.