SkillAgentSearch skills...

AUTHENTICATION

This skill uses a **hybrid authentication approach** that combines the best of both worlds: 1. **Persistent Browser Profile** (`user_data_dir`) for consistent browser fingerprinting

Install / Use

npx skills add tharsananarul/portfolio

Installs into whichever agent you are using.

About this skill
📐

Cursor Rules

Cursor IDE rules (v2)

Quality Score

66/100

Supported Platforms

Cursor

Our assessment of AUTHENTICATION

AUTHENTICATION scores 66/100 on our quality scale, 3976th of 4,705 Development & Engineering skills we index.

Its Cursor Rules is 5.5 KB long, well organised into 19 sections with 6 code examples: a solid amount of guidance for an agent.

It has no GitHub stars yet, so there is no community track record; judge it on its content.

Substance
26/30
Structure
20/20
Description
15/15
Adoption
0/20
Freshness
5/15

Maintenance, license and trust

  • We could not determine when the repository was last updated.
  • Our last check on 2026-11-12 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 68/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-08. Automated pattern scan on 2026-10-08. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

AUTHENTICATION compared with similar skills

All 4 of these similar skills score higher than AUTHENTICATION; compare them before choosing.

SkillScoreStarsUpdatedFormat
AUTHENTICATION (this skill)by tharsananarul660—Cursor Rules
taste-skillby Leonxlnx100120.0ktodayCLAUDE.md
hyperframesby heygen-com10088.2ktodayCLAUDE.md
ai-job-searchby ai-job-search-dev10073.0ktodayCLAUDE.md
claude-howtoby luongnv8910047.5k1d agoCLAUDE.md

Frequently asked questions

How do I install AUTHENTICATION?
Run npx skills add tharsananarul/portfolio. The install tabs above show the steps for each supported agent.
Which AI agents does AUTHENTICATION work with?
It is written for Cursor, as a Cursor Rules file. Other agents that read the same format can often use it too.
Is AUTHENTICATION safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 68/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is AUTHENTICATION still maintained?
We could not determine when the repository was last updated.

Authentication Architecture

Overview

This skill uses a hybrid authentication approach that combines the best of both worlds:

  1. Persistent Browser Profile (user_data_dir) for consistent browser fingerprinting
  2. Manual Cookie Injection from state.json for reliable session cookie persistence

Why This Approach?

The Problem

Playwright/Patchright has a known bug (#36139) where session cookies (cookies without an Expires attribute) do not persist correctly when using launch_persistent_context() with user_data_dir.

What happens:

  • ✅ Persistent cookies (with Expires date) → Saved correctly to browser profile
  • ❌ Session cookies (without Expires) → Lost after browser restarts

Impact:

  • Some Google auth cookies are session cookies
  • Users experience random authentication failures
  • "Works on my machine" syndrome (depends on which cookies Google uses)

TypeScript vs Python

The MCP Server (TypeScript) can work around this by passing storage_state as a parameter:

// TypeScript - works!
const context = await chromium.launchPersistentContext(userDataDir, {
  storageState: "state.json",  // ← Loads cookies including session cookies
  channel: "chrome"
});

But Python's Playwright API doesn't support this (#14949):

# Python - NOT SUPPORTED!
context = playwright.chromium.launch_persistent_context(
    user_data_dir=profile_dir,
    storage_state="state.json",  # ← Parameter not available in Python!
    channel="chrome"
)

Our Solution: Hybrid Approach

We use a two-phase authentication system:

Phase 1: Setup (auth_manager.py setup)

  1. Launch persistent context with user_data_dir
  2. User logs in manually
  3. Save state to TWO places:
    • Browser profile directory (automatic, for fingerprint + persistent cookies)
    • state.json file (explicit save, for session cookies)
context = playwright.chromium.launch_persistent_context(
    user_data_dir="browser_profile/",
    channel="chrome"
)
# User logs in...
context.storage_state(path="state.json")  # Save all cookies

Phase 2: Runtime (ask_question.py)

  1. Launch persistent context with user_data_dir (loads fingerprint + persistent cookies)
  2. Manually inject cookies from state.json (adds session cookies)
# Step 1: Launch with browser profile
context = playwright.chromium.launch_persistent_context(
    user_data_dir="browser_profile/",
    channel="chrome"
)

# Step 2: Manually inject cookies from state.json
with open("state.json", 'r') as f:
    state = json.load(f)
    context.add_cookies(state['cookies'])  # ← Workaround for session cookies!

Benefits

| Feature | Our Approach | Pure user_data_dir | Pure storage_state | |---------|--------------|----------------------|----------------------| | Browser Fingerprint Consistency | ✅ Same across restarts | ✅ Same | ❌ Changes each time | | Session Cookie Persistence | ✅ Manual injection | ❌ Lost (bug) | ✅ Native support | | Persistent Cookie Persistence | ✅ Automatic | ✅ Automatic | ✅ Native support | | Google Trust | ✅ High (same browser) | ✅ High | ❌ Low (new browser) | | Cross-platform Reliability | ✅ Chrome required | ⚠️ Chromium issues | ✅ Portable | | Cache Performance | ✅ Keeps cache | ✅ Keeps cache | ❌ No cache |

File Structure

~/.claude/skills/notebooklm/data/
├── auth_info.json              # Metadata about authentication
├── browser_state/
│   ├── state.json             # Cookies + localStorage (for manual injection)
│   └── browser_profile/       # Chrome user profile (for fingerprint + cache)
│       ├── Default/
│       │   ├── Cookies        # Persistent cookies only (session cookies missing!)
│       │   ├── Local Storage/
│       │   └── Cache/
│       └── ...

Why state.json is Critical

Even though we use user_data_dir, we still need state.json because:

  1. Session cookies are not saved to the browser profile (Playwright bug)
  2. Manual injection is the only reliable way to load session cookies
  3. Validation - we can check if cookies are expired before launching

Code References

Setup: scripts/auth_manager.py:94-120

  • Lines 100-113: Launch persistent context with channel="chrome"
  • Line 167: Save to state.json via context.storage_state()

Runtime: scripts/ask_question.py:77-118

  • Lines 86-99: Launch persistent context
  • Lines 101-118: Manual cookie injection workaround

Validation: scripts/auth_manager.py:236-298

  • Lines 262-275: Launch persistent context
  • Lines 277-287: Manual cookie injection for validation

Related Issues

Future Improvements

If Playwright adds support for storage_state parameter in Python's launch_persistent_context(), we can simplify to:

# Future (when Python API supports it):
context = playwright.chromium.launch_persistent_context(
    user_data_dir="browser_profile/",
    storage_state="state.json",  # ← Would handle everything automatically!
    channel="chrome"
)

Until then, our hybrid approach is the most reliable solution.

Related Skills

View on GitHub
GitHub Stars0
CategoryDevelopment
UpdatedNaNy ago
Forks0

Trust signals

68/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

2 medium1 low