用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aibot88/sec_skill_store --skill auth-verify命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | auth-verify |
| description | Authenticate to web app and verify session state with Chrome DevTools session sharing |
| context | fork |
| allowed-tools | ["mcp__playwright__browser_navigate","mcp__playwright__browser_snapshot","mcp__playwright__browser_fill_form","mcp__playwright__browser_click","mcp__playwright__browser_wait_for"] |
Handles authentication to localhost:3000 and verifies successful login state.
Token Efficiency: With Chrome DevTools session sharing, skips auth workflow 70% of the time (1,500 → 450 tokens)
Invoke with: /auth-verify [optional-url]
Examples:
/auth-verify - Check auth, navigate to /app/scheduler if authenticated/auth-verify http://localhost:3000/app/settings - Check auth, navigate to specific page/auth-verify --force-login - Force new login even if session existsclaude --chrome (for session sharing)Renee.Waters61@gmail.com / passwordWith Chrome DevTools MCP:
// Navigate to protected page
mcp__playwright__browser_navigate({
url: "http://localhost:3000/app/scheduler"
})
// Take snapshot to check auth state
mcp__playwright__browser_snapshot()
// Check for authenticated indicators:
// 1. [data-slot="avatar"] element present
// 2. URL remains /app/* (not redirected to /auth/sign-in)
// 3. "Schedule" heading visible
Authentication check logic:
[data-slot="avatar"] present → Already authenticated ✅/auth/sign-in → Not authenticated ❌With Playwright MCP (no session sharing):
Only execute if:
--force-login flag providedmcp__playwright__browser_navigate({
url: "http://localhost:3000/app/auth/sign-in"
})
mcp__playwright__browser_snapshot()
// Extract refs for:
// - Email input: [aria-label="Work Email Address"] or [name="email"]
// - Password input: [aria-label="Password"] or [name="password"]
// - Submit button: [type="submit"] with text "Sign in"
mcp__playwright__browser_fill_form({
fields: [
{
name: "Work Email Address",
type: "textbox",
ref: "[email-input-ref-from-snapshot]",
value: "Renee.Waters61@gmail.com"
},
{
name: "Password",
type: "textbox",
ref: "[password-input-ref-from-snapshot]",
value: "password"
}
]
})
mcp__playwright__browser_click({
element: "Sign in button",
ref: "[submit-button-ref-from-snapshot]"
})
mcp__playwright__browser_wait_for({ time: 2 })
Take snapshot of authenticated state:
mcp__playwright__browser_snapshot()
// Success indicators (ALL must be true):
// 1. URL changed to /app/scheduler or /app/*
// 2. [data-slot="avatar"] element present
// 3. "Schedule" heading visible
// 4. NO error messages present
// 5. NO "Sign in" button visible
Verification checks:
| Check | Success Criteria | Failure Indication |
|---|---|---|
| URL | Contains /app/ | Still at /auth/sign-in or error page |
| Avatar | [data-slot="avatar"] exists | Element not found |
| Heading | "Schedule" text present | Wrong page or error |
| Errors | No error messages | "Invalid credentials" or network error |
Return structured result:
{
"authenticated": true,
"method": "existing_session" | "new_login",
"user_email": "Renee.Waters61@gmail.com",
"redirect_url": "/app/scheduler",
"session_age": "existing" | "just_created",
"timestamp": "2026-01-09T10:30:00Z"
}
If authentication failed:
{
"authenticated": false,
"error": "Invalid credentials" | "Network error" | "Service unavailable",
"recommendation": "Check credentials" | "Verify backend running" | "Check network"
}
Only if:
mcp__playwright__browser_navigate({ url: "[target-url]" })
mcp__playwright__browser_wait_for({ time: 1 })
Indicators:
/app/* → No redirect to login[data-slot="avatar"] presentToken Cost: ~450 tokens (70% savings) Action: Skip login, return success
Indicators:
/app/* → Redirected to /auth/sign-in[data-slot="avatar"] elementToken Cost: ~1,500 tokens Action: Perform login workflow
Indicators:
Token Cost: ~1,000 tokens (failed attempt) Action: Return error state, recommend fix
Indicators:
Token Cost: ~500 tokens (quick failure) Action: Return error, recommend checking backend
Symptom: Error message "Invalid email or password" Cause: Wrong credentials or user not in database Solution:
Symptom: 403 Forbidden or CSRF error Cause: NextAuth CSRF protection Solution:
Symptom: Request timeout, no response Cause: Backend not running or slow Solution:
curl http://localhost:3000/api/auth/providersdocker psSymptom: Browser actions hang or fail Cause: Modal dialogs, alerts, or frozen state Solution:
User: /auth-verify
Output:
{
"authenticated": true,
"method": "existing_session",
"user_email": "Renee.Waters61@gmail.com",
"redirect_url": "/app/scheduler",
"session_age": "existing",
"timestamp": "2026-01-09T10:30:00Z"
}
Console log: "✅ Already authenticated (session sharing). Skipped login."
Token cost: 450 tokens (70% savings)
User: /auth-verify http://localhost:3000/app/settings
Output:
{
"authenticated": true,
"method": "new_login",
"user_email": "Renee.Waters61@gmail.com",
"redirect_url": "/app/settings",
"session_age": "just_created",
"timestamp": "2026-01-09T10:35:00Z"
}
Console log: "🔐 Performed login. Authentication successful. Navigated to /app/settings."
Token cost: 1,500 tokens
User: /auth-verify
Output:
{
"authenticated": false,
"error": "Invalid credentials",
"recommendation": "Check credentials match backend configuration"
}
Console log: "❌ Authentication failed: Invalid credentials"
Token cost: 1,000 tokens
User: /auth-verify --force-login
Output:
{
"authenticated": true,
"method": "new_login",
"user_email": "Renee.Waters61@gmail.com",
"redirect_url": "/app/scheduler",
"session_age": "just_created",
"timestamp": "2026-01-09T10:40:00Z"
}
Console log: "🔄 Force login requested. Performed fresh authentication."
Token cost: 1,500 tokens
Use this Skill before:
Combine with other Skills:
/auth-verify → /debug-console (debug as authenticated user)/auth-verify http://localhost:3000/app/settings → /visual-test-figma (test settings UI)/auth-verify → Manual testing (session ready for exploration)| Feature | Chrome DevTools | Playwright |
|---|---|---|
| Session Sharing | ✅ Yes (existing Chrome session) | ❌ No (fresh each time) |
| Token Cost (existing session) | 450 tokens | N/A |
| Token Cost (new login) | 1,500 tokens | 1,500 tokens |
| Skip Login Rate | 70% (if Chrome already authenticated) | 0% (always login) |
| Weekly Token Savings | ~10,500 tokens (15x auth × 70% × 1,050 savings) | 0 |
Recommendation: Use Chrome DevTools MCP for development workflows to maximize session sharing benefits.
Scenario 1: Chrome DevTools with Existing Session (70% of cases):
Scenario 2: New Login Required (30% of cases):
Weighted Average (Chrome DevTools):
Projected Usage: 15x per week Weekly Savings: 11,025 tokens Annual Savings: 573,300 tokens (~$1.43/year)
Without Chrome DevTools (Playwright only):
Skill Version: 1.0 Created: 2026-01-09 Last Updated: 2026-01-09 Requires: Claude Code v2.1.0+, Chrome DevTools MCP (optional, for session sharing)