Quantco/dataframely/skills
Dataframely for polars data frames
Practices for polars data processing with dataframely: Schema and Collection definitions, .validate() and .filter(), type hints and testing.
What Dataframely for polars data frames does
This skill gives an agent the conventions for dataframely, the Quantco package for validating the schema and content of polars data frames. It applies when the agent writes or changes code involving dataframely or polars data frames, and everything sits in one SKILL.md file.
The file covers the two core types. A dy.Schema subclass describes one data frame, and a dy.Collection subclass groups related frames that share part of a primary key. The agent is told to record every assumption about the data as a constraint: the most specific column type, built-in arguments such as nullable, min or regex, a check dictionary for custom column checks, @dy.rule methods for cross-column logic and @dy.filter methods for relationships between collection members. Columns are referenced through the schema class (Schema.column.col) rather than pl.col strings.
At runtime, Schema.validate raises on failure, while Schema.filter returns the valid rows plus a FailureInfo object with counts(), invalid() and details(). Schema.cast is kept for data already known to conform. The testing section asks for Arrange, Act, Assert unit tests using assert_frame_equal from polars.testing, with inputs built by sample(num_rows=...), sample(overrides=...) or create_empty().
The result is polars code with typed signatures such as dy.LazyFrame[...] and dy.DataFrame[...], plus tests that run on generated data.
Install
npx skills add Quantco/dataframelyRead the security check below before you run it. The repository's own instructions win if they differ.
Security check
What the skill's files do, from reading them. A flag that nobody has checked yet says "Not checked", never "No".
- Runs scripts
- No
- Uses the network
- No
- Installs hooks
- No
- Asks for secrets
- No
The scan found no scripts, no hook definitions, no network calls and no secret variables. The skill folder holds a single Markdown file, SKILL.md, with coding conventions and Python examples for dataframely and polars. It does not ask the agent to fetch anything; for more detail it points to docstrings in the installed package and an LSP tool. Installing with npx skills add runs the skills.sh tool from npm, so check that tool first if it is new to you, or copy SKILL.md by hand as the dataframely docs describe.
Scan details: No scripts, hook definitions, network calls or secret variables were found in the skill folder. Checked at commit 815d6d4fd0fc.
Use cases
- Defining dataframely schemas and collections for polars data frames
- Choosing between validate, filter and cast for runtime checks
- Writing unit tests with synthetic data from sample() and create_empty()
Limitations
- Contains guidance only; the dataframely package is installed separately, for example with pip install dataframely
- Sets user-invocable: false in its frontmatter, so it is not meant to be called directly as a command
- For details beyond the file, it relies on the installed package's docstrings and an LSP tool
- The listed command uses the skills.sh CLI through npx; the docs also give a mkdir and curl pair for Claude Code
Sources
- dataframely skill folderRepositoryPrimarygithub.com
- Quantco/dataframelyRepositoryPrimarygithub.com
- github.com/Quantco/dataframely/blob/main/skills/SKILL.mdRepositoryPrimary
- github.com/Quantco/dataframely/blob/main/docs/guides/coding-agents.mdRepositoryPrimary