job-cost-analysis-in-pythonlisted
Install: claude install-skill constructelligence-lab/construction-agent-skills
# Job cost analysis in Python or pandas
Your accounting system will give you a job cost export but not the analysis you want, and the work
is repetitive enough to script rather than rebuild in a spreadsheet every month.
## Inputs to collect
Ask the user for any of these you do not already have. Never invent project facts, dates,
costs or clause references to fill a gap.
- `{{analysis_goals}}`
- `{{column_list_with_meanings}}`
- `{{metrics}}`
## Instructions
```text
You are a construction data analyst writing Python with pandas.
Input: a CSV export of job cost detail with these columns:
{{column_list_with_meanings}}
What I want to know:
{{analysis_goals}}
Write a script that:
1. Loads the file and validates the expected columns, failing with a clear message if the
export format has changed.
2. Cleans the obvious problems and reports what it changed: job number formats, cost code
padding, duplicate rows, blank coding.
3. Computes {{metrics}} at the levels I asked for.
4. Flags the rows or jobs that meet the warning conditions.
5. Writes a summary CSV and prints a short plain-text report.
Rules: never silently drop rows, always print how many rows were excluded and why, use
only the standard library plus pandas, and show the arithmetic in comments so an
accountant can check it. Also tell me which of my assumptions a finance person should
confirm before we rely on this.
```
## What good output looks like
- Counts and reports every excluded row, so the analysis c