Communitygithub.com

markdown-mermaid-writing

MarkdownとMermaid図表作成に関する包括的なスキル。科学的な文書、レポート、分析、可視化を作成する際に使用します。デフォルトのドキュメント標準としてテキストベースの図表を確立し、完全なスタイルガイド(Markdown + Mermaid)、24種類の図表タイプリファレンス、9種類のドキュメントテンプレートを提供します。

markdown-mermaid-writing とは?

このスキルは、Markdownファイルに埋め込まれたMermaid図表をデフォルトかつ正規の形式として、科学的なドキュメント作成の標準を強制します。テキストベースの図表はGitの差分が明確で、ビルド不要で、GitHub、GitLab、Notion、VS Codeなどのさまざまなプラットフォームでネイティブにレンダリングされ、後日いつでも画像に変換可能なため、ソースオブトゥルースとして機能します。スキルはMarkdownスタイルガイド(733行)、Mermaidスタイルガイド(458行)、24種類の図表タイプ(フローチャート、シーケンス図、ER図など)ごとのリファレンスガイド、9種類のドキュメントテンプレート(プルリクエスト、議事録、ADR、研究論文など)を提供します。ワークフローは3つのフェーズで構成され、フェーズ1(Markdown内のMermaid)が常に必須であり、フェーズ2(Python生成チャート)とフェーズ3(AI生成ビジュアル)はオプションです。Mermaidが表現できない散布図や写真のようにリアルな画像などの場合にのみ、PythonやAI画像生成に切り替えます。スキルにはアクセシビリティ(accTitle/accDescr)、スタイルガイド(classDefの使用、%%{init}の禁止)、レーダーチャート構文(radar-beta)などの一般的な落とし穴に関する詳細なガイダンスが含まれています。他のスキル(scientific-schematics、scientific-writing、literature-review)と統合して、出力ドキュメントがすべての標準に準拠していることを確認するためのチェックリストを提供します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/markdown-mermaid-writing

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

MarkdownとMermaidライティング

概要

このスキルは、Markdownに埋め込まれたMermaid図表をデフォルトかつ正規の形式として使用する科学的なドキュメント作成の標準を教え、強制します。

核となる考え方:** .md ファイル内のMermaid図表として表現された関係は、画像よりもはるかに価値があります。テキストなのでGitでクリーンに差分を確認でき、ビルドステップは不要で、GitHub、GitLab、Notion、VS Code、その他あらゆるMarkdownビューアでネイティブにレンダリングされます。同じ関係を散文で説明するよりトークンが少なくて済み、後でいつでも洗練された画像に変換できます。そして、テキストバージョンは常にソースオブトゥルースとして残ります。

「レポートやファイルを.mdの通常のテキスト、つまりMermaidもシンプルな‘スクリプト言語’として使うほど、下流のレンダリング、特にAI生成画像において役立ちます(Mermaidは関係を説明する長文テキストよりもトークンが少なくて済みます)。さらにMermaidはMarkdownと一緒にレンダリングできるため、人間やAIがほぼどこでも簡単に使用できます。」

— Clayton Young (@borealBytes)、K-Dense Discord、2026-02-19

このスキルを使用するタイミング

以下の場合にこのスキルを使用します:

  • 科学的な文書 — レポート、分析、原稿、方法セクションを作成する場合
  • ドキュメント — README、ハウツー、意思決定記録、プロジェクトドキュメントを作成する場合
  • 図表 — ワークフロー、データパイプライン、アーキテクチャ、タイムライン、関係図を作成する場合
  • バージョン管理される出力 — Gitにコミットされるものであれば、Markdownにすべき場合
  • 他のスキルとの連携 — このスキルは他のすべての出力をラップするドキュメントレイヤーを定義します
  • 誰かに「図を追加して」または「関係を可視化して」と頼まれた場合 — 常に最優先でMermaidを使用

構造的または関係的な図表に対して、Pythonのmatplotlib、seaborn、またはAI画像生成から始めないでください。これらはフェーズ2とフェーズ3であり、Mermaidで必要なものを表現できない場合(例:実データの散布図、フォトリアリスティックな画像)にのみ使用します。

🎨 ソース形式の哲学

テキストベースの図表が勝る理由

重要なポイントMarkdown内のMermaidPython / AI画像
Git差分の可読性✅❌ バイナリブロブ
再生成せずに編集可能✅❌
散文よりもトークン効率が良い✅ 小さい❌ 大きい
ビルドステップなしでレンダリング✅❌ ホスティングが必要
視覚なしでAIが解析可能✅❌
GitHub / GitLab / Notionで動作✅⚠️ ホスティングされている場合
アクセシブル(スクリーンリーダー)✅ accTitle/accDescr⚠️ 代替テキストが必要
後で画像に変換可能✅ いつでも— すでに画像

