Borrowing it
Nothing to install: this file belongs to alchaincyf/huasheng_editor. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/alchaincyf/huasheng_editor/master/AGENTS.mdgit clone --depth 1 https://github.com/alchaincyf/huasheng_editorWrote 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.
[](https://agentmods.dev/instructions/alchaincyf/huasheng_editor/agents-md)<a href="https://agentmods.dev/instructions/alchaincyf/huasheng_editor/agents-md"><img src="https://agentmods.dev/badge/instructions/alchaincyf/huasheng_editor/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.04664 | $0.04664 |
| Opus 5 | $0.02332 | $0.02332 |
| Sonnet 5 | $0.00933 | $0.00933 |
| Haiku 4.5 | $0.00466 | $0.00466 |
Grade A, and why
huasheng_editor AGENTS.md scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = await fetch(src); Copies of this mod
2 near-identical copies found in the catalogue:
- huasheng_editor CLAUDE.md — 100% identical, 0 lines differ
- huasheng_editor GEMINI.md — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 498 lines — stays where its author put it; the contents beside it link to each section on GitHub.
公众号 Markdown 编辑器
一个专为微信公众号设计的 Markdown 编辑器,支持实时预览和一键复制富文本格式到公众号后台。
项目概述
这是一个纯前端的 Markdown 编辑器,可以将标准 Markdown 文本转换为适合微信公众号的富文本格式。支持 13 种精心设计的样式主题,每种主题都针对公众号的阅读体验进行了优化。
核心功能
1. Markdown 渲染
- 使用
markdown-it进行 Markdown 解析 - 支持完整的 Markdown 语法(标题、列表、引用、代码块、表格等)
- 实时预览渲染结果
2. 样式系统
提供 13 种预设样式主题:
- 经典公众号系列:默认、技术、优雅、深度阅读
- 传统媒体系列:杂志风格、纽约时报、金融时报、Jony Ive
- 现代数字系列:Wired 连线、Medium 长文、Apple 极简、Anthropic Claude、AI Coder 特调
每个样式都包含完整的元素定义(标题、段落、列表、引用、代码、表格、图片等)
3. 图片处理系统(⭐ 核心功能)
技术架构概览
本编辑器采用自定义图片协议 + 压缩 + IndexedDB 存储的创新方案,彻底解决了图片粘贴的所有痛点:
用户粘贴图片(任何来源)
↓
ImageCompressor 压缩(Canvas API)
├─ 最大尺寸:1920x1920px
├─ 压缩质量:85%
├─ GIF/SVG 不压缩(保持动画/矢量)
└─ 智能对比:压缩后更大则用原图
↓
生成唯一 ID(img-timestamp-random)
↓
ImageStore 存储到 IndexedDB
├─ 数据库名:WechatEditorImages
├─ 存储:Blob + 元数据
└─ 持久化:刷新不丢失
↓
编辑器插入短链接:
↓
渲染预览时:
├─ 从 IndexedDB 读取 Blob
├─ 创建 Object URL
├─ 替换 img:// 为 blob:
└─ 缓存 Object URL(避免重复读取)
↓
复制到公众号时:
├─ 检测 data-image-id 属性
├─ 从 IndexedDB 读取原始 Blob
├─ 转为 Base64
└─ 替换 img 的 src
核心组件
1. ImageStore 类(app.js:9-213)
负责 IndexedDB 操作的核心类:
class ImageStore {
constructor() {
this.dbName = 'WechatEditorImages';
this.storeName = 'images';
this.version = 1;
}
// 核心方法:
async init() // 初始化 IndexedDB
async saveImage(id, blob, metadata) // 保存图片
async getImage(id) // 获取图片(返回 Object URL)
async getImageBlob(id) // 获取 Blob(用于复制时转 Base64)
async deleteImage(id) // 删除图片
async getAllImages() // 获取所有图片列表
async getTotalSize() // 计算总存储大小
}
数据结构:
{
id: 'img-1736966400000-abc123def',
blob: Blob, // 压缩后的图片 Blob
name: '图片名',
originalSize: 2500000, // 原始大小(字节)
compressedSize: 487300, // 压缩后大小
compressionRatio: '81', // 压缩率(%)
mimeType: 'image/jpeg',
createdAt: 1736966400000
}
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.
- 8d ago First seen · 498 lines · 4,664 tokens per session scan A ba08edaa6abc
huasheng_editor AGENTS.md is an instructions file published in the GitHub repository alchaincyf/huasheng_editor (741 stars, last pushed 2mo ago), licensed MIT. It adds 4,664 tokens to every session, about $0.0233 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
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.
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).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
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.
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).
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.