ci4a-semantic-component-interfaces

Installation
SKILL.md

CI4A: Semantic Component Interfaces for Agent-Driven Web Automation

This skill teaches Claude how to implement Component Interface for Agent (CI4A), a technique that wraps UI components in semantic interfaces so AI agents can interact with them through structured tool calls instead of fragile pixel-clicking or DOM scraping. Rather than forcing agents to reverse-engineer human-centric UIs, CI4A exposes each component's state, available actions, and parameter constraints as a machine-readable triplet, cutting interaction steps by ~57% and raising task success rates from ~70% to 86.3% on the WebArena benchmark.

When to Use

  • When building a web application that AI agents will operate (form filling, data entry, testing)
  • When wrapping an existing component library (Ant Design, MUI, Radix) to be agent-accessible
  • When creating browser automation that breaks on DOM changes and needs a stable semantic layer
  • When an agent needs to interact with complex widgets like date pickers, cascaders, or data tables without coordinate-based clicking
  • When designing a hybrid agent that should prefer high-level semantic actions but fall back to low-level DOM operations
  • When refactoring a frontend to support automated QA or RPA workflows driven by LLMs

Key Technique

The Semantic Triplet. CI4A encapsulates each UI component as a triplet <S, T, M>:

  • S (Semantic State View): A direct mapping of the component's internal data model, bypassing the rendering layer. Instead of parsing a DatePicker's rendered calendar grid (O(N) DOM nodes), the agent reads { field: "check-in", value: "2025-12-31", format: "YYYY-MM-DD" } in O(1). This works by tapping into React state/props or Vue reactive objects directly.
  • T (Executable Toolset): Atomic operation primitives that encapsulate state mutation logic. For a DatePicker, this is setValue(date). For a Table, it includes sort(column, direction) and filter(column, value). These wrap either the component's public API or internal state manipulation into standard function calls.
  • M (Interaction Metadata): A structured contract defining parameter types, valid ranges, and constraints. A DatePicker's metadata specifies the date format (YYYY-MM-DD), min/max bounds, and disabled dates -- computed at runtime so the agent never sends invalid input.
Installs
1
GitHub Stars
6
First Seen
Jun 20, 2026
ci4a-semantic-component-interfaces — ndpvt-web/arxiv-claude-skills