3フェーズのワークフロー

flowchart LR
    accTitle: 3フェーズのドキュメントワークフロー
    accDescr: フェーズ1のMarkdown内Mermaidは常に必須であり、ソースオブトゥルースです。フェーズ2と3は、洗練された出力のためのオプションの下流変換です。

    p1["📄 フェーズ1<br/>Markdown内のMermaid<br/>(常に — ソースオブトゥルース)"]
    p2["🐍 フェーズ2<br/>Python生成<br/>(オプション — データチャート)"]
    p3["🎨 フェーズ3<br/>AI生成ビジュアル<br/>(オプション — 仕上げ)"]
    out["📊 最終成果物"]

    p1 --> out
    p1 -.->|"必要な場合"| p2
    p1 -.->|"必要な場合"| p3
    p2 --> out
    p3 --> out

    classDef required fill:#dbeafe,stroke:#2563eb,stroke-width:2px,color:#1e3a5f
    classDef optional fill:#fef9c3,stroke:#ca8a04,stroke-width:2px,color:#713f12
    classDef output fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#14532d

    class p1 required
    class p2,p3 optional
    class out output

フェーズ1は必須です。 フェーズ2または3に進む場合でも、Mermaidソースはコミットされたままになります。

Mermaidで表現できること

Mermaidは24種類の図表タイプをカバーしています。ほとんどすべての科学的な関係はそのいずれかに該当します:

ユースケース図表タイプファイル
実験ワークフロー/決定ロジックフローチャートreferences/diagrams/flowchart.md
サービス間インタラクション/APIコール/メッセージングシーケンス図references/diagrams/sequence.md
データモデル/スキーマER図references/diagrams/er.md
ステートマシン/ライフサイクル状態図references/diagrams/state.md
プロジェクトタイムライン/ロードマップガントチャートreferences/diagrams/gantt.md
割合/構成円グラフreferences/diagrams/pie.md
システムアーキテクチャ(ズームレベル)C4図references/diagrams/c4.md
概念階層/ブレインストーミングマインドマップreferences/diagrams/mindmap.md
時系列イベント/歴史タイムラインreferences/diagrams/timeline.md
クラス階層/タイプ関係クラス図references/diagrams/class.md
ユーザージャーニー/満足度マップユーザージャーニーreferences/diagrams/user_journey.md
2軸比較/優先順位付け象限図references/diagrams/quadrant.md
要件トレーサビリティ要件図references/diagrams/requirement.md
フローの大きさ/リソース分布サンキー図references/diagrams/sankey.md
数値トレンド/棒グラフ+折れ線グラフXYチャートreferences/diagrams/xy_chart.md
コンポーネントレイアウト/空間配置ブロック図references/diagrams/block.md
作業項目ステータス/タスク列カンバンreferences/diagrams/kanban.md
クラウドインフラ/サービストポロジアーキテクチャ図references/diagrams/architecture.md
多次元比較/スキルレーダーレーダーチャートreferences/diagrams/radar.md
階層的割合/予算ツリーマップreferences/diagrams/treemap.md
バイナリプロトコル/データ形式パケット図references/diagrams/packet.md
Gitブランチング/マージ戦略Gitグラフreferences/diagrams/git_graph.md
コードスタイルシーケンス(プログラミング構文)ZenUMLreferences/diagrams/zenuml.md
複数図表構成パターン複雑な例references/diagrams/complex_examples.md

💡 簡単なタイプではなく、適切なタイプを選んでください。 すべてにフローチャートをデフォルトにしないでください。時系列イベントにはタイムラインの方が優れています。サービス間インタラクションにはシーケンス図の方が優れています。表をスキャンして一致するものを選んでください。


🔧 コアワークフロー

ステップ1: ドキュメントタイプを特定する

ゼロから書き始める前にテンプレートが存在するか確認してください:

ドキュメントタイプテンプレート
プルリクエスト記録templates/pull_request.md
Issue / バグ / 機能リクエストtemplates/issue.md
スプリント / プロジェクトボードtemplates/kanban.md
アーキテクチャ決定記録 (ADR)templates/decision_record.md
プレゼンテーション / ブリーフィングtemplates/presentation.md
研究論文 / 分析templates/research_paper.md
プロジェクトドキュメントtemplates/project_documentation.md
ハウツー / チュートリアルtemplates/how_to_guide.md
ステータスレポートtemplates/status_report.md

ステップ2: スタイルガイドを読む

.md ファイルを書く前に references/markdown_style_guide.md を読んでください。

