marp-mcp
CLAUDE.md14 starsChanged 9 months agoMITView on GitHub
- Commits and pushes
In this repositoryOne other file it gives its agents.
- marpSkill
The file
We found no rules to list in this file: it reads as prose or reference rather than instructions.
Files
CLAUDE.md — 開発エッセンス
ドキュメント自動生成(最重要)
README.md、skills/marp/SKILL.md、assets/examples/md/はすべて Jest テスト内で自動生成されるpnpm testを実行すると上書きされるため、内容を変えたい場合は対応する generator テストを修正する- README →
src/__tests__/readme-generator.test.ts - SKILL.md →
src/__tests__/skill-generator.test.ts - Examples →
src/styles/__tests__/example-generator.test.ts、src/themes/__tests__/example-generator.test.ts
- README →
.claude/skills/marp/SKILL.mdはskills/marp/SKILL.mdへのシンボリックリンク- generator テストも
pnpm testに含まれるため、テスト実行 = ドキュメント再生成
ESM + TypeScript
"type": "module"プロジェクト。import は必ず.js拡張子をつける(import { foo } from "./bar.js")- ビルド:
tsc→build/に出力
ツール追加パターン
src/tools/{name}.tsに Zod スキーマ + async ハンドラsrc/mcp.tsでserver.tool(name, description, schema.shape, handler)—.shapeを渡すことsrc/cli/commands.tsに CLI サブコマンド追加- レスポンスは
createErrorResponse()/createSuccessResponse()(src/utils/response.ts)を使う
テーマ・スタイル追加パターン
- テーマ:
src/themes/{name}/index.tsでThemeDefinitionをエクスポート →src/themes/index.tsのthemesに登録 - スタイル:
src/styles/{name}/index.ts+css.ts→src/styles/index.tsのstylesに登録 - スタイルのレイアウトは同名のテーマレイアウトをオーバーライドする
- 追加後は generator テストのサンプルパラメータも追加すること
スライド分割
splitSlides()(src/utils/frontmatter.ts)を必ず使う。正規表現を直接書かないこと
Marp 画像モーフィング(CSS View Transitions)
は CSSbackground-imageになるため DOM の<img>がなくview-transition-nameが効かない- フルスクリーン画像は
<!-- _class: img-fullscreen -->+ inlineパターンを使う - alt の非キーワード語はそのまま HTML
alt属性になる →img[alt~="name"]で両スライドをターゲットできる
テスト規約
- 一時ディレクトリ:
fs.mkdtemp(path.join(os.tmpdir(), "marp-{prefix}-")) beforeEachでsetActiveTheme("default")を呼んでテーマ状態リセット
パッケージ管理 (pnpm)
- パッケージマネージャーは pnpm(
pnpm installでロックファイルpnpm-lock.yamlを更新) npm publish/npm versionは pnpm プロジェクトでもそのまま動作する"files":build,.claude/skills,README.md,LICENSEのみ公開
リリースフロー
changelog/{version}.mdを作成してリリースノートを書くnpm version {version}でバージョンバンプ+タグ作成git push && git push --tagsでプッシュ → GitHub Actions が自動で GitHub Release を作成npm publishで npm に手動公開
CI
- テスト: Node 18.x / 20.x / 22.x(pnpm でインストール)
- examples の HTML は CI で GitHub Pages にデプロイ(
assets/examples/html/は.gitignore対象) - タグ push(
v*)で GitHub Release を自動作成(changelog/{version}.mdがリリースノート) - changelog は
--notes-fileでそのまま渡す設計のため、内容に制限なし(backtick 等も問題なし)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

