Logo Burn After Login

Burn After Login

Cộng đồng
pbakaus
burn-after-login

Create dev-only auth shortcuts so AI browser automation agents can authenticate instantly. Analyzes your auth system, creates guarded endpoints/scripts, detects your browser automation tools, and updates agent instructions. Use when setting up dev authentication for browser automation, or when agents struggle with login forms. Self-destructs after completion.

Tổng quan

Nhà phát hànhpbakaus
Kho mãburn-after-login
Tên kỹ năngburn-after-login
Sao
54
Bản fork
3
Tệp đi kèm
25
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 25 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được pbakaus công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Burn After Login trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/pbakaus/burn-after-login/tree/main
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/pbakaus/burn-after-login.git \
  .claude/skills/burn-after-login
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Burn After Login trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Burn After Login ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Burn After Login với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Burn After Login

Your mission, should you choose to accept it, is to create dev-only auth shortcuts so AI browser agents can authenticate instantly. This skill will self-destruct after completion.

Follow these phases in order. If a phase has an EXIT CONDITION that triggers, stop immediately and report the issue — do NOT continue to later phases.


Phase 1: Environment Validation

Verify this codebase has:

  1. A way to detect development/local mode. Look for:

    • Environment variables: NODE_ENV, RAILS_ENV, FLASK_ENV, APP_ENV, DEBUG, ENVIRONMENT, etc.
    • Config files that distinguish dev from prod
    • Build flags or conditional compilation
  2. An existing authentication system. Look for:

    • Auth-related directories: auth/, authentication/, identity/
    • Auth libraries in dependencies (check package.json, requirements.txt, Gemfile, go.mod, Cargo.toml, etc.)
    • Middleware or decorators that check auth
    • Login routes or handlers

EXIT CONDITIONS:

  • If no dev mode detection exists: Stop and say "Could not find a way to detect development mode. Add environment-based detection first to ensure auth shortcuts are never exposed in production."
  • If no auth system exists: Stop and say "No authentication system found. Set up authentication first."

Phase 2: Find Development Credentials

Search for existing dev/test credentials in:

  • Seed/fixture files: seed.*, fixtures/, test-data/, mock/
  • Scripts directory for user management tools
  • Database migrations or seeders
  • Documentation mentioning test accounts (README, CLAUDE.md, etc.)
  • Environment files (.env.development, .env.local, .env.example)

Search patterns: username, password, testuser, demo, admin@, test@, seed, fixture

EXIT CONDITION:

  • If no credentials found: Stop and say "No development credentials found. Create test users first (via seed script, admin panel, or auth provider dashboard), then run this again."

Document what you find — list the credentials with their roles.


Phase 3: Analyze Authentication

Discover:

  1. How auth works in this codebase:

    • Token-based (JWT, API keys, Bearer tokens)
    • Session/cookie-based
    • Both (common in apps with API + web frontend)
  2. What auth library/framework is used:

    • Identify from dependencies and imports
    • Understand how to programmatically authenticate a user
    • Understand how sessions/tokens are created and validated
  3. What apps/services exist:

    • Web frontends (any framework)
    • Admin interfaces
    • API servers
    • List each with its path and auth pattern

Phase 4: User Selection

Ask the user which apps/services should have dev auth shortcuts.

If a tool to ask the user is unavailable, create shortcuts for all discovered apps.


Phase 5: Create Shortcuts

Create authentication shortcuts appropriate for the codebase's language, framework, and auth system.

For token-based auth — Token Generator

Create a script that:

  • Accepts credentials (with sensible dev defaults)
  • Calls the existing auth system to get a token
  • Outputs only the token to stdout (for easy scripting)
  • Example usage: TOKEN=$(./scripts/get-token) && curl -H "Authorization: Bearer $TOKEN" http://localhost:8000/api/...

For cookie/session auth — Dev Login Endpoint