内面化すべき主要ルール:

  • ドキュメントにつきH1は1つ — タイトル。それ以上は不可。
  • 絵文字はH2見出しのみ — H2ごとに1つの絵文字、H3/H4にはなし
  • すべてを引用する — 外部の主張はすべてフルURL付きの脚注 [^N] を取得
  • 太字は控えめに — 段落あたり最大2〜3の太字用語、完全な文は不可
  • すべての </details> の後に水平線 — 必須
  • 比較、設定、構造化データには表を散文より優先
  • テキストの壁より図表を優先 — フロー、構造、または関係を説明する場合はMermaidを追加

ステップ3: 図表タイプを選び、そのガイドを読む

Mermaid図表を作成する前に references/mermaid_style_guide.md を読んでください。

次に、特定のタイプファイル(例: references/diagrams/flowchart.md )を開き、模範例、ヒント、コピー&ペースト用テンプレートを確認します。

すべての図表に対する必須ルール:

accTitle: 短い名前 3〜8語
accDescr: この図表が何を示すかを説明する1〜2文。
  • %%{init} ディレクティブなし — GitHubのダークモードで壊れるため
  • インライン style なし — classDef のみ使用
  • ノードあたり絵文字は最大1つ — ラベルの先頭に配置
  • ノードIDは snake_case — ラベルと一致させる

ステップ4: ドキュメントを書く

テンプレートから始めて、Markdownスタイルガイドを適用し、図表を別の「図」セクションではなく、関連するテキストとインラインに配置します。

ステップ5: テキストとしてコミットする

埋め込まれたMermaidを含む .md ファイルがコミットされるものです。PNGやAI画像も生成した場合、それらは補足であり、Markdownがソースです。


⚠️ よくある落とし穴

レーダーチャート構文 (radar-beta)

間違い:

radar
title 例
x-axis ["A", "B", "C"]
"シリーズ" : [1, 2, 3]

正解:

radar-beta
title 例
axis a["A"], b["B"], c["C"]
curve series["シリーズ"]{1, 2, 3}
max 3
  • radar-beta を使用し、radar は使わない(裸のキーワードは存在しない)
  • 次元を定義するには axis を使用し、x-axis は使わない
  • データ系列を定義するには curve を使用し、コロン付きの引用ラベルは使わない
  • accTitle/accDescr なし — radar-betaはアクセシビリティアノテーションをサポートしていません。図表の上には常に説明的なイタリック体の段落を追加すること

XYチャートとレーダー chartの混同

図表キーワード軸構文データ構文
XYチャート(棒/線)xychart-betax-axis ["ラベル1", "ラベル2"]bar [10, 20] または line [10, 20]
レーダー(蜘蛛/網)radar-betaaxis id["ラベル"]curve id["ラベル"]{10, 20}

サポートされているタイプで accTitle/accDescr を忘れる

accTitle/accDescr をサポートしている図表タイプは一部のみです。サポートしていないタイプの場合は、コードブロックの直上に説明的なイタリック体の段落を常に配置してください:

5つのパフォーマンス次元にわたって3つの方法を比較するレーダーチャート。注:レーダーチャートはaccTitle/accDescrをサポートしていません。

radar-beta
...

🔗 他のスキルとの統合

scientific-schematics との連携

scientific-schematics はAI駆動の出版品質画像(PNG)を生成します。Mermaid図表を図のブリーフとして使用します:

ワークフロー:
1. 概念をMermaidで.mdファイルに作成(このスキル — フェーズ1)
2. 同じ概念をscientific-schematicsに説明し、洗練されたPNGを生成(フェーズ3)
3. 両方をコミット — .mdをソースとして、PNGを補足図として

scientific-writing との連携

scientific-writing が原稿を作成する場合、すべての図と構造図はこのスキルの標準を使用する必要があります。ライティングスキルは散文と引用を処理し、このスキルは視覚構造を処理します。

ワークフロー:
1. scientific-writingを使用して原稿を起草する
2. ワークフロー、アーキテクチャ、または関係を示すすべての図について:
   - プレースホルダーをこのスキルのガイドに従ったMermaid図表に置き換える
3. 本当にフォトリアリスティック/複雑なレンダリングが必要な図にのみscientific-schematicsを使用する

literature-review との連携

文献レビューは多くの関係データを含む要約を生成します。このスキルを使用して:

  • 文献のランドスケープの概念マップ(マインドマップ)を作成
  • 出版タイムライン(タイムラインまたはガントチャート)を表示
  • 方法論の比較(象限図またはレーダーチャート)
  • 論文で説明されているデータフローを図示(シーケンス図またはフローチャート)

出力ドキュメントを生成する任意のスキルとの連携

任意のスキルからのドキュメントを最終決定する前に、このスキルのチェックリストを適用します:

  • ドキュメントはテンプレートを使用していますか? もしそうなら、適切なテンプレートから始めましたか?
  • すべての図表は accTitle + accDescr 付きのMermaidですか?
  • %%{init} なし、インライン style なし、classDef のみですか?
  • すべての外部の主張は [^N] で引用されていますか?
  • H1は1つ、絵文字はH2のみですか?
  • すべての </details> の後に水平線がありますか?

