Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a P
>
> Quick links: [Quickstart](https://docs.datacontract.com/quickstart) · [Commands](https://docs.datacontract.com/commands) · [Best Practices](https://docs.datacontract.com/best-practices) · [Custom Export and Import](https://docs.datacontract.com/extending) · [Release Notes](https://docs.datacontract.com/release-notes) · [Development Setup](#development-setup)
>
> For LLMs: [docs.datacontract.com/llms.txt](https://docs.datacontract.com/llms.txt) · [docs.datacontract.com/llms-full.txt](https://docs.datacontract.com/llms-full.txt)
> For LLMs: [docs.datacontract.com/llms.txt](https://docs.datacontract.com/llms.txt) · [docs.datacontract.com/llms-full.txt](https://docs.datacontract.com/llms-full.txt) · [Data Contract Skills](https://github.com/datacontract/datacontract-skills) for coding agents

## Getting started

Expand Down Expand Up @@ -185,6 +185,7 @@ if not run.has_passed():
## How to

- [How to integrate Data Contract CLI in your CI/CD pipeline as a GitHub Action](https://github.com/datacontract/datacontract-action/)
- [How to let your coding agent (Claude Code, Codex, GitHub Copilot) create and test data contracts with the Data Contract Skills](https://github.com/datacontract/datacontract-skills)
- [How to run the Data Contract CLI API to test data contracts with POST requests](https://docs.datacontract.com/api)
- [How to run Data Contract CLI in a Databricks pipeline](https://www.datamesh-architecture.com/howto/build-a-dataproduct-with-databricks#test-the-data-product)

Expand Down
59 changes: 59 additions & 0 deletions docs/docs/ai-agents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
sidebar_position: 14
title: "Use with AI Coding Agents"
description: "Let Claude Code, Codex, GitHub Copilot, and other coding agents create, test, and evolve data contracts with the Data Contract Skills."
---

# Use with AI Coding Agents

The [Data Contract Skills](https://github.com/datacontract/datacontract-skills) teach coding agents such as Claude Code, OpenAI Codex, and GitHub Copilot CLI to work with data contracts. The agent uses the Data Contract CLI and the [Data Contract Editor](./editor.md) under the hood: it imports schemas, writes descriptions and quality rules, lints until the contract is valid, runs the tests, and explains failing checks.

| Skill | What the agent does |
|---|---|
| Create a Data Contract | Imports a contract from a table, DDL, dbt, Avro, JSON Schema, or Excel, or writes it from requirements, then enriches and lints it. |
| Test a Data Contract | Sets up the connection, runs `datacontract test`, and finds the cause of every failing check. |
| Quality Rules | Adds quality rules and service levels per quality dimension, with thresholds grounded in the data. |
| Breaking Change Check | Runs `changelog` and `breaking` on a changed contract, adds semantic changes, and proposes the version bump. |
| Export a Data Contract | Generates SQL DDL, dbt models and tests, schemas, and model classes, and integrates them into the project. |
| Data Contracts in CI/CD | Sets up lint and breaking-change checks on pull requests and scheduled data tests. |
| Data Contract Editor | Opens the contract in the visual editor while the agent edits the YAML. |

## Install

Claude Code:

```bash
claude plugin marketplace add https://github.com/datacontract/datacontract-skills
claude plugin install datacontract-skills@datacontract-skills
```

OpenAI Codex:

```bash
codex plugin marketplace add https://github.com/datacontract/datacontract-skills
codex plugin add datacontract-skills@datacontract-skills
```

GitHub Copilot CLI:

```bash
copilot plugin marketplace add https://github.com/datacontract/datacontract-skills
copilot plugin install datacontract-skills@datacontract-skills
```

Other agents that support [Agent Skills](https://agentskills.io) can use the `skills/` folder of the repository directly, or reference its `AGENTS.md`.

## Usage

Ask in plain language:

- "Create a data contract for the `orders` table in Snowflake."
- "Test the orders contract against production and tell me why it fails."
- "Is my change to the orders contract breaking?"
- "Generate the dbt models and tests from the contract."

The skills ask before connecting to a data source and never ask for credentials in the chat: set them as [environment variables](./configuration.md) or in a `.env` file.

## Documentation for LLMs

Agents without the skills can still read this documentation in a compact form: [llms.txt](https://docs.datacontract.com/llms.txt) (a link index) and [llms-full.txt](https://docs.datacontract.com/llms-full.txt) (every page in one file).
2 changes: 2 additions & 0 deletions docs/docs/editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ datacontract edit datacontract.yaml
```

See the [`edit` command reference](./commands/edit.md) for the full signature.

To let a coding agent edit the YAML while you review it in the editor, see [Use with AI Coding Agents](./ai-agents.md).
2 changes: 2 additions & 0 deletions docs/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ When you run `datacontract test`, the CLI connects to a data source and runs sch
- Test your own warehouse in 5 minutes: **[Snowflake](./testing/snowflake.md)**, **[BigQuery](./testing/bigquery.md)**, **[Databricks](./testing/databricks.md)**, **[Amazon Redshift](./testing/redshift.md)**, or **[any other source](./testing/index.md)**.
- Learn the underlying format in **[Open Data Contract Standard](./open-data-contract-standard.md)**.
- Author contracts visually with the **[Data Contract Editor](./editor.md)**.
- Let your coding agent (Claude Code, Codex, GitHub Copilot) create and test contracts with the **[Data Contract Skills](./ai-agents.md)**.
- Run checks against real data with **[Test your Data](./testing/index.md)**, then keep them running with **[Scheduling](./scheduling/index.md)**.
- Roll it out across a team with **[Adopting Data Contracts](./best-practices.md)**.
- See every command in the **[Commands reference](./commands/index.md)**.
Expand Down Expand Up @@ -104,3 +105,4 @@ More answers — credentials, check selection, type failures, CI behaviour — a
- Source code: [github.com/datacontract/datacontract-cli](https://github.com/datacontract/datacontract-cli)
- Community Slack: [datacontract.com/slack](https://datacontract.com/slack)
- GitHub Action: [datacontract/datacontract-action](https://github.com/datacontract/datacontract-action/)
- Agent skills: [datacontract/datacontract-skills](https://github.com/datacontract/datacontract-skills)
2 changes: 2 additions & 0 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ const config: Config = {
'scheduling/*.md',
'dbt.md',
'editor.md',
'ai-agents.md',
'imports/index.md',
'imports/*.md',
'exports/index.md',
Expand Down Expand Up @@ -287,6 +288,7 @@ const config: Config = {
items: [
{ label: 'datacontract.com', href: 'https://datacontract.com' },
{ label: 'Data Contract Editor', href: 'https://editor.datacontract.com' },
{ label: 'Data Contract Skills', href: 'https://github.com/datacontract/datacontract-skills' },
{ label: 'PyPI', href: 'https://pypi.org/project/datacontract-cli/' },
],
},
Expand Down
1 change: 1 addition & 0 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This page is the entry point for the project's GitHub repository and README. The
- [PyPI package](https://pypi.org/project/datacontract-cli/): released versions and install instructions.
- [Docker image](https://hub.docker.com/r/datacontract/cli): `datacontract/cli`.
- [GitHub Action](https://github.com/datacontract/datacontract-action/): running the CLI in a GitHub workflow.
- [Data Contract Skills](https://github.com/datacontract/datacontract-skills): agent skills for Claude Code, Codex, and GitHub Copilot to create, test, and evolve data contracts with the CLI.
- [Community Slack](https://datacontract.com/slack): questions and discussion.

## Optional
Expand Down
Loading