Create an endpoint that:

  • Accepts credentials via query params or JSON body
  • Calls the existing auth system
  • Sets session cookies
  • Returns 404 in production (not an error — completely hidden)
  • Example usage: open "http://localhost:3000/dev-login?user=demo&pass=demo"

Guidelines

  1. Follow existing patterns — Match the codebase's style, conventions, and directory structure
  2. Use the existing auth system — Don't reinvent; call the same auth functions the app uses
  3. Guard with dev-only checks — The shortcut MUST refuse to work in production
  4. Keep it simple — Minimal code that does one thing

Security Requirements

  • Check for development mode BEFORE doing anything
  • Return 404 or equivalent in production (not an error message that reveals the endpoint exists)
  • Never log credentials
  • Consider also checking for localhost/127.0.0.1 if appropriate

Reference Implementations

Use these for inspiration only. Adapt to the actual stack and auth system in use.

ts
// scripts/get-token.ts
async function main() {
  const [user, pass] = process.argv.slice(2);
  const { token } = await yourAuthLib.signIn(
    user || 'demo@test.com',
    pass || 'demo'
  );
  console.log(token);
}
main();
ts
export async function GET(req: Request) {
  if (process.env.NODE_ENV !== 'development') {
    return new Response('Not found', { status: 404 });
  }
  const url = new URL(req.url);
  await yourAuth.signIn(
    url.searchParams.get('email'),
    url.searchParams.get('password')
  );
  return Response.json({ ok: true });
}
python
from django.conf import settings
from django.http import Http404, JsonResponse
from django.contrib.auth import authenticate, login

def dev_login(request):
    if not settings.DEBUG:
        raise Http404()
    user = authenticate(
        username=request.GET.get('user'),
        password=request.GET.get('pass')
    )
    if user:
        login(request, user)
        return JsonResponse({'ok': True})
    return JsonResponse({'error': 'Invalid'}, status=401)
ruby
class DevSessionsController < ApplicationController
  skip_before_action :verify_authenticity_token

  def create
    raise ActionController::RoutingError, 'Not Found' unless Rails.env.development?
    user = User.find_by(email: params[:email])
    if user&.authenticate(params[:password])
      session[:user_id] = user.id
      render json: { ok: true }
    else
      render json: { error: 'Invalid' }, status: 401
    end
  end
end
python
@app.route('/dev-login')
def dev_login():
    if not current_app.debug:
        abort(404)
    user = authenticate(
        request.args.get('email'),
        request.args.get('password')
    )
    if user:
        session['user_id'] = user.id
        return jsonify(ok=True)
    return jsonify(error='Invalid'), 401
go
func DevLogin(w http.ResponseWriter, r *http.Request) {
    if os.Getenv("ENV") != "development" {
        http.NotFound(w, r)
        return
    }
    user, err := auth.Authenticate(
        r.URL.Query().Get("email"),
        r.URL.Query().Get("password"),
    )
    if err != nil {
        http.Error(w, "Unauthorized", 401)
        return
    }
    session.Set(r, w, user)
    json.NewEncoder(w).Encode(map[string]bool{"ok": true})
}

Phase 6: Detect Browser Automation Tools

Scan the project for browser automation tools that are configured or in use. Check:

  1. MCP server configurations — Look in .claude/settings.json, mcp.json, .cursor/mcp.json, or similar for:

    • claude-in-chrome or chrome-extension
    • playwright or @anthropic/mcp-playwright or @anthropic-ai/mcp-playwright
    • chrome-devtools or devtools-mcp
    • browserbase or stagehand
  2. Dependencies — Check package.json, requirements.txt, Gemfile, go.mod, etc. for:

    • playwright, @playwright/test
    • puppeteer, puppeteer-core
    • selenium, selenium-webdriver
    • cypress
    • @browserbasehq/stagehand
    • agent-browser
  3. Config files — Look for:

    • playwright.config.ts, playwright.config.js
    • cypress.config.ts, cypress.config.js
    • .puppeteerrc.js
  4. Existing agent instructions — Scan CLAUDE.md, AGENTS.md, GEMINI.md, CURSOR.md, COPILOT.md, .github/copilot-instructions.md, README.md, and files in .claude/, .cursor/, .agents/, .windsurf/ for any mentions of browser automation, testing, or auth flows.

