playwright-unworld
БесплатноБез исполняемых скриптовНе проверенPlaywright-Unworld Skill: Deterministic Web Automation
от plurigrid★ 73 звезды на GitHubОб этом скилле
Playwright-Unworld Skill: Deterministic Web Automation
Status: 🚀 Production Ready Trit: +1 (PLUS - generative/automation) Principle: Browser state derived from seed chains, not external timing Foundation: Unworld derivation + Playwright API
Overview
Playwright-Unworld applies derivational principles to web automation:
Genesis Seed → Browser Context Seed → Navigation → Selector Path → Screenshots/PDFs
↓ ↓ ↓
GF(3) balanced State-derived Reproducible
No external clocks, no flaky waits, no race conditions. All derived deterministically.
Core Architecture
1. Browser Context Derivation
# Each browser context derives from seed
function derive_browser_context(genesis_seed::UInt64, index::Int)
# Derive unique context seed
context_seed = chain_seed(genesis_seed, index)
# Context properties derived from seed
viewport_width = 800 + (context_seed % 800)
viewport_height = 600 + (context_seed % 600)
timezone = select_timezone(context_seed)
locale = select_locale(context_seed)
BrowserContext(
viewport = (viewport_width, viewport_height),
timezone = timezone,
locale = locale,
seed = context_seed
)
end
Key Property: Same seed → same context every time (reproducible)
2. Selector Chain Derivation
Instead of fragile CSS/XPath strings, derive selectors from seeds:
@present SchSelectorChain(FreeSchema) begin
Selector::Ob
Component::Ob
Role::Ob
component_of::Hom(Selector, Component)
role_of::Hom(Selector, Role)
css_path::Attr(Selector, String)
robustness::Attr(Selector, Float64) # 0-1 confidence
end
@acset_type SelectorChain(SchSelectorChain, index=[:component_of])
# Derive selector from seed + page structure
function derive_selector(seed::UInt64, page_structure::ACSet)
candidates = enumerate_selectors(page_structure)
# Score by robustness (prefer test-id, role, then text, avoid nth-child)
scores = [robustness_score(s) for s in candidates]
# Deterministically select by seed
index = (seed % length(candidates))
return candidates[index + 1]
end
Key Property: Selector strategy emerges from seed, not hardcoded
3. Navigation State Machine
Derive navigation steps without explicit waits:
@present SchNavigationState(FreeSchema) begin
Page::Ob
Action::Ob
Expectation::Ob
action_on::Hom(Action, Page)
expects::Hom(Action, Expectation)
state_after::Attr(Action, String) # "loaded", "interactive", etc
end
@acset_type NavigationState(SchNavigationState)
# Each navigation derives from previous state
function derive_navigation(
current_seed::UInt64,
page_state::NavigationState,
target_url::String
)
# Derive navigation polarity from seed
nav_polarity = (current_seed >> 32) % 3 - 1 # -1, 0, +1 (GF(3))
action = Action(
target = target_url,
polarity = nav_polarity,
timeout = 30000 + (current_seed % 10000) # Deterministic timeout
)
# All subsequent selectors/waits derived from same seed
return action
end
Key Property: No arbitrary waitForNavigation() - state is derived
4. Test Sequence Derivation (Abduction Integration)
Use Phase 1 abduction to discover test patterns:
# Example: Derive login test from observation pattern
function derive_login_test(observations::Vector)
# observations = [
# (page_blank, page_with_login_form),
# (page_with_login_form, page_authenticated)
# ]
skill = abduct_skill(observations) # Phase 1 abduction!
# Returns: hypothesis that explains transitions
# E.g., "fill username + fill password + click submit"
# Convert to Playwright code
return hypothesis_to_playwright(skill)
end
# Output:
# page.locator("input[type='email']").fill(email)
# page.locator("input[type='password']").fill(password)
# page.locator("button:text('Sign in')").click()
Key Property: Tests discovered, not written manually
5. GF(3) Conservation in Automation
Ensure balanced tripartite testing:
@present SchTestTriple(FreeSchema) begin
TestCase::Ob
Agent::Ob # MINUS/ERGODIC/PLUS
agent_runs::Hom(TestCase, Agent)
polarity::Attr(TestCase, Int8) # -1, 0, +1
end
# Tripartite testing strategy
function tripartite_automation(seed::UInt64, test_suite::Vector)
minus_tests = [] # Negative path testing (refutation)
ergodic_tests = [] # Normal path testing (neutral)
plus_tests = [] # Enhanced path testing (confirmation)
for (i, test) in enumerate(test_suite)
polarity = (seed + i) % 3 - 1 # Assign triadic polarity
if polarity == -1
push!(minus_tests, add_negative_assertions(test))
elseif polarity == 0
push!(ergodic_tests, test)
else
push!(plus_tests, add_edge_cases(tes
Установить playwright-unworld в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл playwright-unworld?
Playwright-Unworld Skill: Deterministic Web Automation
Как установить скилл playwright-unworld?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл playwright-unworld запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic