skills/skillxiv-v0.0.2-claude-opus-4.6/autowebworld-synthetic-web-environments/SKILL.md
Generate synthetic web environments at scale by specifying websites as Finite State Machines with explicit state transitions, then programmatically executing GUI actions to collect verified interaction trajectories. Reduces trajectory cost from $0.15–$1.00 to $0.04 per sample while generating 11,000+ verified trajectories with deterministic, executable validation requiring no external judges.
npx skillsauth add ADu2021/skillXiv autowebworld-synthetic-web-environmentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Training web automation agents requires diverse, labeled interaction trajectories, but collecting real-world web data is expensive (requiring human judges or reward models), slow (real websites have variable latency), and non-reproducible (website layouts change constantly). Existing synthetic approaches either produce toy websites or generate trajectories without programmatic verification, limiting scalability and trustworthiness.
The core insight is treating websites as Finite State Machines where all state transitions are explicit and deterministic, enabling programmatic trajectory verification without external judges. By making state transitions machine-readable, the system can enumerate valid action sequences through breadth-first search and validate them through execution.
AutoWebWorld uses a four-stage pipeline grounded in FSM theory:
The key advantage: unlike real websites with implicit state, AutoWebWorld defines states explicitly, enabling deterministic validation without human review or learned judges.
Define an FSM specification as a structured schema, then generate websites programmatically:
def create_fsm_spec(theme='shopping'):
"""
Define FSM specification for a website theme.
Returns dict with pages, initial state, and transitions.
"""
spec = {
'theme': theme,
'pages': [
{'id': 'home', 'elements': ['product_list', 'search_bar', 'cart_icon']},
{'id': 'product_detail', 'elements': ['product_image', 'add_to_cart_btn', 'back_btn']},
{'id': 'cart', 'elements': ['item_list', 'checkout_btn', 'continue_shopping_btn']}
],
'initial_state': 'home',
'transitions': [
{
'from': 'home',
'to': 'product_detail',
'action': 'click_product',
'precondition': 'product_exists',
'effects': ['set_selected_product']
},
{
'from': 'product_detail',
'to': 'cart',
'action': 'add_to_cart',
'precondition': 'product_selected',
'effects': ['update_cart_count']
}
]
}
return spec
Enumerate valid action sequences through FSM traversal:
def enumerate_trajectories(fsm_spec, max_depth=5):
"""
BFS enumeration of all valid trajectories through FSM.
Returns list of (state_sequence, action_sequence) tuples.
"""
from collections import deque
initial = fsm_spec['initial_state']
queue = deque([(initial, [])])
trajectories = []
while queue:
state, actions = queue.popleft()
if len(actions) >= max_depth:
trajectories.append((state, actions))
continue
# Find all valid transitions from current state
for transition in fsm_spec['transitions']:
if transition['from'] == state:
next_state = transition['to']
next_action = transition['action']
queue.append((next_state, actions + [next_action]))
trajectories.append((next_state, actions + [next_action]))
return trajectories
Execute trajectories and validate success:
async def validate_trajectory(trajectory, playwright_page):
"""
Execute action sequence on synthesized website using Playwright.
Returns True if all actions succeed; False if any step fails.
"""
state_sequence, action_sequence = trajectory
try:
for action in action_sequence:
# Locate element and execute action
element = await locate_element(action, playwright_page)
if element is None:
return False
if action.startswith('click'):
await element.click()
elif action.startswith('fill'):
await element.fill('test_input')
await playwright_page.wait_for_load_state('networkidle')
return True
except Exception as e:
return False
| Parameter | Default | Guidance | |---|---|---| | Max FSM depth | 5 | Balance trajectory diversity (higher) with generation cost (lower) | | Themes per batch | 3 | Generate home, shopping, form-filling; add more for diversity | | Tests per trajectory | 1 | Run 1 execution per trajectory; retry failures with different seeds | | Cost threshold | $0.10/traj | Monitor LLM + execution costs; regenerate if >$0.15 |
When to use: When training web automation agents where real-world trajectory costs are prohibitive or reproducibility is critical.
When not to use: For tasks requiring faithful real-world website behavior (responsive design, actual external APIs); synthetic FSM websites are deterministic and simplified.
Common pitfalls:
AutoWebWorld reduces trajectory cost to $0.04 per sample (vs. $0.15–$1.00 for human-validated data) while generating 11,000+ verified trajectories. The approach scales to diverse themes and enables reproducible agent training without external judges.
testing
Uses flow maps as look-ahead operators to enable principled reward-guided diffusion by predicting trajectory endpoints at any denoising step. Deploy when applying rewards or preferences to diffusion trajectories with meaningful gradients throughout generation.
testing
Train language models where each expert learns independently on closed datasets, enabling flexible inference with selective data inclusion or exclusion. 41% performance improvement while allowing users to opt out of specific data sources without retraining.
data-ai
Understand how token generation flexibility in diffusion LMs paradoxically constrains reasoning, as models exploit ordering flexibility to avoid uncertain tokens, and apply simplified approaches that preserve parallel decoding benefits. Use when optimizing diffusion-based language models for reasoning tasks.
devops
Enable LLM agents to improve continuously during deployment by constructing structured experience libraries through self-reflection on successes and failures—achieving 23% improvement on reasoning without gradient-based parameter updates or external training.