cognitedata avatar

Correctness And Error Handling

This is the skill you run when your Flows app crashes in production or shows a blank screen instead of an error message. It systematically hunts down and fixes missing error boundaries, unhandled promise rejections, forgotten loading states, and unsafe JSON parsing from external sources. Goes beyond linting by actually writing the try/catch blocks, adding the empty state UI, and wrapping your data fetches with proper error handling. It's opinionated about structure (every async call needs a catch, every list needs an empty state, every external input needs validation) but that's the point. If you're tired of debugging "cannot read property of undefined" at 2am, this automates the defensive coding you should have written in the first place.

skills.sh installs
1.9K
GitHub stars
6
last updated
Aug 21, 2026

Install

$ npx -y skills add cognitedata/builder-skills --skill correctness-and-error-handling --agent claude-code

Installs into .claude/skills of the current project.

Files

Correctness & Error Handling Fix

Find and fix correctness issues and missing error handling in $ARGUMENTS (or the whole app if no argument is given). Work through every step below. Each step searches for problems and then fixes them in place. Only report issues that cannot be auto-fixed.


Step 1 — Map data flows and fix known defects

Read these files before checking anything:

  • src/main.tsx / src/App.tsx — top-level error boundaries and auth flow
  • All files matching **/hooks/*.ts, **/contexts/*.tsx — shared async state
  • All files matching **/api/*.ts, **/services/*.ts — CDF SDK call sites

For each async data source, note:

  • What happens when the request fails (network error, CDF 403, timeout)?
  • What does the UI show while loading?
  • What does the UI show if the result is empty?

Find and fix known defects in critical paths

# Find TODO/FIXME/HACK in critical code paths (not test files)
grep -rn --include="*.ts" --include="*.tsx" -E "(TODO|FIXME|HACK|XXX):" src/ | grep -v ".test." | grep -v ".spec."

Sponsors

Details

Repository
github.com/cognitedata/builder-skills
Categories
Backend & APIs, Debugging
First seen
Jun 3, 2026

More from cognitedata/builder-skills

All 26
1jackwener avataropencli-operatejackwener/opencliMake websites accessible for AI agents. Navigate, click, type, extract, wait — using Chrome with existing login sessions. No LLM API key needed.1.9Kskills.sh installs
2cognitedata avatardm-limits-and-best-practicescognitedata/builder-skillsReference skill for CDF Data Modeling API best practices. Covers concurrency limits (avoiding 429s), pagination patterns for instances.list and instances.query,1.9Kskills.sh installs
3sfkislev avatarAdobesfkislev/flueControl Adobe desktop apps - Photoshop, Illustrator, Premiere, After Effects, InDesign, Audition - from the shell via Flue, without an MCP server.1.9Kskills.sh installs
4ailabs-393 avatarnutritional-specialistailabs-393/ai-labs-claude-skillsThis skill should be used whenever users ask food-related questions, meal suggestions, nutrition advice, recipe recommendations, or dietary planning. On first u1.9Kskills.sh installs
5k-dense-ai avatarhugging-sciencek-dense-ai/scientific-agent-skillsUse when the user is doing AI/ML work in a scientific domain such as biology, chemistry, physics, astronomy, climate, genomics, materials, medicine, ecology, en1.9Kskills.sh installs
6nvidia avatardigital-health-clinical-asr-setupnvidia/skillsStage 1 of Clinical ASR Flywheel. Use when bootstrapping a cycle: NVCF+MW disclosure, NVIDIA_API_KEY check, deps install, TTS+ASR smoke test.1.9Kskills.sh installs