/datalens-skills:datalens-sdkfrom datalens-skills
Automates Yandex DataLens tasks (charts, dashboards, datasets, connections, workbooks, collections) via the datalens-sdk Python package. Handles create, update, inspect, import, export, copy, and diagnose operations.
Ships in datalens-skills. 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; scripts run unread.
Operate Yandex DataLens through the official Python SDK — never hand-built HTTP requests.
Before continuing, locate and read the available skill whose name or namespaced basename is
datalens. It supplies the shared installation and object-model context that applies alongside
these SDK instructions. If it is absent, report an incomplete public DataLens skill installation
and stop. After reading it, return here for SDK setup and execution.
The instructions for this skill are stored inside the installed datalens-sdk package, and are
extended there by whatever DataLens installation the environment targets. The SDK is a 0.x alpha
where minor releases rename classes and methods, so instructions that shipped separately would
describe an API the user does not have. Load them from the package before doing anything else.
If the user is only asking what the SDK is or whether it fits their task, answer that much from this file and stop. Do not run bootstrap or install a package merely to read its documentation.
Before the first SDK operation in a session, resolve this wrapper skill's directory to an absolute path and run its bootstrap script from the user's project directory:
bash "/absolute/path/to/datalens-sdk/scripts/bootstrap.sh"
The script resolves a uv- or Poetry-managed project before considering ./.venv, because those
tools commonly own a same-named environment. It creates ./.venv only for an unmanaged project.
It verifies that every selected bin/python identifies itself as belonging to that environment,
so a stale symlink can never install into system Python. It may contact the configured Python
package index and install datalens-sdk into the selected environment.
The script deliberately does not encode an SDK version or a Python compatibility range. Plain
environments query through the selected interpreter's pip configuration; uv and Poetry projects
resolve through their native project sources. Candidate selection intersects the SDK metadata with
PROJECT_REQUIRES_PYTHON and a numeric .python-version pin when present. Compatibility and
freshness checks never upgrade pip or install the SDK or its dependencies. If a candidate can
create a venv, bootstrap uses a disposable venv seeded by that exact interpreter for fresh-project
probes and carries its pip source policy into the probe. Verified project environments are queried
directly.
Parse the KEY=VALUE lines after the ---BOOTSTRAP--- marker:
STATUS=ready — use the absolute interpreter from PYTHON for every subsequent Python call.
REASON=sdk_freshness_check_timeout — tell the user that the 15-second freshness check timed out and you are continuing with installed SDK_VERSION. Do not ask whether to continue or describe the installed version as current.REASON=sdk_freshness_check_failed — tell the user that checking for a newer SDK release failed and you are continuing with installed SDK_VERSION. Match the user's language. Do not ask whether to continue or describe the installed version as current.STATUS=decision_required — do not load the package skill or perform SDK work yet:
REASON=sdk_install_required — a uv/Poetry project needs datalens-sdk installed through its
manager. The dependency may already be declared but missing from an unsynced environment, or
it may need to be added. This also covers an importable SDK that the manager's synchronization
would remove or replace. Explain that the manager will select the exact version from the
project's sources, lock, and Python constraints; reconciliation can upgrade or downgrade the
currently importable SDK. The project manifest and lock may change when a dependency must be
added, and uv may update a stale lock to match the manifest during reconciliation. A Poetry
install can also install other missing locked dependencies but does not remove untracked
packages; a uv sync is exact and can remove unmanaged packages. No SDK_VERSION or
AVAILABLE_SDK_VERSION is expected before this consent. If they approve, run the exact command
below, then parse its result again:
bash "/absolute/path/to/datalens-sdk/scripts/bootstrap.sh" --install-sdk
Never substitute pip install inside a managed project.
REASON=sdk_update_available — tell the user the installed SDK_VERSION and newer compatible
AVAILABLE_SDK_VERSION, give a clickable CHANGELOG_URL, and explicitly ask whether to keep
the installed version or upgrade. Match the user's language. If they keep it, continue with the
reported PYTHON. If they upgrade, run the exact command below with the reported available
version, then parse its bootstrap result again:
bash "/absolute/path/to/datalens-sdk/scripts/bootstrap.sh" \
--upgrade-sdk "$AVAILABLE_SDK_VERSION"
If that run reports a different available version, ask again; consent to one version is not consent to another. Never substitute a direct pip command.
REASON=sdk_upgrade_target_unavailable — the approved version is no longer the compatible
release offered by the index, and bootstrap will not downgrade or guess. Ask whether to keep
the installed version or retry the original check later.
REASON=sdk_version_check_failed with SDK=installed — explain that the installed SDK works
but its freshness or manager ownership could not be verified. Ask whether to continue with the
reported SDK_VERSION or retry the original bootstrap command. Do not silently continue or
describe it as current. This reason never applies to SDK=missing.
This also applies when Poetry's local manifest/lock validation fails or times out, including
a missing or stale lockfile. Explain that this is a local project validation issue, not evidence
of an unavailable package index. Obtain the user's decision before continuing; never regenerate
the lockfile or synchronize the environment automatically.
REASON=sdk_upgrade_failed with SDK=installed — explain that the upgrade failed but the
reported SDK_VERSION remains usable. Ask whether to continue with it or stop; retry the exact
upgrade command only if the user requests it.
STATUS=blocked — relay REASON and the relevant non-secret fields. Do not improvise another
install command. When AVAILABLE_PYTHON is present, an existing incompatible ./.venv was
preserved and the user must decide how to handle it. For venv_invalid, do not use or repair the
interpreter path automatically. For managed_environment_unavailable or
managed_environment_invalid, preserve the uv/Poetry project and ask the user to repair or
select its managed environment; never create a parallel .venv. For
managed_python_incompatible, ask the user to change the manager-selected Python rather than
installing into a different environment. For configured_python_unavailable, ask the user to
install or change the numeric versions in CONFIGURED_PYTHON; for
configured_python_incompatible, explain that the configured interpreter does not satisfy the
intersection of PROJECT_REQUIRES_PYTHON and REQUIRES_PYTHON. For
project_python_constraint_invalid or project_metadata_unreadable, ask the user to repair
pyproject.toml. For sdk_install_failed, report that the managed environment was preserved and
ask whether to retry or inspect the manager error outside the bootstrap protocol.For any unrecognized decision_required reason, stop and show the parsed fields instead of
guessing. A decision applies only to this session; do not write an opt-out marker.
If the marker or STATUS is absent, stop and show the raw output. Do not infer success from the
process exit code. In particular, do not treat pip's generic "No matching distribution" message as
proof that the package does not exist, do not upgrade the project's pip merely to improve the
diagnostic, and never install into system Python.
Once bootstrap reports ready, or the user explicitly chooses a working installed version after
decision_required, run this with the exact reported PYTHON:
"$PYTHON" -c "
import datalens_sdk
for p in datalens_sdk.agent_skill_paths():
print(p)
"
It prints one absolute path per line: the base instructions first, then any installation overlays available in this environment. Extra lines are normal — they are additional detail for particular DataLens installations, and not all of them necessarily apply here.
Keep those absolute paths. Each directory carries its own bundled scripts, examples, and
references/ tree, referenced relative to it, and expects to be invoked by absolute path. Never
cd into one; the user's project directory stays the working directory throughout.
Read SKILL.md from the first path now and follow it as if written here — it is
authoritative and overrides anything you believe about this SDK, including anything in this file.
It owns installation detection: it decides which of the remaining paths apply and tells you when to
read them, so do not read an overlay before it says so. Where an overlay contradicts the base, the
overlay wins. Read the references they route you to on demand, not all of them.
Do not write SDK code, install anything, answer an SDK question, or commit to an approach before you have read it. A plausible guess at this API is worse than one extra command.
Anything that writes files writes to the user's project directory or a temp dir; the package directory may be read-only or root-owned.
| Task | Where it belongs |
|---|---|
| Anything driving DataLens entities from Python | here — load the package instructions above |
| Standalone HTML pages and reports rendered by DataLens | datalens-html-pages |
| Publishing or managing an HTML page through the Python SDK | here, through the operations the package instructions document; if there are none, report that and offer an SDK upgrade or MCP/HTTP. Load datalens-html-pages for the publication procedure and the final link |
| The DataLens web UI, screenshots, embedding, metric interpretation | neither — say it is out of scope and stop |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub datalens-tech/datalens-skills --plugin datalens-skills6 skills in this plugin
/datalensStart here for Yandex DataLens and DataLens Platform (DLP) when the task has not yet settled on a tool, or when the question is about DataLens itself rather than about carrying something out in it: what DataLens is and what it can do; which installation is in play — Yandex Cloud, on-premise, or the internal Yandex Team one — and how they differ in hosts, auth, and capabilities; what a collection, workbook, connection, dataset, chart, or dashboard is and how they relate; and whether to reach for the MCP server, the Python SDK, the HTTP API, or the web UI. Use it to orient and to route to the skill that does the work. NOT for doing the work once the approach is chosen — that is `datalens-sdk` for Python and `datalens-html-pages` for standalone HTML reports — and not for interpreting what business metric values mean. For DLP storage and processing, load `datalens-platform`./datalens-html-pagesUse this skill to build, fix, or publish a standalone HTML page or report in DataLens. DataLens takes a whole self-contained HTML document — often an AI-generated report with tables, charts, and a CSV/download button — and renders it in a sandboxed, CSP-locked iframe, so normal web code silently breaks. Reach for it when generating such a page from scratch, and when one already in DataLens misbehaves: images, fonts, scripts, or CDN libraries blocked or throwing Content-Security-Policy errors; fetch/XHR/localStorage failing; charts blank; a download or Export button doing nothing; an upload rejected as too large or the wrong encoding; or the page needing to match the user's DataLens theme (light/dark) and language (ru/en); or embedding a Yandex map. Also covers which CDNs and hosts are allowed and making the page fully self-contained. Not for DataLens chart cells or HTML-markup table columns./datalens-onprem-installInstall, configure, troubleshoot, update, or remove the commercial DataLens On-premises distribution using current docs. Use for single-node K3s setup, sizing, interrupted installs, feature changes, Public API, service accounts, MCP, LDAP/OIDC, and backup or restore. Not for Yandex Cloud, Yandex Team, the Open Source edition, or building charts and dashboards./datalens-platformUse for storage and data-processing work in DataLens Platform (DLP): REST Catalog, data transfers, saved SQL queries, Spark jobs, Airflow orchestration, CloudEnv storage, and DLP access troubleshooting. Applies when DLP is identified by the request or established context. For Python automation of these resources, also load datalens-sdk. Not for BI-only connections, datasets, charts, or dashboards, or standalone Trino, Spark, or Airflow work outside DLP./datalens-yc-rls-resolveUse this skill when a DataLens user on datalens.ru (Yandex Cloud) needs to resolve user, email, service-account, or Cloud Organization group names into RLSv2 subject IDs, fill the `rls2` field, or migrate a legacy `rls` configuration.Other plugins' skills for the same job