Skip to content
Back to skills

Extract Errors

ASecurity

Use when extracting, auditing, or standardizing error codes and messages across a codebase. Triggers on "error codes", "error messages", "unknown error", "extract errors", "error registry".

  • 10 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
ai-agentsjavascripttypescriptpythonrustgojavabash

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add yanacuti1121/Yana-AI --skill extract-errors --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Extract Errors?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Extract Errors
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/yanacuti1121-extract-errors/badge)](https://www.skillsdirectory.com/skills/yanacuti1121-extract-errors)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: extract-errors
description: Use when extracting, auditing, or standardizing error codes and messages across a codebase. Triggers on "error codes", "error messages", "unknown error", "extract errors", "error registry".
version: 1.4.20
compatibility: "Claude 4.5+, Sonnet 4.6, Haiku 4.5"
---

# Extract & Audit Error Codes

Cross-language skill for finding, cataloguing, and standardizing error codes and messages in any codebase.

## When to use

- "unknown error code" warning appears at runtime
- New error messages need codes assigned
- Error messages are inconsistent or duplicated across modules
- Building or auditing an error registry

## Instructions

### 1. Discover all error definitions

```bash
# JavaScript / TypeScript
grep -rn "throw new Error\|createError\|ErrorCode\.\|ERROR_" src/ --include="*.ts" --include="*.js"

# Python
grep -rn "raise \|class.*Error\|class.*Exception" . --include="*.py"

# Go
grep -rn "errors.New\|fmt.Errorf\|var Err" . --include="*.go"

# Rust
grep -rn "Err(\|thiserror\|anyhow" . --include="*.rs"
```

### 2. Check for unregistered errors

Compare discovered errors against the error registry file (e.g. `errors.json`, `error_codes.py`, `errors.go`).
Flag any error string not present in the registry.

### 3. Assign codes to new errors

- Use sequential numeric codes within the module's range (e.g. AUTH_001–AUTH_099)
- Format: `<MODULE>_<NNN>` (e.g. `GATE_001`, `HOOK_042`)
- Add to the registry with: code, message template, severity (info/warn/error/fatal), owner module

### 4. Report

Output a table:

| Code | Message | Module | Status |
|------|---------|--------|--------|
| GATE_001 | Identity verification failed | identity-gate | registered |
| HOOK_042 | Circuit breaker open | token-budget-guard | NEW — needs code |

### 5. Verify

Re-run discovery grep after updating the registry to confirm 0 unregistered errors remain.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.