posit-dev/pointblank/draft-validation
Claude Code and agent skill by posit-dev/pointblank
- community
Checking that the SKILL.md file is still in the repository.
Use LLMs to draft and edit Pointblank validation plans. Covers DraftValidation for generating plans from data, EditValidation for modifying existing plans with natural language (and reviewing the change before accepting it), and the interactive assistant() chat interface. Supports Anthropic, OpenAI, Ollama, Bedrock, Azure OpenAI, Cohere, and Databricks providers. Use when bootstrapping validation for a new dataset or refining existing plans.
Install
npx vskill@latest install posit-dev/pointblank/draft-validationSKILL.md
The same SKILL.md was published earlier as posit-dev/pointblank/draft-validation.
Draft Validation
Skill for using LLMs to bootstrap and refine data-validation plans. Instead of writing every check by hand, describe your data and let an LLM generate a starting plan, then iterate with natural language instructions.
Quick start
Skill directory structure
When to use what
| I want to... | Use | |
|---|---|---|
| Generate a validation plan from data | DraftValidation | |
| Edit an existing plan with instructions | EditValidation | |
| Compare two plans without a model | EditValidation.from_plans() | |
| Chat interactively about validation | assistant() | |
| See what the LLM generated | draft.code, edit.to_code() | |
| Check generated code is valid | validate_syntax() | |
| See what changed in an edit | edit.diff(), edit.changed_steps() | |
| Review the changes as a table | edit.review() | |
| Accept an edit and get a Validate object | edit.accept() |
Core concepts
DraftValidation
Give data to an LLM and get back a validation plan:
The model doesn't see the rows. It gets a JSON summary of the table from DataScan (row and column counts, column names and types, missing counts, summary statistics, and a few sample values), so large tables work too.
The drafted code uses the placeholder your_data in Validate(data=...) and ends with .interrogate(), so replace your_data with your table before running it.
EditValidation
Modify an existing validation plan with natural language:
Every input is turned into Pointblank code first (YAML through yaml_to_python()), so the revised plan is always Python code with the your_data placeholder.
Working with edits:
Supply data to the edit so the model sees a summary of the table (for edits like choosing a new bound). That table is also the one accept() uses when it's given none:
accept(data=...) binds a table to your_data, so the same revised plan can be run on other data. Before running anything it applies the validate_syntax() check and raises a ValueError naming the problem if it fails. It removes any .interrogate() call, runs the code with exec(), and returns the Validate assigned to validation.
Comparing two plans without a model
EditValidation.from_plans() builds an EditValidation from two plans you already have, with no LLM, API key, or chatlas needed. It's handy in code review for a change to a saved plan:
Either plan can be a Validate object, a code string, a YAML string, or a .py/.yaml path. An object from from_plans() has no data=, so pass the table to accept().
Interactive assistant
Chat with an LLM about data validation:
The assistant can:
- Suggest validation steps for your data
- Explain Pointblank concepts and methods
- Help debug validation failures
- Generate code snippets
Model string format
All LLM features use the format "provider:model_name":
API key handling
By default, the API key is read from environment variables:
| Provider | Environment variable | |
|---|---|---|
| Anthropic | ANTHROPIC_API_KEY | |
| OpenAI | OPENAI_API_KEY | |
| Ollama | (no key needed) | |
| Bedrock | AWS credentials | |
| Azure OpenAI | AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, OPENAI_API_VERSION | |
| Cohere | CO_API_KEY (or COHERE_API_KEY) | |
| Databricks | DATABRICKS_HOST, DATABRICKS_TOKEN (or a ~/.databrickscfg profile) |
Or pass explicitly:
Workflows
Bootstrapping validation for a new dataset
- Load your data.
- Run
pb.DraftValidation(data=df, model="..."). - Review the generated code with
draft.code. - Check it with
draft.validate_syntax(). - Copy the code into your project, replace
your_data, and customize. - Run
interrogate()and iterate.
Iterating on a validation plan
- Start with a draft or existing validation.
- Use
EditValidationwith natural language instructions. - Review changes with
edit.review()oredit.diff(). - Accept with
edit.accept()or iterate with another edit.
Reviewing a change to a saved plan
- Load the old and new versions (files, YAML, or
Validateobjects). - Run
pb.EditValidation.from_plans(old, new). - Read
changed_steps()orreview().
Interactive exploration
- Start
pb.assistant(model="...", data=df). - Ask questions about your data and validation needs.
- Copy suggested code into your project.
Gotchas
- LLM output is not guaranteed correct. Always review generated
code before using in production.
- **
validate_syntax()checks that the code parses and that every
col_*/row_*/rows_* method exists.** It doesn't run the code, so a wrong argument name or value is only caught by accept() or at interrogation.
- `max_reprompts` controls retries. When the plan fails that
check, the model is told the problem and asked again, up to this many times. Each retry is another request; 0 takes the first reply.
- `accept()` runs the revised code with `exec()`. Read it with
to_code() or review() first, as you would any code you didn't write.
- `accept()` returns an uninterrogated Validate object. Call
.interrogate() to execute. It needs a table, from accept(data=) or the EditValidation's data=.
- Ollama runs locally. No API key needed but the model must be
downloaded first with ollama pull.
- The assistant requires a running display.
"browser"opens a
web interface; "terminal" uses the console. Neither works in non-interactive environments.
- The model sees a summary, not the rows. Bounds and sets it
suggests come from summary statistics and a few sample values, so check them against the data.
Related skills
| Skill | When to use it | |
|---|---|---|
| pointblank | Full Validate workflow after drafting | |
| write-validation | Manual validation plan composition | |
| scan-and-profile | Profile data before asking the LLM to draft | |
| validate-yaml | Keep the accepted plan as YAML |
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/draft-validation/SKILL.md
Popularity
- Repository stars
- 483
- Repository forks
- 30
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/posit-dev/pointblank/draft-validation)