Agent skill

Lina E2E

by linaproai in linaproai/linapro

Playwright E2E 测试用例管理规范。定义文件命名(模块本地 TC{NNN})、目录布局、TC ID 分配、文件隔离和子断言模式。创建、规划或审查 OpenSpec 变更中的 E2E 测试用例时使用。

Apache-2.0Auto-check passedTesting & QA

Install Lina E2E

skills CLI
$ npx skills add linaproai/linapro --skill lina-e2e -a claude-code

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

GitHub CLI
$ gh skill install linaproai/linapro lina-e2e --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/linaproai/linapro.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/lina-e2e .claude/skills/lina-e2e && 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
lina-e2e
GitHub stars
160
Token cost
~1.9k tokens
SKILL.md length
256 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
Apache-2.0

At a glance

Playwright E2E 测试用例管理规范。定义文件命名(模块本地 TC{NNN})、目录布局、TC ID 分配、文件隔离和子断言模式。创建、规划或审查 OpenSpec 变更中的 E2E 测试用例时使用。

  • Works in 10 steps: 目录结构 → 文件命名规范 → TC ID 分配 → …
  • Tasks that involve End-to-end testing
  • SKILL.md covers 1. 目录结构, 2. 文件命名规范, 3. TC ID 分配 and 4. 测试文件模板, plus 6 more sections
  • Calls npx, pnpm and playwright

What it does

Lina E2E is an agent skill from linaproai/linapro. Playwright E2E 测试用例管理规范。定义文件命名(模块本地 TC{NNN})、目录布局、TC ID 分配、文件隔离和子断言模式。创建、规划或审查 OpenSpec 变更中的 E2E 测试用例时使用。

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: 依赖 Playwright。

It sits in Testing & QA, covering End-to-end testing. It works with Playwright. The repository describes itself as: AI-native full-stack framework engineered for sustainable delivery. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve End-to-end testing

Example prompts

  • “/lina-e2e”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): 依赖 Playwright。

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. 目录结构
  2. 文件命名规范
  3. TC ID 分配
  4. 测试文件模板
  5. 测试独立性
  6. 页面对象模型(POM)
  7. 测试固件
  8. 在 OpenSpec 任务中映射 TC ID
  9. 截图验证
  10. 快速参考

What it can do on your machine

Read from SKILL.md and the folder at commit 75395c8. 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:

    • npx
    • pnpm
    • playwright

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

  • Network

    No URLs in SKILL.md. Its commands use npx and pnpm, which can reach the network depending on how they are called.

    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.

  • Compatibility

    依赖 Playwright。

    From compatibility in the SKILL.md frontmatter.

Context cost

Lina E2E loads about 1.9k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 256 words of instructions outside code blocks.

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

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 linaproai/linapro at commit 75395c8, republished under its Apache-2.0 licence (© linaproai). 256 words, ~1,892 tokens.

