correctness-and-error-handling

correctness-and-error-handling is a skill for Claude Code from cognitedata/builder-skills. It costs 102 tokens per session (3,165 once invoked), scanned A, original, Apache-2.0.

A bug-fixing guide for Flows apps, which are applications built with the Flows framework. It checks data requests, loading screens, empty results, failures, and unusual inputs, then fixes problems it finds.

In plain words
What is it for?
It is used when fixing bugs or error handling in application code, including network failures, permission errors, timeouts, empty data, null values, and rejected asynchronous requests.
Why use it?
It helps prevent crashes, ignored request failures, unclear error messages, and broken behavior when data is missing or unexpected.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

not rated 6repo yesterday A scan Socket: passSnyk: warnSkillSpector: warn 102 tokens original Apache-2.0

Good fit It is used when fixing bugs or error handling in application code, including network failures, permission errors, timeouts, empty data, null values, and rejected asynchronous requests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cognitedata/builder-skills/correctness-and-error-handling
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cognitedata/builder-skills --skill correctness-and-error-handling
Clone the repo
git clone --depth 1 https://github.com/cognitedata/builder-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for correctness-and-error-handling

README.md
[![agentmods](https://agentmods.dev/badge/skills/cognitedata/builder-skills/correctness-and-error-handling/github.svg)](https://agentmods.dev/skills/cognitedata/builder-skills/correctness-and-error-handling)
Your own site
<a href="https://agentmods.dev/skills/cognitedata/builder-skills/correctness-and-error-handling"><img src="https://agentmods.dev/badge/skills/cognitedata/builder-skills/correctness-and-error-handling/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for correctness-and-error-handling

Your own site · 80×15
<a href="https://agentmods.dev/skills/cognitedata/builder-skills/correctness-and-error-handling"><img src="https://agentmods.dev/badge/skills/cognitedata/builder-skills/correctness-and-error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,165 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Sept 2026
  • Snyk warn 18 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 148
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00102 $0.03165
Opus 5.5 $0.00041 $0.01266
Sonnet 5.5 $0.00020 $0.00633
Haiku 4.5 $0.00010 $0.00316

Measured 2mo ago against content hash 776bca56c44e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

correctness-and-error-handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/correctness-and-error-handling/SKILL.md · 365 lines

How it starts

The opening of the file, as written. The whole thing — 365 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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."

# Find "fix" or "broken" or "workaround" markers
grep -rn --include="*.ts" --include="*.tsx" -i -E "(TODO.*fix|workaround|broken|known.?bug|temporary.?hack)" src/

For each match in a critical path (data fetching, rendering, auth, navigation):

  1. Read the surrounding code to understand the incomplete/broken behavior.
  2. Fix the underlying issue — implement the missing logic, correct the broken behavior, or add proper error handling.
  3. If the fix requires significant architectural changes beyond this skill's scope, replace the TODO with a safe failure mode: graceful error handling, a sensible fallback value, or an explicit user-facing message explaining degraded functionality.
  4. Remove the TODO/FIXME/HACK comment after fixing. The code should speak for itself.

Do not leave TODOs in critical paths. Every one must be resolved or converted to a safe fallback.


Step 2 — Add top-level error boundary

Read the full file on GitHub · 365 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 365 lines · 102 tokens per session scan A 776bca56c44e

Subscribe to this mod's changes

correctness-and-error-handling is a skill published in the GitHub repository cognitedata/builder-skills (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 102 tokens to every session and 3,165 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

correctness-and-error-handling compared with skills from other repositories

correctness-and-error-handling next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
correctness-and-error-handlingcognitedata/builder-skillsSkill6yesterdayApache-2.0A102Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
cwv-optimizeradobe/skillsSkill319todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2kyesterdayApache-2.0A15Claude Code, Codex
diagnosing-missing-recordingsPostHog/posthogSkill41ktodaynoneA76Claude Code, Codex
loop-engineeringhuytieu/COG-second-brainSkill1.3k15d agoMITA63Claude Code