datachain-knowledge
Use whenever datasets, cloud storage buckets, or data pipelines are mentioned — creating, saving, querying, listing, exploring, deleting, or processing data in S3, GCS, Azure Blob, or local storage. Also use when running any script that may create datasets as a side effect. Maintains a knowledge base at dc-knowledge/ (JSON + markdown). ALWAYS use this skill when the user creates a dataset, saves pipeline output, runs a data script, or references any storage bucket.
Оригинален текст · няма потвърден превод на българскиПърво прочетете инструкцията.
Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.
GitHub хранилище- Звезди на репото
- 2820
- Лиценз
- Apache-2.0
- Последна проверка на записа
- 22.09.2026 г.
Добавете в своя инструмент.
Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.
npx skills add datachain-ai/datachainСтраницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.
Откъс от SKILL.md
Началото на файла на автора, без превод.
Maintain a knowledge base at dc-knowledge/. .md files are the persistent
output. .json files are intermediate (generated in Step 3, consumed in
Step 4, then deleted).
{core_skill_dir}/SDK.md owns how the pipeline code is written — dataset
shape, row grain, provenance, naming. This file owns the knowledge base
and how the work is run: what already exists, what a run will cost, and
where the results land.
Critical Rules
- Path is
dc-knowledge/— NOT.datachain/. The.datachain/directory is the internal database; the knowledge base lives atdc-knowledge/. - Never pass
update=Truetodc.read_storage()in query or exploration code unless the user explicitly asks to refresh the listing. Build scripts that read storage are the exception — they passupdate=True, delta=True. - Prefer DataChain operations over plain Python for all metadata analysis.
- Bounded output — JSON and markdown files stay small regardless of data size.
- Stop on auth/connection errors —
bucket_scan.pyruns a fast access check. If it exits with an error JSON on stderr, stop immediately and show the error to the user. Do not retry with different regions, profiles, or endpoints — ask for the missing credentials. - Follow the enrichment prompt template literally in Step 4. Downstream tooling (
render_index.py) parses the exact frontmatter the prompt prescribes.
Common gotchas in UDF scripts
parallel=Nvsworkers=N.parallel=Nis local multiprocessing (works anywhere).workers=Nis Studio-only and MUST be guarded:chain = chain.settings(parallel=N); if dc.is_studio(): chain = chain.settings(workers=N).- No
from __future__ import annotationsin UDF modules. It stringifies type hints and DataChain's signal-schema resolution rejects the string-vs-class mismatch. - Type the UDF return precisely.
Iterator[object]/Iterator[Any]/ baredictfail schema resolution. Return a specificIterator[T], a PydanticBaseModel, or a primitive. - Generators aren't subscriptable. Iterators returned by file APIs do not support
[:N]. Useenumerate+break, orlist(...)only when the result is genuinely small. - Use
datachain.__version__to get the package version (e.g.dc.__version__).