auth

GitHub

通过DEV_BYPASS_EMAIL自动登录本地Carbon ERP开发环境,为后续浏览器自动化任务建立认证会话。

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

Trigger Scenarios

需要本地ERP调试环境登录 执行需认证的浏览器自动化前

Install

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

Non-standard path

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

Use without installing

npx skills use crbnos/carbon@auth

指定 Agent (Claude Code)

npx skills add crbnos/carbon --skill auth -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": "auth",
    "description": "Log into the local Carbon ERP dev server with agent-browser using the DEV_BYPASS_EMAIL bypass. Use before any browser automation that needs an authenticated session (\/test, \/smoke-test, manual verification). Requires a running dev stack (crbn up). Building block — it leaves the session open for the caller."
}

auth — authenticate the local browser session

Authenticate against the local Carbon dev environment via DEV_BYPASS_EMAIL. Other skills (/test, /smoke-test) invoke this before authenticated work.

Prerequisites

  • Dev server running (crbn up; plain pnpm dev also works)
  • DEV_BYPASS_EMAIL=test@carbon.ms in .env.local and the test@carbon.ms user seeded — both are done automatically by crbn up

Steps

1. Resolve the ERP URL

grep '^ERP_URL' .env.local

The value varies per worktree — always read it; never assume a URL or port.

2. Open the login page

agent-browser open ${ERP_URL}/login && agent-browser wait --load networkidle && agent-browser snapshot -i

(If wait --load networkidle times out — dev HMR keeps sockets open — use sleep 3 then agent-browser snapshot -i instead.)

3. Fill the email and submit

From the snapshot, find the email input ref and the sign-in button ref:

agent-browser fill @eN "test@carbon.ms"
agent-browser click @eM && agent-browser wait --load networkidle

4. Verify — do not assume

agent-browser snapshot -i

Login succeeded only if the page:

  • redirected to /x (the authenticated dashboard), and
  • shows a greeting ("Good morning, Test" / "Good afternoon, Test") and module cards.

If the snapshot shows "Authentication Error" or is still on /login → login failed. STOP and report the snapshot content; do not retry blindly.

Output

The browser session is authenticated; subsequent agent-browser commands carry the auth cookies. Do not run agent-browser close — leave the session open for the caller.

MES

The MES app is a separate URL: read MES_URL from .env.local and navigate there. The same cookies apply — no separate login.

Version History

  • dd8f587 Current 2026-08-20 16:16

Same Skill Collection

.claude/skills/agent-browser/SKILL.md
.claude/skills/create-agents-md/SKILL.md
.claude/skills/debugging-difficult-bugs/SKILL.md
.claude/skills/error/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
4c169ce0
Indexed
2026-08-20 16:16

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