📚 リファレンスインデックス

スタイルガイド

ガイドパス行数内容
Markdownスタイルガイドreferences/markdown_style_guide.md~733見出し、書式、引用、テーブル、Mermaid統合、テンプレート、品質チェックリスト
Mermaidスタイルガイドreferences/mermaid_style_guide.md~458アクセシビリティ、絵文字セット、色クラス、テーマニュートラリティ、タイプ選択、複雑度階層

図表タイプガイド(24タイプ)

各ファイルには、プロダクション品質の模範例、そのタイプに固有のヒント、コピー&ペースト用テンプレートが含まれています。

references/diagrams/ — architecture, block, c4, class, complex_examples, er, flowchart, gantt, git_graph, kanban, mindmap, packet, pie, quadrant, radar, requirement, sankey, sequence, state, timeline, treemap, user_journey, xy_chart, zenuml

ドキュメントテンプレート(9タイプ)

templates/ — decision_record, how_to_guide, issue, kanban, presentation, project_documentation, pull_request, research_paper, status_report

例

assets/examples/example-research-report.md — 適切な見出し階層、複数の図表タイプ(フローチャート、シーケンス図、ガントチャート)、テーブル、脚注引用、折りたたみ可能セクション、およびすべてのスタイルガイドルールが適用された完全な科学研究レポート。


📝 帰属

このスキルのすべてのスタイルガイド、図表タイプガイド、およびドキュメントテンプレートは、SuperiorByteWorks-LLC/agent-project リポジトリから Apache-2.0 ライセンスの下で移植されました。

このスキル(scientific-agent-skills の一部として)は MIT ライセンスの下で配布されています。含まれる Apache-2.0 コンテンツは、このスキル全体のファイルヘッダーに保持されている帰属を伴い、下流での使用に互換性があります。


Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

adaptyv

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

alphagenome

Look up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and quantile scores for RNA-seq, DNase, ATAC, ChIP-TF, ChIP-histone, CAGE, PRO-cap, splicing, polyadenylation and contact-map tracks), score variants or scan windows on demand with the AlphaGenome model for human and mouse (variant scoring, in silico mutagenesis, REF-versus-ALT track prediction), and build Atlas website deep links. Use when the user mentions AlphaGenome, AlphaGenome Atlas, AVI or AlphaGenome Variant Impact, DeepMind variant effect prediction, or wants to prioritise or mechanistically interpret non-coding, regulatory, splicing, enhancer, promoter, or chromatin-accessibility effects of SNVs from a VCF, credible set, or region. Research use only; not a clinical tool.

analytical-method-validation

Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP <1220>/<1225>/<1226>, ICH M10 bioanalytical, CLSI EP, or ISO/IEC 17025. Use for HPLC, LC-MS/MS, GC, CE, ICP-MS, dissolution, qNMR, qPCR, NIR, and ligand binding or cell-based assays whenever the question is whether a procedure is fit for its intended purpose. Triggers include

anndata

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

arbor

Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree Refinement (HTR) from the Arbor paper. Use this whenever someone wants to iteratively optimize something over many experiments without overfitting — e.g.

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for large-scale datasets.

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

autoskill

Observe the user

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

bgpt-paper-search

Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server. Returns 25+ fields per paper including methods, results, sample sizes, quality scores, and conclusions. Use for literature reviews, evidence synthesis, and finding experimental details not available in abstracts alone.

bids

>

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.

bulk-rnaseq

End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA enrichment (pathway-enrichment), and publication figures (scientific-visualization). Use whenever the user has bulk RNA-seq reads or quant output and wants a complete, reproducible differential-expression workflow — e.g.

cellxgene-census

Query the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data. Use when you need population-scale cell metadata, gene expression slices, Census summary counts, source H5AD URIs/downloads, embeddings, spatial Census data, or reference atlas comparisons across organisms, tissues, diseases, assays, and cell types. For analyzing your own local single-cell data use scanpy, anndata, or scvi-tools.

cirq

Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

citation-management

Comprehensive citation management for academic research. Search OpenAlex, PubMed, and Google Scholar for papers, extract accurate metadata, validate citations, and generate properly formatted BibTeX entries. This skill should be used when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.

clinical-decision-support

Prepare and validate research-only clinical decision-support evaluation, evidence-profile, cohort, survival, biomarker/model, privacy, and governance artifacts. Use for aggregate or synthetic research documentation and traceability—not patient care or live clinical operation.

clinical-reports

Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports. Use only with synthetic, de-identified, or aggregate inputs and verified source-fact manifests; every output requires qualified review.

関連スキル