Record everything you find — you'll need it for the next phase.


Phase 7: Update Agent Instructions & Documentation

Based on what you found in Phase 6, update or create documentation so that AI agents using browser automation know about the dev auth shortcuts.

For each detected browser automation tool, add specific usage instructions:

Claude in Chrome / Chrome Extension MCP:

To authenticate in the browser, navigate to:
http://localhost:PORT/dev-login?email=EMAIL&password=PASSWORD
Then proceed to the authenticated page.

Playwright / Playwright MCP:

To authenticate before testing:
await page.goto('http://localhost:PORT/dev-login?email=EMAIL&password=PASSWORD');
// Session cookies are now set, proceed with authenticated actions
await page.goto('http://localhost:PORT/dashboard');

Token-based (for API testing with any tool):

To get an auth token for API requests:
TOKEN=$(./scripts/get-token EMAIL PASSWORD)
Use header: Authorization: Bearer $TOKEN

Where to add documentation:

  • If CLAUDE.md exists — add a "Dev Authentication" section
  • If AGENTS.md exists — add a "Dev Authentication" section
  • If CURSOR.md exists — add equivalent instructions
  • If GEMINI.md exists — add equivalent instructions
  • If COPILOT.md or .github/copilot-instructions.md exists — add equivalent instructions
  • If .windsurf/ config exists — add equivalent instructions
  • If none of these exist — create an AGENTS.md with the auth instructions

Always match the existing style and formatting of each file you modify.

Documentation must include:

  1. What dev auth shortcuts are available (endpoints and/or scripts)
  2. The test credentials and their roles
  3. Tool-specific usage examples (based on what was detected)
  4. A note that these only work in development mode

Phase 8: Summary

Present a clear report:

  • What was created (with file paths)
  • How to use each shortcut (with copy-pasteable commands)
  • Which agent instruction files were updated
  • Security measures in place
  • Test credentials reference

Phase 9: Self-Destruct

After presenting the summary, say:

Mission complete. All dev auth shortcuts are in place and your agent instructions have been updated.

This skill has served its purpose. Like any good secret agent tool, it should leave no trace. Want me to self-destruct? (y/n)

If the user agrees:

  1. Check for skills.lock in the project root or common locations. If it exists and contains burn-after-login, the skill was installed via npx skills. Run:

    npx skills remove burn-after-login

    This handles all cleanup. Done.

  2. If no skills.lock found, manually clean up by deleting the skill directory from all locations where it may exist:

    • .agents/skills/burn-after-login/
    • .claude/skills/burn-after-login/
    • .claude/commands/burn-after-login.md
    • .cursor/skills/burn-after-login/
    • .windsurf/skills/burn-after-login/
    • Any symlinks pointing to the above
  3. After cleanup, say:

    This skill will self-destruct in 3... 2... 1...

    burn-after-login has been removed. Your dev auth shortcuts remain intact. Good luck out there, agent.

If the user declines:

Understood. The skill remains installed if you need to run it again. You can remove it anytime with npx skills remove burn-after-login.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Burn After Login làm được gì?

Create dev-only auth shortcuts so AI browser automation agents can authenticate instantly. Analyzes your auth system, creates guarded endpoints/scripts, detects your browser automation tools, and updates agent instructions. Use when setting up dev authentication for browser automation, or when agents struggle with login forms. Self-destructs after completion.

Vì sao nên dùng Burn After Login trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Burn After Login là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Burn After Login trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/pbakaus/burn-after-login/tree/main. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Burn After Login?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Burn After Login với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Burn After Login với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Burn After Login có miễn phí không?

Có. Kỹ năng này được pbakaus phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