Download SKILL.mdSave it as .claude/skills/lina-e2e/SKILL.md (or your agent's skills folder).
name
lina-e2e
description
Playwright E2E 测试用例管理规范。定义文件命名(模块本地 TC{NNN})、目录布局、TC ID 分配、文件隔离和子断言模式。创建、规划或审查 OpenSpec 变更中的 E2E 测试用例时使用。
compatibility
依赖 Playwright。

Lina E2E 测试用例规范

本项目中 Playwright E2E 测试用例的组织、命名和编写标准。

交互语言:与用户交互的内容语言以用户上下文使用的语言为准,用户使用英文则使用英文,用户使用中文则使用中文。

规范来源:E2E 质量审查、截图验证、i18n 文案断言等执行要求的唯一事实来源为 .agents/rules/testing.md。本技能只负责用例组织、命名和目录布局,不重复维护质量审查和验证细则。创建或审查 E2E 用例时,必须读取并遵守 .agents/rules/testing.md 中的 E2E 质量审查要求和 E2E 截图验证要求。


1. 目录结构

hack/tests/
├── e2e/
│   ├── auth/                        # 宿主模块:认证
│   │   ├── TC001-login-verification.ts
│   │   └── TC002-logout.ts
│   ├── admin/                       # 宿主模块:管理功能
│   │   ├── TC001-spec-management.ts
│   │   └── TC002-user-management.ts
│   ├── notebook/                    # 宿主模块:笔记本生命周期
│   │   ├── TC001-create-notebook.ts
│   │   ├── TC002-jupyterlab-access.ts
│   │   ├── TC003-training-execution.ts
│   │   ├── TC004-multi-image-notebook.ts
│   │   └── TC005-shared-directory.ts
│   └── {module}/                    # 宿主新模块遵循相同模式
│       └── TC{NNN}-{brief-name}.ts
├── fixtures/
│   ├── auth.ts
│   ├── config.ts
│   └── k8s.ts
├── pages/                           # 宿主/共享页面对象模型文件
│   ├── LoginPage.ts
│   ├── NotebookPage.ts
│   └── ...
└── playwright.config.ts

源码插件的插件专属 E2E 必须闭环在插件自己的目录中:

apps/lina-plugins/<plugin-id>/
└── hack/tests/
    ├── e2e/
    │   └── TC{NNN}-{brief-name}.ts
    ├── pages/
    │   └── <PluginPageObject>.ts
    └── support/
        └── <plugin-helper>.ts

关键规则:

  • 宿主功能测试放在 hack/tests/e2e/{module}/。
  • 源码插件专属测试放在 apps/lina-plugins/<plugin-id>/hack/tests/e2e/。
  • hack/tests/e2e/extension/plugin/ 只用于宿主插件框架、动态插件运行时、源码插件生命周期这类宿主级插件能力测试;禁止把某个源码插件自身功能的 E2E 放到这里。
  • 每个测试用例文件放在其主要测试的所有权目录下;谁拥有功能,谁拥有测试。

2. 文件命名规范

每个测试文件必须遵循以下模式:

TC{NNN}-{brief-name}.ts
组成部分格式示例
前缀TCTC
ID3 位数字,补零001、012、100
分隔符--
简短名称kebab-caselogin-verification
扩展名.ts.ts

完整示例:

  • TC001-login-verification.ts
  • TC014-bulk-delete-notebooks.ts

规则:

  • 每个文件只包含一个测试用例(一个 test.describe 块)。
  • TC ID 只在当前模块目录内唯一并连续递增。
  • 不使用 .spec.ts 后缀,使用普通的 .ts。

3. TC ID 分配

添加新测试用例前:

  1. 扫描目标模块目录下的现有 TC 文件:
    bash
    find hack/tests/e2e/<module> -maxdepth 1 -type f -name 'TC*.ts' | sort
    # 或源码插件:
    find apps/lina-plugins/<plugin-id>/hack/tests/e2e/<module> -maxdepth 1 -type f -name 'TC*.ts' | sort
  2. 确定当前模块目录内已使用的最大 TC 编号。
  3. 分配下一个顺序编号(递增 1)。

示例: 如果当前模块目录内现有最大文件为 TC005-shared-directory.ts,则下一个测试用例为 TC006。

重要: TC ID 只在所属模块目录内维护,必须从 TC001 开始连续递增。不要因为其他模块或其他插件使用过更大的编号而跳号。


4. 测试文件模板

每个测试文件遵循以下结构:

宿主测试:

typescript
import { test, expect } from '../../fixtures/auth'
import { SomePage } from '../../pages/SomePage'
import { config } from '../../fixtures/config'

test.describe('TC-{N} {简短描述}', () => {
  // 可选:共享设置
  test.beforeEach(async ({ adminPage }) => {
    // ...
  })

  test('TC-{N}a: {子断言描述}', async ({ page }) => {
    // 单一聚焦断言
  })

  test('TC-{N}b: {子断言描述}', async ({ adminPage }) => {
    // 另一个聚焦断言
  })

  test('TC-{N}c: {子断言描述}', async ({ adminPage }) => {
    // ...
  })
})

源码插件测试:

typescript
import { test, expect } from '../../../../../../hack/tests/fixtures/auth'
import { SomePluginPage } from '../pages/SomePluginPage'

test.describe('TC-{N} {插件功能描述}', () => {
  test('TC-{N}a: {子断言描述}', async ({ adminPage }) => {
    // 插件专属流程断言
  })
})

文件内约定:

  • test.describe 标签使用 TC-{N}(不补零)后跟简短描述。
  • 子测试使用 TC-{N}{字母}: 作为前缀(如 TC-1a:、TC-1b:)。
  • 当多个子测试合并为一个块时,使用范围表示法:TC-{N}a~c:。
  • 每个子测试应聚焦于单一断言或紧密相关的断言。

5. 测试独立性

每个测试文件必须可独立运行:

  • 无跨文件依赖。 测试文件不得依赖其他测试文件创建的状态。
  • 自包含设置。 如果测试需要前置条件(如已登录用户、已创建资源),必须通过 beforeEach、beforeAll、固件或内联设置自行完成。
  • 自行清理。 创建资源的测试应清理资源以避免污染其他测试。
  • 可独立运行:
    bash
    npx playwright test hack/tests/e2e/auth/TC001-login-verification.ts
    pnpm -C hack/tests test:module -- plugin:<plugin-id>

6. 页面对象模型(POM)

所有页面交互必须通过页面对象类进行:

typescript
import { Page, Locator } from '@playwright/test'

export class SomePage {
  readonly page: Page
  readonly someElement: Locator

  constructor(page: Page) {
    this.page = page
    this.someElement = page.locator('[data-testid="some-element"]')
  }

  async goto() {
    await this.page.goto('/some-path')
    await this.page.waitForLoadState('networkidle')
  }

  async performAction() {
    // 封装复杂交互
  }
}

规则:

  • 每个页面/功能区域一个 POM 类。
  • 宿主或跨模块共享 POM 放在 hack/tests/pages/。
  • 源码插件专属 POM 放在 apps/lina-plugins/<plugin-id>/hack/tests/pages/。
  • 源码插件专属定位器禁止加到宿主 hack/tests/pages/ 中;只有多个宿主测试或多个插件确实复用的通用能力,才提升到宿主共享 POM。
  • 优先使用 data-testid 属性作为定位策略。
  • POM 方法应返回有意义的值或等待预期状态。

7. 测试固件

共享的测试设置(认证、配置)放在 fixtures/ 目录中:

  • auth.ts — 扩展 Playwright test,提供已认证的页面固件(adminPage 等)
  • config.ts — 环境相关配置(URL、凭据、超时时间)
  • k8s.ts — Kubernetes 辅助工具(Pod 就绪检查、执行命令)

使用固件而非直接导入 @playwright/test:

typescript
// 宿主测试
import { test, expect } from '../../fixtures/auth'

// 源码插件测试
import { test, expect } from '../../../../../../hack/tests/fixtures/auth'

// 错误
import { test, expect } from '@playwright/test'

8. 在 OpenSpec 任务中映射 TC ID

在 OpenSpec 变更中编写 tasks.md 时,E2E 测试任务必须引用 TC ID:

markdown
### 任务 3:E2E — TC006 笔记本自动保存

- [ ] 创建 `hack/tests/e2e/notebook/TC006-notebook-auto-save.ts`
- [ ] 实现 TC-6a:空闲超时后文件自动保存
- [ ] 实现 TC-6b:UI 中显示保存指示器
- [ ] 实现 TC-6c:页面重新加载后内容持久化

源码插件示例:

markdown
### 任务 3:E2E — TC003 插件页面入口

- [ ] 创建 `apps/lina-plugins/example-plugin/hack/tests/e2e/TC003-example-plugin-entry.ts`
- [ ] 实现 TC-3a:插件公开接口可读取
- [ ] 实现 TC-3b:插件插槽内容可见
- [ ] 实现 TC-3c:插件管理页可访问

任务标题中的 TC ID 必须与文件名匹配。子断言(TC-6a、TC-6b)应列为子项。


9. 截图验证

当执行 E2E 测试的代理支持多模态图片识别时,必须在关键交互步骤后捕获浏览器截图并审查截图内容。截图可以发现文本断言无法捕获的问题,包括 i18n key 未翻译、布局错乱、接口报错 toast 等。

截图规范和审查要求的完整定义在 .agents/rules/testing.md 的"E2E 截图验证要求"章节。本节仅列出 Playwright 截图调用约定:

typescript
// 在关键交互后捕获截图
await adminPage.screenshot({
  path: `temp/${new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19)}-${description}.png`,
  fullPage: false, // 只捕获视口,避免过大的截图
});

截图文件命名格式:{YYYYMMDD}-{HHmmss}-{描述}.png,放置在项目根目录 temp/ 下。


9. 快速参考

项目规范
文件名TC{NNN}-{brief-name}.ts
TC ID 范围当前模块目录内唯一并连续递增
宿主测试目录hack/tests/e2e/{module}/
源码插件测试目录apps/lina-plugins/<plugin-id>/hack/tests/e2e/
Describe 标签TC-{N} {描述}
子测试标签TC-{N}{字母}: {描述}
宿主导入 test/expect从相对路径 ../../fixtures/auth 导入
插件导入 test/expect从相对路径 ../../../../../../hack/tests/fixtures/auth 导入
页面交互通过宿主 pages/ 或插件 hack/tests/pages/ 中的 POM 类
独立性每个文件可独立运行
ID 分配扫描当前模块目录已用最大值 → 递增 1
截图验证多模态可用时,关键交互后截图并审查;详见 .agents/rules/testing.md
质量审查详见 .agents/rules/testing.md 的 E2E 质量审查要求

© linaproai, Apache-2.0. 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/lina-e2e of linaproai/linapro.

Open the folder on GitHubat commit 75395c8

Compare with similar skills

Lina E2E 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.

Lina E2E compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lina E2E this skilllinaproai/linapro160—~1.9kAutomated safety check: PassApache-2.0
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
playwright-cli Browser Automationgithub/gh-aw5.4k24 repos~2.8kAutomated safety check: PassMIT
Write and Verify Playwright Testsappsmithorg/appsmith41k—~2.9kAutomated safety check: NotesApache-2.0
Cucumber and Playwright E2E Testslanggenius/dify158k—~682Automated safety check: PassCustom licence
E2E Testinglangflow-ai/langflow156k—~3.3kAutomated safety check: PassMIT

Similar skills

  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Testing & QAAuto-check passed
  • Official

    Drives a real browser from the command line with playwright-cli to open pages, interact, mock requests, save state and work with Playwright tests.

    5.4k GitHub starsUsed in 24 repos~2.8k tokens
    Testing & QAAuto-check passed
  • Writes a Playwright end-to-end test from a prompt, runs it against a live Appsmith deployment and retries with fixes up to three times until it passes.

    41k GitHub stars~2.9k tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Guides changes and reviews of the Cucumber and Playwright end-to-end suite under `e2e/`: feature files, step definitions, support code, tags, locators and assertions.

    158k GitHub stars~682 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • E2E Testing

    langflow-ai/langflow

    Write and review Playwright E2E tests for Langflow. An agent skill from langflow-ai/langflow.

    156k GitHub stars~3.3k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • E2E

    callstack/react-native-pager-view

    Agentic end-to-end tests with e2e, the e2e runner. An agent skill from callstack/react-native-pager-view.

    3.4k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check passed

More from linaproai/linapro

All 13 skills in this repo
  • Lina Perf Audit

    linaproai/linapro

    通过 make db.init/mock 重置数据库、重启服务、安装并启用所有内置插件、准备压测数据,并启动并发子代理; 通常需要几十分钟到数小时,且会消耗大量 Token。不得从其他技能、CI、定时任务、 Git 钩子或模糊的性能请求中触发。

    160 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Vben

    linaproai/linapro

    Vben Admin 5.0 前端框架开发技能。用于开发基于 Vue3、Vite、TypeScript 的中后台管理系统。

    160 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check: notes
  • 手动触发:为 LinaPro 主仓库及 apps/lina-plugins 子模块完成提交、PR 前 rebase、推送、创建 PR, 主仓 CI 修复回路,以及 PR 合并后恢复原始分支并同步 main。禁止自动触发。

    160 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Lina Community Fix CI

    linaproai/linapro

    排查并修复给定的 LinaPro GitHub Actions 失败问题;修复完成后保留本地改动, 禁止自动提交、推送或创建 PR。

    160 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • 审查 LinaPro 社区 GitHub Issues,并按项目规范和源码实现分类处理. An agent skill from linaproai/linapro.

    160 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Lina Community New Branch

    linaproai/linapro

    手动触发:将主仓库与 apps/lina-plugins 对齐最新 main 后, 按提示在两侧各建独立分支;分支就绪后继续处理提示词中的后续请求。

    160 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Lina E2E

What does Lina E2E do?

Playwright E2E 测试用例管理规范。定义文件命名(模块本地 TC{NNN})、目录布局、TC ID 分配、文件隔离和子断言模式。创建、规划或审查 OpenSpec 变更中的 E2E 测试用例时使用。. Lina E2E is an agent skill from linaproai/linapro.

When should I use Lina E2E?

Lina E2E fits situations like: tasks that involve End-to-end testing.

How do I install Lina E2E in Claude Code?

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

How do I install Lina E2E in Codex?

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

Can I use Lina E2E 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 linaproai/linapro --skill lina-e2e -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lina-e2e, .gemini/skills/lina-e2e, .github/skills/lina-e2e and .opencode/skills/lina-e2e in your project.

What does Lina E2E need to run?

Going by SKILL.md and its folder, Lina E2E needs the command-line tools its instructions call (npx, pnpm and playwright). Our summary lists: Node.js. Compatibility (from SKILL.md): 依赖 Playwright。.

Does Lina E2E access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Lina E2E 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 Lina E2E use?

Lina E2E is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lina E2E use?

About 1.9k tokens (SKILL.md is roughly 7.6k 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 Lina E2E?

Skills that share tags, products or a category with Lina E2E: Web Application Testing (anthropics/skills, 180k stars), playwright-cli Browser Automation (github/gh-aw, 5.4k stars), Write and Verify Playwright Tests (appsmithorg/appsmith, 41k stars) and Cucumber and Playwright E2E Tests (langgenius/dify, 158k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lina E2E?

linaproai (a GitHub organization) maintains it in linaproai/linapro, which has 160 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 7, 2026.

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