/cmf:cmf-queryfrom cmf
Queries CMF metadata programmatically: list pipelines, stages, executions, artifacts; trace lineage; compare hyperparameters; export for analysis. Uses CmfQuery Python API or CLI.
Ships in cmf. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Write the query the user needs using CmfQuery or the CMF CLI. Identify what they want to find (pipeline overview, lineage, hyperparameter comparison, specific artifacts) and produce the code.
from cmflib.cmfquery import CmfQuery
query = CmfQuery(filepath="mlmd") # or path to a downloaded mlmd file
pipelines = query.get_pipeline_names() # ['my_pipeline', ...]
stages = query.get_pipeline_stages("my_pipeline") # ['Prepare', 'Train', ...]
runs = query.get_all_executions_in_stage("Train")
# runs is a pandas DataFrame — one row per run, columns = custom_properties
print(runs[["name", "learning_rate", "n_estimators"]])
# What fed INTO this artifact?
parents = query.get_one_hop_parent_artifacts("models/rf.pkl")
# What was produced FROM this artifact?
children = query.get_one_hop_child_artifacts("data/train.csv")
# Which execution produced this artifact?
execs = query.get_one_hop_parent_executions("models/rf.pkl")
runs = query.get_all_executions_in_stage("Train")
print(runs[["name", "learning_rate", "n_estimators"]].sort_values("learning_rate"))
model = "models/rf.pkl"
parents = query.get_one_hop_parent_artifacts(model)
for p in parents["name"].tolist():
grandparents = query.get_one_hop_parent_artifacts(p)
print(f"{p} ← {grandparents['name'].tolist()}")
artifacts = query.get_all_artifacts_for_pipeline("my_pipeline")
models = artifacts[artifacts["type"] == "Model"]
print(models[["name", "uri"]])
cmf pipeline list
cmf execution list -p my_pipeline
cmf artifact list -p my_pipeline
See references/query-api.md for the full CmfQuery method reference.
get_pipeline_names() / get_pipeline_stages(pipeline)mlmd file not found — run cmf metadata pull -p <name> first if querying a teammate's dataAttributeError — query results are pandas.DataFrame; use .tolist() or standard DataFrame operationsDocs: CmfQuery API reference · Web UI executions · Web UI lineage · MCP for natural language queries
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 skills in this plugin
/cmfUse when working with the Common Metadata Framework (CMF) — initializing CMF in a project, instrumenting ML pipeline code, syncing metadata and artifacts with a CMF Server, querying lineage and artifacts, or setting up the CMF MCP server for AI assistant integration. Routes to the appropriate specialized skill based on the task.
/cmf-initUse when setting up CMF in a new or existing project. Covers creating a Python environment (conda, uv, or venv), installing cmflib (requires Python 3.9–3.11, recommended 3.10), running `cmf init` to configure a storage backend (local, S3, MinIO, SSH, or OSDF), and verifying the setup. Linux only — cmflib does not support macOS.
/cmf-instrumentUse when adding CMF metadata tracking to existing Python ML pipeline code, or writing new CMF-instrumented pipeline stages from scratch. Covers the Cmf() API: create_context, create_execution, log_dataset, log_model, log_metric, commit_metrics, log_execution_metrics, and finalize(). Includes copy-paste templates for common ML pipeline stages.
/cmf-mcpUse when setting up the CMF MCP server so an AI coding assistant can query CMF metadata using natural language, or when the CMF MCP server is already running and the user wants to use it from their coding agent. Covers Docker deployment, per-agent configuration (Claude Code, GitHub Copilot, Cursor, Codex), and example prompts.
/cmf-serverUse when deploying the CMF Server locally with Docker Compose, or connecting to an existing shared CMF Server. Covers creating the .env file, starting the container stack, verifying the web UI, and pointing cmflib clients at the server. If a server is already running and credentials are available, skip to the connection section.
/cmf-syncUse when pushing or pulling CMF metadata and artifacts between a local environment and a CMF Server or central artifact repository (S3, MinIO, SSH, OSDF, local). Covers `cmf metadata push/pull`, `cmf artifact push/pull`, `cmf repo push/pull`, and collaborative team workflows. Assumes `cmf init` has been run.
npx claudepluginhub hewlettpackard/cmf --plugin cmfOther plugins' skills for the same job