Short answer: Explore first: ask Claude to read the pipeline and explain where the data flows, with no edits. Plan in plan mode (Shift+Tab): ask for every file that must change and how you will test it, then approve or correct the plan. Code: let it make the change and run the tests or a comparison query. Commit when the numbers match. Skip the plan only for a one-line fix; a change across layers never should.
Adding one column to a pipeline touches the source query, the staging table, the transformation, the model and the report. Miss one and the column is blank in the report, or worse, the join changes and every total moves.
What does each step look like?
- 1Explore"Read the pipeline. Where does Orders come from, and which files touch it? No edits."
- 2PlanShift+Tab: "Plan adding Channel from the source to the sales report. List files and tests."
- 3Code"Make the change, run the tests, and compare total revenue before and after."
- 4Commit"Totals match. Commit with a message that says what changed and why."
What should the plan contain?
- Every file that changes, layer by layer: source, staging, transformation, model, report.
- What stays the same: "total revenue per month must not change".
- How you will check it: a query that compares totals before and after, and a test for the new column's values.
If the plan does not say how it will be checked, ask for that before approving.
Why compare totals?
Because adding a column should not change any existing number. If revenue per month moves after the change, a join somewhere now repeats rows. A comparison query run before and after catches it in seconds:
SELECT FORMAT(OrderDate, 'yyyy-MM') AS Month, SUM(Amount) AS Revenue
FROM mart.Sales
GROUP BY FORMAT(OrderDate, 'yyyy-MM')
ORDER BY Month;Where can you check this?
- Claude Code docs: Permission modes, plan mode
- Claude Code docs: Common workflows, exploring and planning before editing
Where do you start?
Give Claude your pipeline's rules first with a CLAUDE.md for a data repository, and catch join problems with a skill that checks SQL.