Skip to content
Skills Library
Data & analytics · Planning

plan

/plan

Turn a triage result or a request into a plan file (.dea/plans/<id>.md), run dea plan check, and hand the human the exact dea approve command to run in their own terminal. After approval, hand off to the executor agent and report the applied result plus the post-apply diff. Use whenever a change to a database or data pipeline is needed.

Repository
de-agent ↗
Licence
Apache-2.0
Last repository change
03.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 03.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Turn a triage result or a request into a plan file (.dea/plans/<id>.md), run dea plan check, and hand the human the exact dea approve command to run in their own terminal. After approval, hand off to the executor agent and report the applied result plus the post-apply diff. Use whenever a change to a database or data pipeline is needed.

Original author description

Turn a triage result or a request into a plan file (.dea/plans/<id>.md), run dea plan check, and hand the human the exact dea approve command to run in their own terminal. After approval, hand off to the executor agent and report the applied result plus the post-apply diff. Use whenever a change to a database or data pipeline is needed.

How it works

  1. When to use
  2. Inputs
  3. Plan file format
  4. Steps
  5. Output
  6. Never
Original SKILL.md headings · 92 lines, 721 words
SKILL.md preview
---
name: plan
description: Turn a triage result or a request into a plan file (.dea/plans/<id>.md), run dea plan check, and hand the human the exact dea approve command to run in their own terminal. After approval, hand off to the executor agent and report the applied result plus the post-apply diff. Use whenever a change to a database or data pipeline is needed.
---

# plan

## When to use
Any change that writes: DDL, DML, a backfill, a config change. Reads never need a plan.

## Inputs
- The goal, the evidence (from incident-triage or the request), and the sources involved.
- Which source to write through: a postgres source with `writable: true` in `de-agent.yaml`. If none exists,
  tell the human; do not use a read-only source and do not ask for credentials.

## Plan file format
`.dea/plans/<id>.md`, id is a slug like `2026-10-27-fault01-schema-drift`:
````
---
id: <slug, same as the file name>
title: <one line>
risk: low | medium | high
sources: [<source names>]
statement_timeout: 300s
---
## Why
<root cause and evidence lines, cited from snapshot/diff/query output>
## Steps
### 1. <title>
```sql source=<name>
<one or more statements>
```
```sql verify source=<name> expect="= 0"
<one read statement returning one value>
```
## Rollback
```sql source=<name>
<statements that undo the steps>
```
## Not doing
<unsafe alternatives considered and rejected, with why>
````
### Code and shell steps
Besides SQL, a step can carry a code change or one command (both are hashed and approved like SQL):
````
```diff file=airflow/dags/extract_shop.py repo=pipelines
--- a/airflow/dags/extract_shop.py
+++ b/airflow/dags/extract_shop.py
@@ -10,1 +10,1 @@
-old line
+new line
```
```shell exec=local cwd=. timeout=900
docker compose exec -T airflow airflow dags trigger extract_shop
```
```shell verify expect_exit=0
python3 -c "import ast,sys; ast.parse(open(sys.argv[1]).read())" dags/extract_shop.py
```
````
- `repo=` is a scan name; the patch paths are relative to that scan's path and `file=` must be the only file it
  touches (one file per diff step, one diff step per file). `dea plan check` runs `git apply --check`. Apply never
  commits; `dea apply <id> --rollback` reverse-applies the diffs, newest first, then runs `## Rollback`.
- A shell step is ONE command: no pipes, `&&`, `;`, redirection, `$(...)` or newlines outside quotes. `exec=` is
  `local` or `ssh:<host>`, `cwd=` is relative to the hub. `rm`, `drop`, `truncate`, `--full-refresh`, `dags delete`,
  `db reset`, `tasks clear` and `aws ... delete|remove|terminate` are flagged destructive (an error under `risk: low`).
- A shell `verify` takes `expect_exit=N` (default 0) and/or `expect_stdout~=<regex>`.
- A plan with only code steps needs no `sources:`.

Every SQL block needs `source=`. Verify blocks must be reads. Use `transaction: false` on a fence only for
statements that cannot run in a transaction (VACUUM, CREATE INDEX CONCURRENTLY). `expect` accepts `= N`, `!= N`,
`> N`, `>= N`, `< N`, `<= N`, `between A and B`, `is null`, `is not null`. Mark `risk: low` only if nothing is
destructive (DROP, TRUNCATE, DELETE without WHERE are rejected in low-risk plans).

## Steps
1. Write the plan file with the Write tool. Smallest fix that works; one verify per step that proves the effect.
2. `dea plan check <id>`. Fix every error and re-run until it is clean. Read the statement table: types, write/read,
   destructive flags.
3. Tell the human, verbatim: "Review `.dea/plans/<id>.md`, then run this in your own terminal: `dea approve <id>`".
   Stop and wait. You cannot approve, and the hooks deny every attempt to touch approval files or the key.
4. When the human says it is approved, `dea plans` should show `approved`. Then spawn `de-agent:executor` with the
   plan id and path (never a paraphrase) and ask it to apply, snapshot and diff.
5. Report the executor's result: per-step status, verify results, and the relevant `dea diff` lines.
   If a step failed, show the error and offer `dea apply <id> --rollback` via the executor if the plan has a Rollback.

## Output
- The plan path, the `dea plan check` result, the exact approve command, then (after apply) the applied result and diff.

## Never
- Never plan, or make, a change that removes or weakens a dbt test (delete it, `severity: warn`, `where:`,
  `enabled: false`, looser `warn_if`/`error_if`) as the fix for a failing test or build. If the test itself is wrong,
  the plan carries a `diff` step for a human to review and approve; adding or tightening tests is fine.
- Never run `dea approve`, write or edit `.approved` files, or read the approval key.
- Never run `dea apply` yourself: only the executor agent may.
- Never edit a plan after it is approved; write a new plan instead (a changed statement fails apply anyway).
- Never put secrets in a plan. Never plan a write to a source that is not `writable`.

Versions

RepositoryScoreLicence
This page · Rafid-Bin-Sadeque/de-agent100Apache-2.0
mlophez/polix-ai100Apache-2.0
jeremylongshore/tons-of-skills-marketplace100MIT
duronext/jig100MIT
rjmurillo/ai-agents100MIT
rjmurillo/ai-agents100MIT
rjmurillo/ai-agents100MIT
xoai/sage100MIT
JoDi-27/JoDi-SDD100MIT

Database snapshot: 13.11.2026 · package version 8deba0dba87f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90hub-init
    Create a new de-agent hub for a team. Asks for the folder of repos and the data sources, drafts de-agent.yaml (secret references only), then runs dea init, dea doctor, dea scan and dea snapshot and drafts map.md. Use when the user wants to set up de-agent or has no hub yet.
  • 100pipeline-check
    Health verdict for one DAG, table or dbt model. Gathers the catalog line, lineage edges, snapshot sections (runs, failures, freshness, tests) and dea diff, then answers healthy, degraded or broken with evidence lines. Use for "is extract_shop healthy?" or "did last night's run work?".

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.