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/portfolioInstalls into whichever agent you are using.
Cursor Rules
Cursor IDE rules (v2)
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
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.
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 foundOur 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.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| AUTHENTICATION (this skill)by tharsananarul | 66 | 0 | — | Cursor Rules |
| taste-skillby Leonxlnx | 100 | 120.0k | today | CLAUDE.md |
| hyperframesby heygen-com | 100 | 88.2k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 73.0k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.5k | 1d ago | CLAUDE.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.
Skill content
View source on GitHubAuthentication Architecture
Overview
This skill uses a hybrid authentication approach that combines the best of both worlds:
- Persistent Browser Profile (
user_data_dir) for consistent browser fingerprinting - Manual Cookie Injection from
state.jsonfor 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
Expiresdate) → 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)
- Launch persistent context with
user_data_dir - User logs in manually
- Save state to TWO places:
- Browser profile directory (automatic, for fingerprint + persistent cookies)
state.jsonfile (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)
- Launch persistent context with
user_data_dir(loads fingerprint + persistent cookies) - 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:
- Session cookies are not saved to the browser profile (Playwright bug)
- Manual injection is the only reliable way to load session cookies
- 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.jsonviacontext.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
- microsoft/playwright#36139 - Session cookies not persisting
- microsoft/playwright#14949 - Storage state with persistent context
- StackOverflow Question - Session cookie persistence issue
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
taste-skill
120.0kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
hyperframes
88.2kAI video you can actually edit. HyperFrames is a free, open-source AI video editor. Describe any video and get a real project you can change down to the frame.
ai-job-search
73.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.5kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
