| name | text-formatter |
| description | Transform and optimize text content with intelligent formatting. Output BBCode + Markdown hybrid format optimized for forums. Triggers on "format text", "text formatter", "ๆ็", "ๆ ผๅผๅๆๆฌ", "BBCode". |
| allowed-tools | Task, AskUserQuestion, Read, Write, Bash, Glob |
Resource Map
ๅบๅ่ทฏๅพ: .claude/skills/documentation-specialist/references/domains/text-formatting/
text-formatting/
โโโ phases/
โ โโโ 01-input-collection.md
โ โโโ 02-content-analysis.md
โ โโโ 03-format-transform.md
โ โโโ 04-output-preview.md
โโโ specs/
โ โโโ callout-types.md
โ โโโ element-mapping.md
โ โโโ format-rules.md
โโโ templates/
โ โโโ bbcode-template.md
โโโ SKILL.md
Text Formatter
Transform and optimize text content with intelligent structure analysis. Output format: BBCode + Markdown hybrid optimized for forum publishing.
Architecture Overview
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Text Formatter Architecture (BBCode + MD Mode) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Phase 1: Input Collection โ ๆฅๆถๆๆฌ/ๆไปถ โ
โ โ โ
โ Phase 2: Content Analysis โ ๅๆ็ปๆใ่ฏๅซ Callout/Admonition โ
โ โ โ
โ Phase 3: Format Transform โ ่ฝฌๆขไธบ BBCode+MD ๆ ผๅผ โ
โ โ โ
โ Phase 4: Output & Preview โ ไฟๅญๆไปถ + ้ข่ง โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Key Design Principles
- Single Format Output: BBCode + Markdown hybrid (forum optimized)
- Pixel-Based Sizing: size=150/120/100/80 (not 1-7 levels)
- Forum Compatibility: Only use widely-supported BBCode tags
- Markdown Separators: Use
--- for horizontal rules (not [hr])
- No Alignment Tags:
[align] not supported, avoid usage
Format Specification
Supported BBCode Tags
| Tag | Usage | Example |
|---|
[size=N] | Font size (pixels) | [size=120]Title[/size] |
[color=X] | Text color (hex/name) | [color=#2196F3]Blue[/color] ๆ [color=blue] |
[b] | Bold | [b]Bold text[/b] |
[i] | Italic | [i]Italic[/i] |
[s] | Strikethrough | [s]deleted[/s] |
[u] | Underline | [u]underlined[/u] |
[quote] | Quote block | [quote]Content[/quote] |
[code] | Code block | [code]code[/code] |
[img] | Image | [img]url[/img] |
[url] | Link | [url=link]text[/url] |
[list] | List container | [list][*]item[/list] |
[spoiler] | Collapsible content | [spoiler=ๆ ้ข]้่ๅ
ๅฎน[/spoiler] |
HTML to BBCode Conversion
| HTML Input | BBCode Output |
|---|
<mark>้ซไบฎ</mark> | [color=yellow]้ซไบฎ[/color] |
<u>ไธๅ็บฟ</u> | [u]ไธๅ็บฟ[/u] |
<details><summary>ๆ ้ข</summary>ๅ
ๅฎน</details> | [spoiler=ๆ ้ข]ๅ
ๅฎน[/spoiler] |
Unsupported Tags (Avoid!)
| Tag | Reason | Alternative |
|---|
[align] | Not rendered | Remove or use default left |
[hr] | Shows as text | Use Markdown --- |
<div> | HTML not supported | Use BBCode only |
[table] | Limited support | Use list or code block |
Size Hierarchy (Pixels)
| Element | Size | Color | Usage |
|---|
| Main Title | 150 | #2196F3 | Document title |
| Section Title | 120 | #2196F3 | Major sections (## H2) |
| Subsection | 100 | #333 | Sub-sections (### H3) |
| Normal Text | (default) | - | Body content |
| Notes/Gray | 80 | gray | Footnotes, metadata |
Color Palette
| Color | Hex | Semantic Usage |
|---|
| Blue | #2196F3 | Titles, links, info |
| Green | #4CAF50 | Success, tips, features |
| Orange | #FF9800 | Warnings, caution |
| Red | #F44336 | Errors, danger, important |
| Purple | #9C27B0 | Examples, code |
| Gray | gray | Notes, metadata |
Mandatory Prerequisites
Read before execution:
Execution Flow
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Phase 1: Input Collection โ
โ - Ask: paste text OR file path โ
โ - Output: input-config.json โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Phase 2: Content Analysis โ
โ - Detect structure: headings, lists, code blocks, tables โ
โ - Identify Callouts/Admonitions (>[!type]) โ
โ - Output: analysis.json โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Phase 3: Format Transform โ
โ - Apply BBCode + MD rules from specs/format-rules.md โ
โ - Convert elements with pixel-based sizes โ
โ - Use Markdown --- for separators โ
โ - Output: formatted content โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Phase 4: Output & Preview โ
โ - Save to .bbcode.txt file โ
โ - Display preview โ
โ - Output: final file โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Callout/Admonition Support
ๆฏๆ Obsidian ้ฃๆ ผ็ Callout ่ฏญๆณ๏ผ่ฝฌๆขไธบ BBCode quote๏ผ
> [!NOTE]
> ่ฟๆฏไธไธชๆ็คบไฟกๆฏ
> [!WARNING]
> ่ฟๆฏไธไธช่ญฆๅไฟกๆฏ
่ฝฌๆข็ปๆ๏ผ
[quote]
[size=100][color=#2196F3][b]๐ ๆณจๆ[/b][/color][/size]
่ฟๆฏไธไธชๆ็คบไฟกๆฏ
[/quote]
| Type | Color | Icon |
|---|
| NOTE/INFO | #2196F3 | ๐ |
| TIP/HINT | #4CAF50 | ๐ก |
| SUCCESS | #4CAF50 | โ
|
| WARNING/CAUTION | #FF9800 | โ ๏ธ |
| DANGER/ERROR | #F44336 | โ |
| EXAMPLE | #9C27B0 | ๐ |
Directory Setup
const timestamp = new Date().toISOString().slice(0,10).replace(/-/g, '');
const workDir = `.workflow/.scratchpad/text-formatter-${timestamp}`;
Bash(`mkdir -p "${workDir}"`);
Output Structure
.workflow/.scratchpad/text-formatter-{date}/
โโโ input-config.json # ่พๅ
ฅ้
็ฝฎ
โโโ analysis.json # ๅ
ๅฎนๅๆ็ปๆ
โโโ output.bbcode.txt # BBCode+MD ่พๅบ
Reference Documents