ccblog CLAUDE.md

ccblog CLAUDE.md is an instructions file for coding agents from Mor-Li/ccblog. It costs 1,270 tokens per session, scanned A, original, MIT.

Publishing instructions for Chinese WeChat articles written in Markdown. They specify required frontmatter, supported content, image limits, and formats or links that cause publishing errors.

In plain words
What is it for?
Preparing article metadata, checking and compressing images, writing supported Markdown, and diagnosing common WeChat API error codes.
Why use it?
They help articles pass the WeChat publishing API’s validation and avoid failures caused by oversized images, unsupported WebP files, or anchor links.

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/mor-li/ccblog/claude-md
Clone the repo
git clone --depth 1 https://github.com/Mor-Li/ccblog

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 ccblog CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mor-li/ccblog/claude-md.svg)](https://agentmods.dev/instructions/mor-li/ccblog/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mor-li/ccblog/claude-md"><img src="https://agentmods.dev/badge/instructions/mor-li/ccblog/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,270 This file is loaded in full into every session.
When invoked 1,270 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.01270 $0.01270
Opus 5 $0.00635 $0.00635
Sonnet 5 $0.00254 $0.00254
Haiku 4.5 $0.00127 $0.00127

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

Security

Grade A, and why

ccblog 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 5d 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 · 162 lines

How it starts

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

微信公众号文章发布注意事项

必需的 Frontmatter

---
title: 文章标题
cover: /绝对/路径/到/封面图.png
---

支持的格式

  • 数学公式:LaTeX 语法($...$$$...$$
  • 标准 Markdown:标题、列表、粗体、斜体、引用等
  • 图片:相对或绝对路径
  • 代码块```language

不支持

  • Markdown 锚点链接[文本](#anchor) 会导致发布失败(错误码 45166)
  • WebP 图片格式:会导致发布失败(错误码 40113)

常见错误及解决方案

system error:图片过大

问题原因:微信公众号 API 接口上传图片限制为 1MB 以下(手动后台上传是10MB,但 wenyan-mcp 走API)

官方限制

  • 公众号后台手动上传:10MB
  • API 接口上传:1MB(wenyan-mcp 使用此方式)

参考:微信官方文档 - 上传图文消息内的图片获取URL

症状

  • 错误信息:上传失败,错误码:-1,错误信息:system error
  • 多次重试仍然失败

诊断方法

# 检查图片大小,找出超过 1MB 的图片
find . \( -name "*.png" -o -name "*.jpg" \) -size +1M -exec ls -lh {} \;

解决方案

使用 ImageMagick 压缩大图:

# 单张图片压缩(限制最大尺寸 2000px,质量 85%)
convert input.png -resize 2000x2000\> -quality 85 output.png

# 批量压缩超过 1MB 的图片
for f in *.png; do
  size=$(stat -c%s "$f")
  if [ "$size" -gt 1000000 ]; then
    convert "$f" -resize 2000x2000\> -quality 85 "${f%.png}_compressed.png"
    mv "$f" "${f%.png}_original.png"
    mv "${f%.png}_compressed.png" "$f"
    echo "压缩: $f"
  fi
done

错误码 45166:内容验证失败

错误码 45166 (invalid content) 有多种触发原因:

原因 1:Markdown 锚点链接

发布前删除所有目录中的锚点链接:

<!-- 会失败 -->
- [章节一](#章节一)

<!-- 可以 -->
- 章节一:介绍
原因 2:无效的微信公众号链接

文章中引用的微信公众号文章链接如果不存在或已失效,会导致发布失败:

<!-- 会失败 - 链接不存在 -->
在[上一篇文章](https://mp.weixin.qq.com/s/不存在的ID)中...

<!-- 可以 - 移除无效链接 -->
在上一篇文章中...

诊断方法:如果遇到 45166 错误,检查文章中所有 mp.weixin.qq.com 链接是否有效

错误码 40113:unsupported file type

问题原因:图片文件的实际格式与扩展名不符,最常见的是 WebP 图片被命名为 .png

症状

  • 错误信息:上传失败,错误码:40113,错误信息:unsupported file type
  • 文章内容正常,但包含的图片无法上传

微信公众号支持的图片格式

  • JPG/JPEG、PNG、GIF、BMP
  • 不支持:WebP、SVG

诊断方法

file /path/to/image.png

# 真正的 PNG
image.png: PNG image data, 1197 x 291, 8-bit/color RGBA, non-interlaced

# 伪装成 PNG 的 WebP
image.png: RIFF (little-endian) data, Web/P image, VP8 encoding, 960x540

Read the full file on GitHub · 162 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. 5d ago First seen · 162 lines · 1,270 tokens per session scan A 12bfb801c92e

Subscribe to this mod's changes

ccblog CLAUDE.md is an instructions file published in the GitHub repository Mor-Li/ccblog (134 stars, last pushed 1mo ago), licensed MIT. It adds 1,270 tokens to every session, about $0.0064 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 instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens