agentleFS
bettyguobettyguo/browser-skills/skills/login-flow/SKILL.md

login-flow

Skill8 starsChanged 7 months agoMITView on GitHub

Signs into a site using credentials provided via `vars` (typically sourced from environment variables) or via a pre-saved Playwright persistent context. Never harvests or stores credentials. See docs/ethics.md.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    MFA-protected logins: If MFA is enabled and there's no pre-saved session, the recipe will hit the MFA challenge and stop.

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Login Flow

When to invoke

The user task requires authentication. The agent provides credentials in:

  • vars.username (or vars.email)
  • vars.password

Per and docs/ethics.md: we use the agent-provided creds only — typically sourced by the agent from env vars ($SITE_X_USER, $SITE_X_PASS) the user has set, or from a password manager the user controls. We never harvest, prompt for, or store credentials. The sensitive: true metadata flag tells the trace recorder to redact form-fill events in the exported zip.

Recipe

  1. wait_for_dom_ready timeout=5s
  2. wait_for_selector selector="input[type='password']" state=visible timeout=5s
  3. fill selector="input[type='email'], input[name='username'], input[name='email'], input[id='username'], input[id='email']" value="$vars.username"
  4. fill selector="input[type='password']" value="$vars.password"
  5. click selector="button[type='submit'], button:has-text('Sign in'), button:has-text('Log in'), input[type='submit']"
  6. wait extra=1000ms

Success criteria

  • assert no_visible_element selector="input[type='password']"
  • assert url_changed_since=step1 OR cookie_set_named="session"

When NOT to use

  • OAuth / SSO flows that redirect through identity providers (Google, Microsoft, Okta). Use handle-oauth-redirect (v0.2.0).
  • Magic-link / passwordless flows. Out of v1 scope; agent must poll its inbox separately.
  • MFA-protected logins. If MFA is enabled and there's no pre-saved session, the recipe will hit the MFA challenge and stop. The agent surfaces the MFA prompt and asks the user how to proceed.

Known failures

  • Sites that hide the password field until the email is submitted first (Google-style): the recipe fills email, submits, then needs to re-find the password field. v0.1 fails on these; the agent can retry with a "submit, wait, re-invoke" loop.
  • Captcha after a few failed attempts: detect-captcha should be chained after this skill.
  • "Are you sure?" dialogs post-login: handle-modal-dialog chains.

Trace handling

Per sensitive: true:

  • form-fill events for password fields are recorded as {value: "[REDACTED]"} in the trace
  • screenshots taken during this skill's steps are blackened over the password field's bounding box (v0.1 omits screenshots from this skill entirely)

Related skills

  • dismiss-cookie-banner — sites with consent walls hit this first
  • detect-captcha — failed-login rate-limiting often triggers captcha

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.