Skip to content

Add missing recalc.py formula validation script#40

Open
Bortlesboat wants to merge 1 commit intoanthropics:mainfrom
Bortlesboat:fix/add-recalc-script
Open

Add missing recalc.py formula validation script#40
Bortlesboat wants to merge 1 commit intoanthropics:mainfrom
Bortlesboat:fix/add-recalc-script

Conversation

@Bortlesboat
Copy link

Summary

Adds the recalc.py script that is referenced throughout the DCF model, LBO model, and 3-statement model skills but was never included in the repository.

The problem: Multiple skills document running python recalc.py model.xlsx 30 as a mandatory pre-delivery step, but the script doesn't exist — causing confusion when users follow the workflow.

What the script does:

  • Opens an .xlsx file with openpyxl (formula view + cached value view)
  • Scans all cells for formula error values (#REF!, #DIV/0!, #VALUE!, #NAME?, #NULL!, #N/A, #NUM!)
  • Reports results as JSON in the exact format documented in dcf-model/SKILL.md:
{
  "status": "success",
  "total_errors": 0,
  "total_formulas": 42
}
  • Supports optional timeout argument (default 30s)
  • Exits with code 1 on errors, 0 on success

Skills that reference this script:

  • financial-analysis/skills/dcf-model/SKILL.md (lines 81, 805, 1225, 1252)
  • financial-analysis/skills/dcf-model/TROUBLESHOOTING.md (line 3)
  • financial-analysis/skills/lbo-model/SKILL.md (lines 35, 166)
  • financial-analysis/skills/3-statement-model/SKILL.md (line 14)

Closes #25

The DCF, LBO, and 3-statement model skills all reference recalc.py
for post-build formula error checking, but the script was never
included in the repository.

This script:
- Scans .xlsx files for formula error values (#REF!, #DIV/0!, etc.)
- Reports results as JSON matching the format documented in SKILL.md
- Supports optional timeout (default 30s)
- Handles missing files, missing dependencies, and edge cases

Closes anthropics#25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

recalc.py missing

1 participant