Install in seconds
Install this skill
Copy the command and run it in your terminal. You can review the source before installing.
terminal
git clone https://github.com/crbnos/carbon

Works with Git. The repository opens in your current directory.

📸
QualityTypeScript

E2E Error Capture

by crbnos

Captures a screenshot and element snapshot of the browser when an error appears during e2e testing, saving artifacts to a gitignored directory. Triggered by error messages, auth failures, blank pages, or unexpected redirects; returns control to the calling test.

2.3K stars325 forksAdded 2026/07/21
agentic-platformassemblylinebusinesserpleanmanagementmanufacturingmcp-servermespostgresqlqmsreact-routersupabasetypescript

Documentation

README

error — capture browser failure diagnostics

Capture artifacts when the browser shows a failure, then hand control back to the calling skill. Never stops the calling run by itself.

When to invoke

Any agent-browser snapshot that reveals:

  • a "Something went wrong" heading
  • "Authentication Error" or similar
  • a blank page or unexpected redirect
  • any content indicating the page failed to render

Steps

1. Resolve the slug

Use CARBON_WORKTREE from .env.local if present; otherwise the current branch name:

SLUG=$(grep '^CARBON_WORKTREE' .env.local | cut -d= -f2)
[ -z "$SLUG" ] && SLUG=$(git branch --show-current | tr '/' '-')

2. Capture both artifacts

Save to .ai/scratch/e2e/ — it is gitignored (.ai/scratch/ in .gitignore). Never save captures under docs/ (that's the documentation app, and it is tracked).

mkdir -p .ai/scratch/e2e/${SLUG}
STAMP=$(date +%Y%m%d-%H%M%S)
agent-browser screenshot .ai/scratch/e2e/${SLUG}/${module}-${STAMP}.png
agent-browser snapshot -i > .ai/scratch/e2e/${SLUG}/${module}-${STAMP}.txt

${module} = a short name for the route/feature under test (e.g. accounting). The .txt snapshot lets you debug element structure without reopening a browser.

3. Report and return

Log both file paths and continue — the caller decides whether to abort. Include the paths in the caller's final report so a human can open them.

Output

  • .ai/scratch/e2e/{slug}/{module}-{timestamp}.png — screenshot
  • .ai/scratch/e2e/{slug}/{module}-{timestamp}.txt — element snapshot

More from crbnos

Other Claude Code skills by this author in the directory.

🌐
1w ago

Agent Browser

Browser automation CLI for AI agents. Use it to navigate pages, fill forms, click buttons, take screenshots, extract data, test web apps, or automate any browser task.
Automation
+0%2.3K325
🔑
1w ago

Carbon Dev Auth

Authenticates a local browser session against the Carbon ERP dev server using DEV_BYPASS_EMAIL, enabling automated testing and manual verification. Leaves session open for subsequent commands.
Automation
+0%2.3K325
📚
1w ago

Carbon Docs

Author, edit, or extend Carbon's documentation site — a Fumadocs + Next.js app. Use for reader-facing guides, reference pages, and documentation IA. Grounds every claim in source code and follows a warm-paper house style.
Writing
+0%2.3K325
1w ago

Check and Commit

Runs a sequence of code quality gates (type generation, formatting, linting, typecheck, tests, build, i18n) on changed files, fixes simple issues, and commits only when all checks pass. Ideal after a code fix, task execution, or manual changes before committing.
Quality
+0%2.3K325
🔄
1w ago

Conductor

Drive a single work item through a doer→gate→judge→keep-or-revert→ledger cycle to a gated PR, unattended. Use for tightly-scoped bugs, usability tweaks, or small features with explicit acceptance criteria.
Automation
+0%2.3K325
🤖
1w ago

Create AGENTS.md

Generates or refreshes AGENTS.md files for Carbon packages and ERP modules by analyzing the actual source code. Ensures every documentation claim is verified against real functions, tables, and exports.
Writing
+0%2.3K325