Data Format Bridgeのロゴ

Data Format Bridge

コミュニティ
sagirimo
data-format-bridge

Convert analysis tables (csv/tsv/xlsx/parquet/h5ad obs-var/rds/sav/dta) into the formats clinicians and statisticians open directly — SPSS .sav, Stata .dta, R .rds with a ready-to-run .R script, GraphPad Prism .pzfx plus a Prism-ready wide CSV, and tidy Excel workbooks. Never touches the input file.

概要

公開者sagirimo
リポジトリBioDSH
スキル名data-format-bridge
スター
65
フォーク
2
同梱ファイル
2
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    sagirimoがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Data Format Bridge」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/sagirimo/BioDSH/tree/main/biodsh-core/skills/data-format-bridge
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sagirimo/BioDSH.git /tmp/BioDSH
mkdir -p .claude/skills
cp -r /tmp/BioDSH/biodsh-core/skills/data-format-bridge .claude/skills/data-format-bridge
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでData Format Bridgeを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にData Format Bridgeを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Data Format Bridgeは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Data format bridge (SPSS / R / Prism / Excel / Stata)

Use this skill whenever a result table has to leave Python: the user says "导出成 SPSS 能打开的", "给我 Prism 能画图的表", "整理成 Excel", "我想在 R 里接着分析", "Stata 文件", or an analysis skill has produced CSVs that a clinician will take to their own statistics software. Also use inspect to look inside files the user brings (.sav, .dta, .rds, .xlsx, .h5ad) before doing anything with them.

Target mapping — what the user says → what you write:

user says--tofiles produced
SPSSsav<name>.sav (original column names kept as variable labels)
R / RStudior<name>.rds + <name>_load.R (readRDS, str, ggplot skeleton) — rds alone gives only the .rds
GraphPad Prismpzfx<name>.pzfx (Column table, one column per group) and <name>_prism_wide.csv
Excelxlsxone sheet per table, frozen header row, auto column widths
Statadta<name>.dta (labels kept)
plain / "通用"csvUTF-8-BOM CSV (Excel/Prism friendly), optional long→wide pivot

Commands

bash
python "<skill dir>/convert.py" inspect --input results/de_table.csv [--sheet obs]
python "<skill dir>/convert.py" convert --input results/de_table.csv --to sav
python "<skill dir>/convert.py" convert --input results/scores.csv --to pzfx --group-col group --value-col score
python "<skill dir>/convert.py" convert --input results/scores.csv --to r [--columns patient,group,score]
python "<skill dir>/convert.py" convert --input results/book.xlsx --to xlsx --sheet Sheet2 --out exports/clean.xlsx
python "<skill dir>/convert.py" h5ad-tables --input data/adata.h5ad --out exports/adata_tables --genes CD8A,GZMB,PDCD1
  • inspect prints shape, columns, dtypes, first 5 rows, missing counts (and SPSS/Stata variable labels when present). For .h5ad it reads only obs/var (no expression matrix); use --sheet obs|var.
  • convert writes into ./exports/ under the current workspace unless --out is given; existing files are never overwritten (a _1, _2 suffix is added and reported in notes). The input file is never modified, and --out equal to the input is refused.
  • --group-col/--value-col pivots a long table (one row per measurement) into one column per group — this is what Prism's Column tables and t-test/ANOVA dialogs expect. Without it, pzfx uses every numeric column as a group and reports what it dropped.
  • h5ad-tables writes obs.csv, var.csv, and with --genes an obs_with_genes.csv (per-cell metadata + expression of those genes, taken as stored in X or --layer). Feed that file back into convert --to sav|pzfx|xlsx for per-cell / per-group statistics outside Python.

Read the JSON output and relay it

Every run reports files, columns_out, and for SPSS/Stata renamed_columns (SPSS names must be ≤64 bytes, letters/digits/underscore, no leading digit, no reserved words like ALL; Stata ≤32 chars) plus type_changes (bool → 0/1, categorical → string, timezone dropped). Tell the user which columns were renamed — the original names are preserved as variable labels so they still appear in SPSS "Variable View" / Stata describe.

After converting, always tell the user the absolute file path and how to open it:

  • SPSS: 文件(File) → 打开(Open) → 数据(Data),选择 .sav;原列名在“变量标签”中。
  • Prism: File → Open 打开 .pzfx;如果 Prism 报错或版本较旧,新建 Column 表后 File → Import 导入 *_prism_wide.csv(CSV/XLSX 导入是最稳妥的路线,.pzfx 是按 Prism 8 的 XML 结构手写的最小文件)。
  • R: 打开 *_load.R,逐行运行;或 df <- readRDS("<path>")。
  • Excel: 直接双击;Stata: File → Open 或 use "<path>", clear。

Environment

Reading needs only pandas. Writers are imported lazily: pyreadstat (sav/dta), pyreadr (rds/r), openpyxl (xlsx), anndata (h5ad). If a run errors with "package ... is not installed", run the uv pip install <pkg> command from the message and retry; the BioDSH env pack “统计与临床” installs pyreadstat and openpyxl (add pyreadr with uv pip install pyreadr).

Rules

  • Never overwrite or edit the input; never write outside exports/ unless the user asked for a specific --out.
  • Do not "fix" the data while converting (no dropping rows, no recoding) — if the table needs cleaning, do it as a separate, explained step and keep the original.
  • Missing values stay missing (empty cell in Prism/Excel, system-missing in SPSS/Stata, NA in R); say so if the user asks about blanks.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Data Format Bridge」では何ができますか?

Convert analysis tables (csv/tsv/xlsx/parquet/h5ad obs-var/rds/sav/dta) into the formats clinicians and statisticians open directly — SPSS .sav, Stata .dta, R .rds with a ready-to-run .R script, GraphPad Prism .pzfx plus a Prism-ready wide CSV, and tidy Excel workbooks. Never touches the input file.

TypingMindでData Format Bridgeを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Data Format Bridgeはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにData Format Bridgeをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/sagirimo/BioDSH/tree/main/biodsh-core/skills/data-format-bridgeを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Data Format Bridgeを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Data Format Bridgeで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもData Format Bridgeを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Data Format Bridge」は無料ですか?

はい。sagirimoがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