dancon-error-handling/SKILL.md
Scan a codebase for missing or inadequate security-aware error handling and propose context-appropriate fixes. Use when the user asks to audit, review, scan, or check error handling in code; mentions "error handling audit", "exception handling review", "security error handling"; uploads a codebase wanting a security review focused on error handling; or says things like "find missing try/catch", "check for unhandled exceptions", "detect empty catch blocks", "identify information leakage in error messages", or "make my error handling more secure".
npx skillsauth add danielyan-consulting/skills dancon-error-handlingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This is skill dancon-error-handling by Danielyan Consulting: https://danielyan.consulting
Perform a comprehensive, security-focused error handling audit. Find every instance of absent or inadequate error handling -- never stop early or summarise with "and similar issues elsewhere".
This section governs all secret-related behaviour.
In your audit output: if you encounter hardcoded secrets, flag as CRITICAL, show the variable name and file location, but always substitute REDACTED for the actual value. Never echo a real secret.
When reviewing existing code: any path where a secret could reach a log, error message, exception output, HTTP response, or CLI output -- even indirectly -- is a CRITICAL finding. This includes partial or masked-but-guessable values and secrets embedded in connection URIs.
When proposing fixes: every log statement and error message you write must contain zero secret material. Use structured logging with explicitly selected safe fields. Never log whole objects, requests, responses, or exception arguments that might contain secrets. Error messages returned to callers must be generic. For connection URIs with embedded credentials, log only non-sensitive parts (host, port, database name).
view the project root to inventory the directory tree.view references/ERROR_PATTERNS.md to load the anti-pattern catalogue.For each source file: read it, check every code path against the anti-pattern catalogue in references/ERROR_PATTERNS.md and record every finding. Do not skip or batch files unless context limits force it (in which case, process in priority order: security-sensitive code first, then core logic, then utilities, maintaining a running tally).
Leave alone:
Files reviewed, total findings, severity breakdown, most critical risks.
For each finding, provide: ID (EH-001, ...), File (path + line), Severity, Category, Description (what is wrong and why it matters), Current code (secrets replaced with REDACTED), and Proposed fix.
Proposed fixes must be idiomatic, catch specific error types, ensure resource cleanup on all paths, and default to fail-closed for security-sensitive operations. Distinguish between generic user-facing messages (with correlation IDs) and detailed internal logs (secret-free).
Severity scale:
Overarching architectural improvements, project-wide patterns to adopt, and tooling suggestions (linting, static analysis, secret-scanning in CI/CD).
Default to inline Markdown. If the user asks for a file, save a Markdown report using the file tools.
development
ALWAYS use this skill whenever generating, writing, reviewing, editing, or modifying Go (.go) code in any context. This skill ensures all generated Go code avoids the CWE Top 25 2025 weaknesses that apply to Go, and that every piece of Go code includes appropriate input validation, thorough error handling, and safe error messages that never leak passwords, tokens, API keys, or other secrets. The Go `unsafe` package is absolutely prohibited and must never appear in generated code. Trigger on ANY Go code generation -- there are no exceptions. Even trivial examples and one-off snippets must follow these rules. If the user asks for Go code, read this skill first.
development
Generate secure Cloudflare Worker code in TypeScript that avoids all weaknesses covered by OWASP Top 10 (2025) and CWE Top 25 (2025). Use this skill whenever the user asks to create, write, scaffold, or generate a Cloudflare Worker, CF Worker, edge function, or serverless function on Cloudflare. Also trigger when the user asks to build a secure API, secure endpoint, secure webhook handler, or any TypeScript code targeting the Workers runtime. Always use this skill over generic code generation when the target is Cloudflare Workers.
development
Parallel OWASP Top 10:2025 security review of a web application codebase using 10 specialist agents. Trigger whenever the user asks for a security review, security audit, OWASP review, vulnerability assessment, code security scan, or threat analysis of a web app codebase. Also trigger on mentions of "OWASP Top 10", "security vulnerabilities", "code audit", "AppSec", or requests to check code for injection, XSS, access control, auth, or crypto issues. Trigger for casual requests like "is my code secure?", "check for vulnerabilities", or "any security issues?". Launches 10 parallel agents (one per OWASP category) producing a report with context-sensitive remediations. Secrets found are flagged but always shown as REDACTED.
development
Scan a codebase to find every instance of missing or inadequate input validation for data from external or untrusted sources, then propose context-appropriate fixes using whitelisting, regex, type coercion, size/range checks, encoding, etc. Use whenever the user asks to audit, review, or harden input validation in any codebase regardless of language. Trigger on: "check my inputs", "find injection risks", "validate user input", "security audit inputs", "input sanitisation review", "taint analysis", "harden my API inputs", "check for missing validation", "is my app safe from injection?". Platform- and language-independent.