output-error-try-catch

output-error-try-catch is a skill for Claude Code from growthxai/output. It costs 51 tokens per session (942 once invoked), scanned A, original, Apache-2.0.

A guide for handling errors in Output workflows while preserving the original failure details. These workflows use steps that may retry before finally reporting an error.

In plain words
What is it for?
Use it when adding try/catch logic, fallbacks, partial-failure handling, custom errors, or typed checks for errors from workflow steps and evaluators.
Why use it?
It helps avoid catch blocks that hide useful failure types, causes, retry information, or the difference between recoverable and unexpected errors.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the outputai plugin — 50 skills, 5 agents, 1 hook shipped together

Good fit Use it when adding try/catch logic, fallbacks, partial-failure handling, custom errors, or typed checks for errors from workflow steps and evaluators.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/growthxai/output/output-error-try-catch
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 growthxai/output --skill output-error-try-catch
Clone the repo
git clone --depth 1 https://github.com/growthxai/output

Made for: Claude Code.

Or install outputai, the plugin that ships this one along with the rest of its 50 skills, 5 agents, 1 hook.

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 output-error-try-catch

README.md
[![agentmods](https://agentmods.dev/badge/skills/growthxai/output/output-error-try-catch.svg)](https://agentmods.dev/skills/growthxai/output/output-error-try-catch)
Your own site
<a href="https://agentmods.dev/skills/growthxai/output/output-error-try-catch"><img src="https://agentmods.dev/badge/skills/growthxai/output/output-error-try-catch.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 942 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
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00051 $0.00942
Opus 5 $0.00026 $0.00471
Sonnet 5 $0.00010 $0.00188
Haiku 4.5 $0.00005 $0.00094

Measured 8d ago against content hash e8ccdda16843, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

output-error-try-catch 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 8d 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.

coding_assistants/claude/plugins/outputai/skills/output-error-try-catch/SKILL.md · 140 lines

How it starts

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

Handle Errors in Workflows

Understand when workflow catch blocks run

Steps and evaluators run as Temporal Activities. Temporal applies their configured retry policy before returning a successful result or throwing a final failure to workflow code.

A workflow catch around a step therefore runs only after the step has exhausted its Activity retries. Catching that failure does not disable or bypass the Activity retry policy.

The catch block decides what the workflow does with the final failure:

  • Return a fallback value.
  • Run an alternative step.
  • Record a partial failure and continue.
  • Handle an expected error type.
  • Rethrow the error and fail the workflow.

Let unexpected failures propagate

Do not add a catch block that only wraps or logs an error. It can discard Temporal's failure type, cause chain, and retry metadata.

// Avoid: replaces the original Temporal failure chain.
try {
  return await fetchData( input );
} catch ( error ) {
  throw new Error( `Fetch failed: ${error.message}` );
}

When the workflow cannot recover, let the step failure propagate:

export default workflow( {
  name: 'fetch_workflow',
  fn: async input => fetchData( input )
} );

If a catch block handles only known failures, always rethrow everything else.

Check specific error types with hasErrorType

Errors crossing from a step or evaluator into workflow code are serialized into a Temporal failure cause chain. The original JavaScript object identity is not preserved, so error instanceof CustomError is unreliable.

Use hasErrorType from @outputai/core. It walks the cause chain and matches native instances and Temporal's serialized type and name fields.

import { hasErrorType, workflow } from '@outputai/core';
import { lookupCompany } from './steps.js';
import { CompanyNotFoundError } from './types.js';

export default workflow( {
  name: 'company_lookup',
  fn: async input => {
    try {
      return await lookupCompany( input );
    } catch ( error ) {
      if ( hasErrorType( error, CompanyNotFoundError ) ) {
        return null;
      }

      throw error;
    }
  }
} );

Read the full file on GitHub · 140 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. 8d ago First seen · 140 lines · 51 tokens per session scan A e8ccdda16843

Subscribe to this mod's changes

output-error-try-catch is a skill published in the GitHub repository growthxai/output (435 stars, last pushed 3d ago), licensed Apache-2.0. It adds 51 tokens to every session and 942 once invoked, about $0.0003 per session on Opus 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-30.

Related

Other skills, from other repositories

ax-agent

This skill helps an LLM generate correct core AxAgent code using @ax-llm/ax. Use when the user asks about agent(), child agents, namespaced functions, discovery mode, clarification, bubbleErrors, host-side final/clarification protocol, or ordinary agent runtime behavior. For MCP clients, native runtime modules…

ax-llm/ax · 131 tokens

ax-ai

This skill helps an LLM generate correct AI provider setup and configuration code using @ax-llm/ax. Use when the user asks about ai(), providers, models, routing, adaptive balancing, presets, embeddings, batch audio with ai.transcribe() or ai.speak(), extended thinking, context caching, or mentions…

ax-llm/ax · 100 tokens

ax-agent-rlm

This skill helps an LLM generate correct AxAgent RLM/runtime code using @ax-llm/ax. Use when the user asks about RLM code execution, AxJSRuntime, contextFields, contextPolicy, liveRuntimeState, promptLevel, stage prompt controls, executorModelPolicy, maxRuntimeChars, agent.test(...), llmQuery(...), recursionOptions…

ax-llm/ax · 88 tokens

ax-flow

This skill helps an LLM generate correct AxFlow workflow code using @ax-llm/ax. Use when the user asks about flow(), AxFlow, workflow orchestration, parallel execution, DAG workflows, conditional routing, map/reduce patterns, or multi-node AI pipelines.

ax-llm/ax · 59 tokens

ax-agent-memory-skills

This skill helps an LLM generate correct AxAgent memory retrieval, context-map, and dynamic skill-loading code using @ax-llm/ax. Use when the user asks about contextMap, AxAgentContextMap, onMemoriesSearch, memoriesCatalog, recall(...), inputs.memories, onLoadedMemories, onUsedMemories, onSkillsSearch, skillsCatalog…

ax-llm/ax · 128 tokens

ax-agent-optimize

This skill helps an LLM generate correct AxAgent tuning and evaluation code using @ax-llm/ax. Use when the user asks about agent.optimize(...), judgeOptions, eval datasets, optimization targets, saved optimizedProgram artifacts, or agent optimization guidance.

ax-llm/ax · 57 tokens