/insight-blueprint:data-lineage [design_id] [refactor]from insight-blueprint
Re-export and review the data-transformation lineage of a notebook that /analysis-notebook made. Re-runs .insight/notebooks/{id}.py in the plugin's env to regenerate the Mermaid diagram of row-count changes, and suggests pipeline refactors from it. Triggers: "lineage", "data lineage", "track transformations", "pipeline visualization", "リネージ", "変換追跡", "パイプライン可視化", "行数変化を確認".
Ships in insight-blueprint. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Re-export and review the lineage of the notebook /analysis-notebook made for a design.
The lineage is the row count before and after each tracked_pipe step, drawn as a Mermaid diagram
by insight_blueprint.lineage.
.insight/lineage/{id}.mmd after the notebook or its data changed/analysis-notebook (-> /analysis-notebook)The only target is the notebook /analysis-notebook made: .insight/notebooks/{id}.py. Its
data_prep and analysis cells wrap every transform in tracked_pipe, and its lineage cell
writes .insight/lineage/{id}.mmd. The user installs nothing: the notebook runs in the plugin's
own env, like /analysis-notebook runs it.
If no design_id is given, list .insight/notebooks/*.py and ask the user which one; do not take
refactor as an id.
Check the target before any mode, from the project directory, in this order; stop at the first that fails, so an id with no design never reaches a path or a shell command:
design_io get --id {id} returns the design ({} means there is no such design)..insight/notebooks/{id}.py exists.tracked_pipe (for example, grep -q tracked_pipe .insight/notebooks/{id}.py).If any of the three checks fails (no design, no notebook file, or no tracked_pipe), or the user
asks for a setup subcommand (it was removed in 1.2.0), tell the user that /data-lineage only
takes the notebook /analysis-notebook made at .insight/notebooks/{id}.py, point them to
/analysis-notebook {id} (-> /analysis-notebook) to make or regenerate it, and stop. Do not add tracked_pipe to the file and do not run it.
Run from the project directory (so .insight/… resolves there) with the same command as
/analysis-notebook:
uv run --project "${CLAUDE_PLUGIN_ROOT}" --extra notebook \
python .insight/notebooks/{id}.py
A package of .insight/rules/package_allowlist.yaml that is in neither the notebook extra nor
the default allowlist is supplied with --with <pip-name>; never pass a default-allowlist package
such as insight_blueprint to --with, since the plugin env already ships it. Procedure:
${CLAUDE_PLUGIN_ROOT}/skills/analysis-notebook/references/notebook-contract.md
("Package allowlist — format & supplying packages").
A run executes every cell. It loads the data again and also rewrites
.insight/notebooks/{id}_verdict.json and the figure PNGs, as /analysis-notebook Step 4 does.
Tell the user this before the run. The journal events already recorded from the old verdict stay
as they are; to record the new verdict, use /analysis-notebook {id}.
If the run fails, show the traceback and hand off to /analysis-notebook {id} to fix the notebook.
/data-lineage <design_id>Regenerate the Mermaid diagram. Default mode when no subcommand is given.
Workflow:
.insight/lineage/{id}.mmd/data-lineage <design_id> refactorAnalyze the lineage and suggest pipeline improvements.
Workflow:
.mmd may not match the current code or data. Re-run it to get the current rows..insight/lineage/{id}.mmd (each step's reason, rows after the step and row delta)
with the tracked_pipe calls in the data_prep and analysis cellsImprovement patterns to check:
| Pattern | Condition | Suggestion |
|---|---|---|
| No-op step | delta == 0 | Column add/rename — consider removing from tracked_pipe |
| Consecutive filters | Sequential filters on same column | Merge into single query |
| Large drop | abs(delta) > 50% of input rows | Review filter condition for correctness |
| Order optimization | Later step has higher reduction rate | Move high-reduction filters earlier |
| Redundant filter | Step removes 0 rows | Filter condition may be subset of prior step |
.mmd.insight/lineage/{id}.mmdThe notebook already imports these (imports cell); the skill does not call them directly.
from insight_blueprint.lineage import (
LineageSession, # Session container (one per pipeline)
StepRecord, # Immutable step record (Value Object)
tracked_pipe, # Wrapper for .pipe() chain tracking
export_lineage_as_mermaid, # Mermaid diagram generator
)
| From | To | When |
|---|---|---|
| /data-lineage | → /analysis-journal | Lineage diagram generated: "リネージ結果を証拠として記録するなら /analysis-journal {id}" |
reason parameter in tracked_pipe may be written in Japanese.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub etoyama/insight-blueprint-skills --plugin insight-blueprint15 skills in this plugin
/analysis-autoGuided autopilot and the analyst's single entry. Takes a theme, builds its question tree
(or resumes at the node the latest tree decision names) and walks the tree one decision per round:
design → review → premortem → notebook → journal → reflection → theme reflection →
tree decision. A decision that names several nodes hands their designs over together, after
one check of all of them. Progresses automatically through low-friction steps and
pauses only at genuine decision points (root question and aim, the node to investigate,
intent and the question to explore or the hypothesis, the designs to hand over together,
what a handed-over analysis cannot go on without changing, source registration, cost/risk, code with external effects, conclusion, the results
the theme's answers rest on, the tree decision, sending anything outside this machine).
Triggers: "オートで進めて", "自動で分析を回して", "autopilot", "guided auto",
"最後まで進めて", "analysis auto", "論点を順に調べて".
/analysis-designGuides Claude through creating analysis design documents for hypothesis-driven EDA:
an exploration (a question to measure) or a confirmation (a hypothesis to judge).
Use when the user wants to create, manage, or review analysis designs.
Triggers: "create analysis design", "hypothesis document", "new hypothesis",
"分析設計を作りたい", "仮説を立てたい", "新しい仮説", "仮説ドキュメント".
/analysis-framingExplores existing data and analyses to help frame a question to explore or a hypothesis to confirm.
Triggers: "framing", "何を分析する", "分析テーマ", "仮説を考えたい",
"データを探して", "既存分析を確認", "analysis framing".
/analysis-journalRecords reasoning steps during hypothesis-driven analysis as an Insight Journal.
Supports observation logging, evidence tracking, method decisions, question management,
and hypothesis branching. Journal data is stored as YAML alongside design files.
Triggers: "journal", "記録して", "ジャーナル", "推論を残す", "分析ログ",
"分析の経緯", "なぜこの結論に至ったか記録", "evidence log".
/analysis-notebookGenerates a notebook (a plain Python script) from an analysis design's methodology, runs it,
and records the results to the Insight Journal. Turns a reviewed/approved design into an
executed, lineage-tracked analysis. Fills the design→analysis step (successor to the
removed batch-analysis, now interactive).
Triggers: "notebook を作って分析", "分析を実行", "ノートブック生成", "run analysis",
"generate notebook", "分析ノートブック".
/analysis-reflectionGuides structured reflection on an analysis design using its Insight Journal.
Helps say what the results tell, check the open questions, and decide how the design ends:
a verdict for a confirmation, `explored` for an exploration, or a derived design.
Given a theme, writes the current answer of each node of its question tree across the
designs of the theme, citing journal events, and checks it before the analyst sees it.
Triggers: "振り返り", "reflection", "まとめ", "結論を出す", "分析を振り返る",
"この仮説どうなった", "wrap up analysis", "テーマの振り返り", "現時点の答え".