Agent skill

Expect

by millionco in millionco/expect

A skill your agent uses when editing .tsx/.jsx/.css/.html, React components, pages, routes, forms, styles, or layouts.

MITAuto-check passedFrontend & Design

Install Expect

skills CLI
$ npx skills add millionco/expect --skill expect -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install millionco/expect expect --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/millionco/expect.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/expect .claude/skills/expect && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
expect
GitHub stars
3.6k
Token cost
~988 tokens
SKILL.md length
474 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when editing .tsx/.jsx/.css/.html, React components, pages, routes, forms, styles, or layouts.

  • Works in 4 steps: Verify in a browser with adversarial… → Read the full output — check failures,… → If ANY failure: fix the code, re-verify… → …
  • Editing .tsx/.jsx/.css/.html
  • SKILL.md covers Subagent Usage, Resuming Browser State, Compounding and Writing Instructions, plus 2 more sections
  • Calls playwright

What it does

Expect is an agent skill from millionco/expect. Use when editing .tsx/.jsx/.css/.html, React components, pages, routes, forms, styles, or layouts. Also when asked to test, verify, validate, QA, find bugs, check for issues, or fix expect-cli failures.

Its SKILL.md is about 990 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering React components and Debugging. It works with Playwright. The repository describes itself as: Expect tests your agent's code in a real browser. The licence is MIT.

When your agent uses it

  • Editing .tsx/.jsx/.css/.html
  • React components

Example prompts

  • “/expect”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Verify in a browser with adversarial instructions.
  2. Read the full output — check failures, accessibility, performance.
  3. If ANY failure: fix the code, re-verify immediately. No asking, no waiting.
  4. Repeat until 0 failures, then state the claim with passing evidence.

What it can do on your machine

Read from SKILL.md and the folder at commit 39e9750. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • playwright

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Expect loads about 988 tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 474 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~988

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from millionco/expect at commit 39e9750, republished under its MIT licence (© millionco). 474 words, ~988 tokens.

