error-reporting
Skill by Shopify
Sets the error handling and logging policy for runtime code in the @shopify/hydrogen library. It is for developers and reviewers who write or review Hydrogen runtime logic.
Install error-reporting
Built from the published package, never by AI.
git clone --depth 1 https://github.com/Shopify/hydrogen /tmp/hydrogen && mkdir -p ~/.claude/skills && cp -r /tmp/hydrogen/skills/error-reporting ~/.claude/skills/error-reportingRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/Shopify/hydrogen /tmp/hydrogen && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/hydrogen/skills/error-reporting ~/.gemini/antigravity-cli/skills/error-reportingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a policy for how the @shopify/hydrogen library handles runtime failures. It says when to throw a typed error, when to log through the internal scoped logger, when to expose reactive state, and how tests should assert failures. It maps each failure class to one mechanism and says never to both throw and log the same failure.
The logger contract uses getLogger(scope) internally, with six level methods from trace to fatal. Apps can call configureLogging with a custom logger and a minimum level, and the default console sink prints a [hydrogen:level:scope] prefix. The source is for developers and reviewers changing packages/hydrogen/src. It documents exceptions for serialized inline scripts and the no-console lint rule.
Written from the project's SKILL.md and checked against it.
What it can do
- Failure taxonomyMaps each failure class to one mechanism: throw, log, or reactive state.
- Logger contractExplains getLogger(scope) and the six level methods, from trace to fatal.
- configureLoggingSets a custom logger and minimum level, called once at startup.
- Default console sinkFormats entries as [hydrogen:level:scope] followed by the context fields.
- Serialized script exceptionDocuments using consoleLogger with an explicit scope in serialized script chains.
- Failure test expectationsAsserts failures with an injected test logger instead of mocking console.
- no-console enforcementDescribes the no-console lint rule and its sanctioned call sites.
Try asking
- Review this Hydrogen cart handler for error handling against the policy.
- Should this failure in @shopify/hydrogen be thrown, logged, or shown as state?
- Write a Vitest test that injects a logger and asserts a failed storefront call.
Good to know
- Written for runtime files under packages/hydrogen/src.
- Serialized inline scripts are a documented exception that write to console directly.
- Per-request child loggers and request correlation are non-goals.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/error-reporting/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB
Alternatives to error-reporting
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
error-reporting: common questions
When should Hydrogen throw an error instead of logging it?
Programming errors and request-scoped failures with a caller are thrown as typed errors, and the caller decides retry or render. Buyer-visible user errors stay in reactive state and are never logged.
How do I configure logging in Hydrogen?
Call configureLogging once at startup with a logger and a level. The default level is info and the default logger is the built-in console sink.
How should tests check logged failures in Hydrogen?
Inject a test logger with six vi.fn() methods using configureLogging({ logger }). Assert the message, scope and context, not prefix strings.
How do I install error-reporting?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is error-reporting free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is error-reporting safe to use?
It scores 78 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to error-reporting?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
