danielsuo117/velocitai/architecture
Claude Code and agent skill by danielsuo117/velocitai
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
POM 分层与 context 共享决策树。触发:架构、分层、POM、Page Object、基类设计、新增角色。
Install
npx vskill@latest install danielsuo117/velocitai/architectureSKILL.md
架构决策 — POM 分层与 context 共享模式
适用场景
- 新增角色/端时决定是否引入新基类
- 判断某组用例要不要共享 page / context
- 给新成员解释 POM 分层
POM 分层通用骨架
数据流向:config → conftest(读取配置创建 fixture) → pages(接收 page 对象) → tests(组合页面对象执行断言)
PageObject 骨架
context 共享模式决策树
注意事项:
- ❌ 禁止 session 级跨 class 共享 context(跨 class 职责边界不清)
- ❌ 禁止同一 class 内跨域(会污染共享 context)
- 详细规则见 rules/playwright/browser-context.md "浏览器上下文"段
同 class 内跨用例 page 接力模式
同一 class 的多个用例之间接力同一页面状态(避免每个用例重新登录导航)的 实现要点、骨架与适用条件 → references/page-relay-pattern.md
新增 Role 的落地步骤
- 决策:用上面的决策树判断新 Role 的用例是否可共享 context
- PageObject:以
Role<Role><Page>Page命名、role_<page>文件名前缀,继承BasePage - 基类(若采用 class 级共享):新建
tests/<role>/<role>_base_test.py::<Role>BaseTest继承BaseTest,实现登录 + 切换 + 起点断言 - 用例:
tests/<role>/test_<role>_flow.py::Test<Role>Flow继承新基类 - 文档:在 docs/architecture.md 表中追加一行
- 目录:
pages/__init__.py追加新页面导出
决策落地参考
本项目当前的落地情况(具体类名、fixture、起点页面)→ docs/architecture.md。
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/architecture/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/danielsuo117/velocitai/architecture)