Download SKILL.mdSave it as .claude/skills/expect/SKILL.md (or your agent's skills folder).
name
expect
description
Use when editing .tsx/.jsx/.css/.html, React components, pages, routes, forms, styles, or layouts. Also when asked to test, verify, validate, QA, find bugs, check for issues, or fix expect-cli failures.
license
MIT
metadata.author
millionco
metadata.version
2.4.0

Expect

You verify code changes in a real browser before claiming they work. No browser evidence, no completion claim.

Use the expect MCP tools (open, playwright, screenshot, etc.) for all browser interactions. Do not use raw browser tools (Playwright MCP, chrome tools, etc.) unless the user explicitly asks.

Subagent Usage

Browser verification is best run in a subagent (Task tool) or background shell so the main thread stays free for code edits. This keeps the conversation responsive — you can fix code while the browser test runs in parallel. Strongly prefer launching a subagent for browser work, especially when the test involves multiple steps or long interactions. If the test is truly trivial (single screenshot check), inline is acceptable.

Resuming Browser State

Before opening a new browser, check if one is already running. Use browser_tabs (action list) or the expect screenshot tool to see if a session is still active. If a tab is already open at the target URL, reuse it — don't close and reopen. When re-verifying after a code fix, prefer navigating or refreshing the existing session over starting from scratch.

Compounding

The playwright tool takes a code string with ref() to resolve snapshot refs to Locators. One call can do an entire interaction — fills, clicks, AND data collection. Use that.

BAD — 5 tool calls:

screenshot (snapshot)
playwright: await ref('e3').fill('Jane')
screenshot (snapshot)                        ← WHY? page didn't change
playwright: await ref('e5').fill('jane@example.com')
playwright: await ref('e7').click()

GOOD — 2 tool calls:

screenshot (snapshot)
playwright (snapshotAfter=true):
  await ref('e3').fill('Jane');
  await ref('e5').fill('jane@example.com');
  await ref('e7').click();
  return { title: await page.title(), url: page.url(), errors: (await page.$$('.error')).length };

Use return to collect data. Response: { result: <value>, resultFile: "<tmp path>", snapshot: { tree, refs, stats } }. The resultFile persists until close — read or grep it later. Without a return value, responds "OK" (or just the snapshot if snapshotAfter=true).

Re-snapshot only across DOM boundaries. Fills and hovers don't change page structure — keep using the same refs. Navigation, submit, dialog open/close DO change structure — set snapshotAfter=true.

Show full SKILL.md (191 more words)Show less

Writing Instructions

Bad: "Check that the login form renders on http://localhost:5173" Good: "Submit the login form empty, with invalid email, with wrong password, and with valid credentials. Verify error messages, redirect on success, and console errors on http://localhost:5173"

Before Claiming Completion

  1. Verify in a browser with adversarial instructions.
  2. Read the full output — check failures, accessibility, performance.
  3. If ANY failure: fix the code, re-verify immediately. No asking, no waiting.
  4. Repeat until 0 failures, then state the claim with passing evidence.

Rationalizations

  • "I'll run the browser test inline, it's quick" — Probably not. Launch a subagent so you can keep editing code in parallel. Only skip the subagent for a single screenshot sanity check.
  • "I'll open a fresh browser to re-test" — Check for an existing session first. If the tab is still open, refresh or navigate — don't waste time on a cold start.
  • "I'll make one playwright call per action" — No. Whole sequence in one call.
  • "I need a snapshot between fills" — No. Fills don't change DOM. Batch them.
  • "Let me snapshot to see what changed" — Did the page navigate or submit? No? Use snapshotAfter=true on the action that does.

© millionco, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/expect of millionco/expect.

Open the folder on GitHubat commit 39e9750

Compare with similar skills

Expect next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Expect compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Expect this skillmillionco/expect3.6k—~988Automated safety check: PassMIT
Add React Pagefullstackhero/dotnet-starter-kit6.8k—~1.5kAutomated safety check: PassMIT
React Devtools MCPsanity-io/ui176—~2kAutomated safety check: PassMIT
E2E Tests Studiomastra-ai/mastra29k—~4.3kAutomated safety check: PassCustom licence
Reactmagnus919/agent-skills111—~1.4kAutomated safety check: PassMIT
UI Visual DebuggingNangoHQ/nango13k—~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Add React Page

    fullstackhero/dotnet-starter-kit

    Add a list+create page to a React app (clients/admin or clients/dashboard) — API module, page, lazy route, (admin) permission gate, Playwright test.

    6.8k GitHub stars~1.5k tokensUpdated 7 days ago
    Frontend & DesignAuto-check passed
  • React Devtools MCP

    sanity-io/ui

    Official

    Inspect and profile the React component tree of a running Storybook story through chrome-devtools-mcp (React DevTools over the Chrome DevTools Protocol, via react-devtools-cdt-mcp).

    176 GitHub stars~2k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • E2E Tests Studio

    mastra-ai/mastra

    REQUIRED when modifying any file in packages/playground-ui or packages/playground.

    29k GitHub stars~4.3k tokensUpdated today
    Testing & QAAuto-check passed
  • React

    magnus919/agent-skills

    Operate React applications as a named tool: inspect and diagnose React/Vite projects, design component boundaries and state flow, implement accessible responsive UI, and verify behavior with the…

    111 GitHub stars~1.4k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • UI Visual Debugging

    NangoHQ/nango

    A skill your agent uses when modifying or visually debugging Nango frontend UI, including packages/webapp, packages/connect-ui, browser interactions, screenshots, and visual regressions.

    13k GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Write E2E Tests

    Endava/BEEQ

    Write E2E tests for BEEQ StencilJS components using @stencil/vitest in browser mode (Playwright/Chromium).

    163 GitHub stars~1.3k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from millionco/expect

  • Effect Best Practices

    millionco/expect

    Enforces Effect-TS patterns for services, errors, layers, and atoms.

    3.6k GitHub stars~3.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Debug Agent

    millionco/expect

    Systematic evidence-based debugging using runtime logs. An agent skill from millionco/expect.

    3.6k GitHub stars~2.6k tokensUpdated 5 mo ago
    Auto-check passed
  • Effect Portable Patterns

    millionco/expect

    Portable Effect patterns for robust promise execution. An agent skill from millionco/expect.

    3.6k GitHub stars~3.7k tokensUpdated 5 mo ago
    Auto-check passed
  • Skill Writing

    millionco/expect

    Write and improve agent skills (SKILL.md files). An agent skill from millionco/expect.

    3.6k GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed

Works with

Questions about Expect

What does Expect do?

A skill your agent uses when editing .tsx/.jsx/.css/.html, React components, pages, routes, forms, styles, or layouts. Expect is an agent skill from millionco/expect.html, React components, pages, routes, forms, styles, or layouts.

When should I use Expect?

Expect fits situations like: editing .tsx/.jsx/.css/.html; React components.

How do I install Expect in Claude Code?

Run `npx skills add millionco/expect --skill expect -a claude-code`. Or copy the skill folder (.agents/skills/expect in millionco/expect) into .claude/skills/expect in your project. Claude Code loads it when a task matches its description.

How do I install Expect in Codex?

Run `npx skills add millionco/expect --skill expect -a codex`. Or copy the skill folder (.agents/skills/expect in millionco/expect) into .agents/skills/expect in your project. Codex loads it when a task matches its description.

Can I use Expect in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add millionco/expect --skill expect -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/expect, .gemini/skills/expect, .github/skills/expect and .opencode/skills/expect in your project.

What does Expect need to run?

Going by SKILL.md and its folder, Expect needs the command-line tools its instructions call (playwright).

Does Expect access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Expect safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Expect use?

Expect is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Expect use?

About 988 tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Expect?

Skills that share tags, products or a category with Expect: Add React Page (fullstackhero/dotnet-starter-kit, 6.8k stars), React Devtools MCP (sanity-io/ui, 176 stars), E2E Tests Studio (mastra-ai/mastra, 29k stars) and React (magnus919/agent-skills, 111 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Expect?

millionco (a GitHub organization) maintains it in millionco/expect, which has 3,558 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on May 6, 2026.

Source: millionco/expect on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.