# Markdown To Textile Codeclass

> Convert Japanese technical Markdown to Textile. Use when asked to "textileに変換", especially when code highlighting must use explicit <pre><code class="..."> blocks. Prioritize user-specified class names (for example javascript/js/html/shell/cpp).

- Skill: `jj1guj/markdown-to-textile-codeclass` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add jj1guj/markdown-to-textile-codeclass`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jj1guj/markdown-to-textile-codeclass/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: jj1guj (https://skillmd.com/u/jj1guj)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/jj1guj/markdown-to-textile-codeclass

---


# Markdown To Textile (Code Class Style)

## When to Use

- User requests Markdown to Textile conversion.
- Target renderer requires `<pre><code class="...">` style for syntax highlight.
- Source contains many fenced code blocks and inline backticks.
- User wants output in chat without editing files.

## Output Rules

- Preserve original meaning, sentence order, and technical identifiers.
- Convert headings:
  - `#` -> `h1.`
  - `##` -> `h2.`
  - `###` -> `h3.`
- Convert inline code to Textile `@...@`.
- Convert links:
  - `[text](url)` -> `"text":url`
  - raw URL -> `"url":url`
- Convert lists:
  - unordered -> `*`
  - ordered -> `#`
  - nested levels by repeated markers (`**`, `##`).
- Convert every fenced block to:
  - `<pre><code class="CLASS">`
  - `...</code></pre>`

## Class Selection Logic

1. If user specifies class naming, use that exactly.
2. If user does not specify, infer from fence hint.
3. If ambiguous, use common defaults:
   - `js` fence -> `javascript`
   - `sh`/`bash` fence -> `shell`

## Procedure

1. Parse source and locate all headings, links, lists, inline code, and fenced blocks.
2. Convert prose syntax first (headings, inline code, links, lists).
3. Replace each fenced block with HTML code tags and resolved class.
4. Keep code body unchanged as much as possible.
5. Validate:
   - no remaining triple-backtick fences
   - all `<pre><code ...>` have matching `</code></pre>`
   - inline backticks are converted to `@...@`

## Completion Checklist

- Textile output is copy-paste ready.
- Code highlight format is consistent across all blocks.
- Class names follow user preference.
- No semantic drift in explanatory text.

