Back to Rules
๐Ÿ“‹

Markdown Flow CLAUDE.md

MarkdownFlow extends standard Markdown with AI to create personalized, interactive documents. Tagline: "Write Once, Deliver Personally"

ai-shifu

by @ai-shifu

Sourced from ai-shifu/markdown-flow โ€” CC0-1.0

View profile
CLAUDE.md
> Sourced from [ai-shifu/markdown-flow](https://github.com/ai-shifu/markdown-flow) โ€” [CC0-1.0](https://github.com/ai-shifu/markdown-flow/blob/6e9f8740826cb56f7bd8a5d1b312388d607daab7/CLAUDE.md).

# MarkdownFlow Agent Guide

_This document is shared by `CLAUDE.md`, `AGENTS.md`, and `GEMINI.md`._

Follow these notes alongside any agent-specific instructions provided by the hosting platform.

## Project Overview

MarkdownFlow is a Markdown format extension that enables AI-powered, personalized, and interactive documents. The tagline is "Write Once, Deliver Personally" (ไธ€ๆฌกๅˆ›ไฝœ๏ผŒๅƒไบบๅƒ้ข). Documents written in MarkdownFlow can be processed by MarkdownFlow Agents to create well-formatted, personalized pages tailored to each reader.

## Repository Structure

This is the main documentation and landing page repository for the MarkdownFlow ecosystem. It contains:

- `home/index.html` - Homepage with project overview and examples
- `docs/` - MkDocs-based documentation site
- `.github/workflows/` - GitHub Actions for automated deployment

The actual MarkdownFlow implementations are in separate repositories under the ai-shifu organization:

- Frontend: markdown-flow-ui, remark-flow, markdown-it-flow
- Backend: markdown-flow-agent-py, markdown-flow-agent-go

## Common Commands

### Documentation Development

```bash
# Install MkDocs dependencies
pip install mkdocs-material pymdown-extensions

# Run MkDocs locally
cd docs
mkdocs serve

# Build documentation
mkdocs build --site-dir site --clean
```

### Pre-commit Hooks

```bash
# Install pre-commit
pip install pre-commit

# Install hooks
pre-commit install

# Run manually on all files
pre-commit run --all-files
```

### Deployment

The site automatically deploys to GitHub Pages when pushing to main branch via `.github/workflows/deploy-gh-pages.yml`. The workflow:

1. Copies the static homepage from `home/` and shared assets into `_site/`
2. Builds MkDocs documentation to `_site/docs/`
3. Deploys to GitHub Pages

## MarkdownFlow Core Principle

**IMPORTANT**: MarkdownFlow documents are written **for AI agents, not for human readers**. This is the fundamental paradigm that must be understood and applied throughout all documentation and examples.

- Content in MarkdownFlow documents serves as **instructions/prompts for AI** to generate personalized content
- Examples should demonstrate **AI instructions**, not direct user-facing content
- Traditional approach: "Welcome, John!" (content for humans)
- MarkdownFlow approach: "Generate a welcoming message for {{user_name}}" (instruction for AI)

## MarkdownFlow Syntax

The core MarkdownFlow syntax extensions:

1. **Variables**: `{{variable_name}}` - Dynamic content placeholders
2. **User Input**: `?[%{{variable}}Option1|Option2]` - Interactive buttons that store user choices
3. **Preserved Content**: `===content===` - Content that should not be interpreted by AI

## Documentation Guidelines

When updating documentation:

- Main documentation entry point is `docs/docs/en/index.md`
- Use formal, official tone for documentation
- **ALL examples must follow MarkdownFlow core principle**: Show AI instructions, not user content
- Examples should demonstrate practical use cases with proper "writing for AI" approach
- Navigation structure is defined in `docs/mkdocs.yml`
- Ensure consistency with the paradigm: "You write prompts for AI, not content for humans"

## Linting and Formatting

The repository uses:

- **markdownlint** for Markdown linting (config: `.markdownlint.yaml`)
- **prettier** for Markdown formatting
- **pre-commit** hooks that run automatically on commit

Key linting rules:

- Use ATX-style headings (`#`)
- Use dashes for unordered lists (`-`)
- Use fenced code blocks
- Line length limit is disabled (MD013: false)

## Important Files

- `.github/workflows/deploy-gh-pages.yml` - GitHub Pages deployment configuration
- `docs/mkdocs.yml` - MkDocs configuration and navigation structure
- `.pre-commit-config.yaml` - Pre-commit hooks configuration
- `.markdownlint.yaml` - Markdown linting rules

## Translation Glossary (Chinese)

This glossary provides standardized Chinese translations for MarkdownFlow terminology. It should be used as reference for all Chinese localization work to ensure consistency.

### Core Brand Terms

| English | Chinese | Notes |
|---------|---------|-------|
| MarkdownFlow | MarkdownFlow | Keep English brand name |
| MDFlow | MDFlow | Keep English abbreviation |
| MDF | MDF | Keep English abbreviation |

### Core Concepts

| English | Chinese | Notes |
|---------|---------|-------|
| Write Once, Deliver Personally | ไธ€ๆฌกๅˆ›ไฝœ๏ผŒๅƒไบบๅƒ้ข | Project tagline |
| Write prompts for AI, not content for humans | ไธบ AI ๅ†™ๆ็คบ่ฏ๏ผŒ่€Œ้žไธบไบบ็ฑปๅ†™ๅ†…ๅฎน | Core principle |
| AI-powered personalized documents | AI ้ฉฑๅŠจ็š„ไธชๆ€งๅŒ–ๆ–‡ๆกฃ | |
| Instructions for AI | AI ๆŒ‡ไปค | |

### Syntax Elements

| English | Chinese | Notes |
|---------|---------|-------|
| Variables | ๅ˜้‡ | `{{variable}}` |
| Interactive Elements | ไบคไบ’ๅ…ƒ็ด  | |
| Button| ๆŒ‰้’ฎ| `?[%{{var}}Option]` |
| Input | ่พ“ๅ…ฅๆก†| `?[%{{var}}...input hint]` |
| Preserved Content | ็กฎๅฎšๅ†…ๅฎน | `===content===` |
| Preserved Output | ็กฎๅฎš่พ“ๅ‡บ| Same as above |

### Document Structure

| English | Chinese | Notes |
|---------|---------|-------|
| Content Prompt | ๅ†…ๅฎนๆ็คบ่ฏ | Document body |
| Document Prompt | ๆ–‡ๆกฃๆ็คบ่ฏ | Global settings |
| Template | ๆจกๆฟ | |
| Block | ๅ— | |
| Content Block | ๅ†…ๅฎนๅ— | |
| Interaction Block | ไบคไบ’ๅ— | |
| Interaction | ไบคไบ’ | |
| Preserved Content |  ็กฎๅฎšๅ†…ๅฎน | |

### Technical Components

| English | Chinese | Notes |
|---------|---------|-------|
| MarkdownFlow Agent | MarkdownFlow ๆ™บ่ƒฝไฝ“ | Processing engine |
| Frontend | ๅ‰็ซฏ | |
| Backend | ๅŽ็ซฏ | |
| SDK | SDK | Keep English |
| Playground | ไฝ“้ชŒๅฐ | Interactive testing platform |
| Parser | ่งฃๆžๅ™จ | |
| Renderer | ๆธฒๆŸ“ๅ™จ | |

### Operations

| English | Chinese | Notes |
|---------|---------|-------|
| Parse | ่งฃๆž | |
| Render | ๆธฒๆŸ“ | |
| Generate | ็”Ÿๆˆ | |
| Process | ๅค„็† | |
| Execute | ๆ‰ง่กŒ | |
| Analyze | ๅˆ†ๆž | |
| Build | ๆž„ๅปบ | |
| Deploy | ้ƒจ็ฝฒ | |

### Documentation Sections

| English | Chinese | Notes |
|---------|---------|-------|
| Getting Started | ๅฟซ้€Ÿๅผ€ๅง‹ | |
| Introduction | ็ฎ€ไป‹ | |
| Core Concepts | ๆ ธๅฟƒๆฆ‚ๅฟต | |
| Quick Start | ๅฟซ้€ŸไธŠๆ‰‹ | |
| Integration | ้›†ๆˆ | |
| Next Steps | ไธ‹ไธ€ๆญฅ | |
| Specification | ่ง„่Œƒ่ฏดๆ˜Ž | |
| Overview | ๆฆ‚่งˆ | |
| How It Works | ๅทฅไฝœๅŽŸ็† | |

## Content Consistency Rules

### Homepage Content Management

**CRITICAL**: The homepage has two content sources that MUST be kept in sync:

1. **Static HTML** (`home/index.html` and `home/zh/index.html`) - For SEO and initial page load
2. **Dynamic JavaScript** (`home/translations.js`) - The actual content users see

**The single source of truth is `home/translations.js`**. When updating homepage content:

1. ALWAYS update `home/translations.js` first (both English and Chinese sections)
2. Then update `home/index.html` to match the English version from translations.js
3. Update `home/zh/index.html` to match the Chinese version from translations.js
4. Update README files to use the same descriptions from translations.js
5. Never update only one file - they must always be synchronized

This prevents inconsistencies where:

- Search engines index different content than what users see
- Static HTML shows outdated information before JavaScript loads
- Different descriptions appear in various project locations

### Areas Requiring Synchronization

- Hero section (title and description)
- Features section (icons, titles, descriptions)  
- Playground section (CTA text and subtext)
- Projects section (all project descriptions)
- Footer text

Add to your project

Paste into your project's CLAUDE.md or ~/.claude/CLAUDE.md for global rules.

More for Java

๐ŸŸข

Node.js Express API

by @Claude Rules

Building scalable Node.js REST APIs with Express, middleware, and proper async patterns.

Node.jsExpressJavaScript
๐Ÿ“‹

Awesome Claude Notes CLAUDE.md

by @loulanyue

๐Ÿ„ ๅธฎๅŠฉไฝ ๅฟซ้€Ÿๆญๅปบ Claude Code ไธŽ AI Agent ็”ŸไบงๅŠ›ๅทฅไฝœๆต็š„ๅฎžๆˆ˜ไป“ๅบ“ ๐Ÿ„ A practical toolkit to help you quickly build high-productivity workflows for Claude Code and AI agents

PythonNode.jsJavaScript
๐Ÿ“‹

Coolify Docs CLAUDE.md

by @coollabsio

Documentation for Coolify

TypeScriptVue.jsDockerTailwind CSSJavaScript
๐Ÿ“‹

Transcriber CLAUDE.md

by @kossakovsky

Automated video-to-text transcription powered by ElevenLabs Scribe API with multi-language support and speaker diarization

Node.jsJavaTypeScript
๐Ÿ“‹

Llm Driven System Design CLAUDE.md

by @evgenyvinnik

Collection of the system designs driven by LLMs

ReactTypeScriptPythonRustNode.jsJavaDockerKubernetes
๐Ÿ“‹

Obsidian Wechat Converter CLAUDE.md

by @DavidLam-oss

Obsidian ๅพฎไฟกๅ…ฌไผ—ๅทๆŽ’็‰ˆๆ’ไปถใ€‚ๆ”ฏๆŒ Markdown ่ฝฌๅ…ฌไผ—ๅทๆ ทๅผใ€ไธ€้”ฎๅŒๆญฅ่‰็จฟ็ฎฑใ€ๆœฌๅœฐๅ›พ็‰‡่‡ชๅŠจไธŠไผ ใ€ๅฎŒ็พŽๆ”ฏๆŒ LaTeX ๆ•ฐๅญฆๅ…ฌๅผ (SVG)ใ€ๆ”ฏๆŒๆ ‡็‚น็ฌฆๅทไธญๆ–‡ๆ ‡ๅ‡†ๅŒ–ๅค„็†ใ€‚่ฎฉๆŠ€ๆœฏๅ†™ไฝœๅ›žๅฝ’็บฏ็ฒนใ€‚

TypeScriptNode.jsRuby on RailsJavaJavaScript

MCP servers for Java

Browse all MCP servers โ†’

Browse by Tag

Get the Claude Code Starter Pack

Top CLAUDE.md rules for Next.js, TypeScript, Python, Go, and React โ€” free.