Agent Skills › crbnos/carbon › error

error

GitHub

在E2E测试中捕获浏览器错误时的截图和元素快照,保存至本地目录供调试。当页面出现报错、认证失败或空白时触发,记录路径后返回控制权。

.claude/skills/error/SKILL.md crbnos/carbon

Trigger Scenarios

E2E测试中出现'Something went wrong' 出现Authentication Error 页面显示为空白 发生非预期的页面重定向

Install

npx skills add crbnos/carbon --skill error -g -y
More Options

Non-standard path

npx skills add https://github.com/crbnos/carbon/tree/main/.claude/skills/error -g -y

Use without installing

npx skills use crbnos/carbon@error

指定 Agent (Claude Code)

npx skills add crbnos/carbon --skill error -a claude-code -g -y

安装 repo 全部 skill

npx skills add crbnos/carbon --all -g -y

预览 repo 内 skill

npx skills add crbnos/carbon --list

SKILL.md

Frontmatter
{
    "name": "error",
    "description": "Capture a screenshot plus element snapshot of the current browser page when an error appears during e2e testing, saved to gitignored .ai\/scratch\/e2e\/. Use whenever an agent-browser snapshot shows \"Something went wrong\", an auth error, a blank page, or an unexpected redirect. Building block — it captures and returns; the caller decides whether to continue."
}

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

Version History

  • dd8f587 Current 2026-08-20 16:17

Same Skill Collection

.claude/skills/agent-browser/SKILL.md
.claude/skills/auth/SKILL.md
.claude/skills/create-agents-md/SKILL.md
.claude/skills/debugging-difficult-bugs/SKILL.md
.claude/skills/execute/SKILL.md
.claude/skills/make-interfaces-feel-better/SKILL.md
.claude/skills/plan/SKILL.md
.claude/skills/pr-explainer/SKILL.md
.claude/skills/pr-splitter/SKILL.md
.claude/skills/research/SKILL.md
.claude/skills/resolving-merge-conflicts/SKILL.md
.claude/skills/root-cause/SKILL.md
.claude/skills/rust-best-practices/SKILL.md
.claude/skills/smoke-test/SKILL.md
.claude/skills/supabase-postgres-best-practices/SKILL.md
.claude/skills/tdd/SKILL.md
.claude/skills/test-driven-development/SKILL.md
.claude/skills/test/SKILL.md
.claude/skills/writing-skills/SKILL.md
.claude/skills/carbon-design/SKILL.md
.claude/skills/carbon-docs/SKILL.md
.claude/skills/changelog-entry/SKILL.md
.claude/skills/check-and-commit/SKILL.md
.claude/skills/explain/SKILL.md
.claude/skills/feature/SKILL.md
.claude/skills/fix/SKILL.md
.claude/skills/grill/SKILL.md
.claude/skills/improve/SKILL.md
.claude/skills/inngest/SKILL.md
.claude/skills/rust/SKILL.md
.claude/skills/self-review/SKILL.md
.claude/skills/spec-writing/SKILL.md
.claude/skills/translate/SKILL.md
.claude/skills/ui/SKILL.md

Metadata

Files
0
Version
f9d7efd
Hash
4e0de405
Indexed
2026-08-20 16:17

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-24 13:53
浙ICP备14020137号-1