# Ego decision layer

> Ego decision layer is an open-source agent skill for browser automation. Runs multi-step browser tasks in one loop with a pluggable decision layer for ego-browser. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/jiangkoumo/ego-decision-layer
- **Repository:** https://github.com/jiangkoumo/ego-decision-layer
- **GitHub stars:** 33
- **License:** MIT
- **Skill name:** ego-decision-layer
- **Collection:** https://github.com/jiangkoumo/ego-decision-layer
- **Categories:** [browser automation](https://ai-powered.com/categories/browser-automation)
- **Listing updated:** 2026-12-01

## About

This skill adds an outer routing layer on top of the ego-browser skill for linear multi-step browser work such as chained clicks, pagination, search form submission and page navigation. A decision loop observes the page, builds an indexed list of interactive elements, asks a decider which operation and target to use, dispatches the action through the DevTools protocol and waits for the page to settle, repeating until a success check passes or the model reports completion or a block.

The loop includes safety guards: stale-target checks, pre-dispatch hit testing, refusal of destructive actions such as payments or deletions, and an optional action cache that can replay previously verified steps. It can use the default System One decider or a local OpenAI-compatible model configured in a JSON file. Scripts are provided for a command-line entry point, a plain Node path that connects to an external Chrome over CDP, and a helper that rewires the agent's ego-browser entry so agents route such tasks here first.

Usage requires the ego-browser runtime or a Chrome instance reachable over CDP, plus a TypeSafe API key stored in a file when the default decider is used. Scripts run under Node 22+ and the skill is authored with JavaScript modules.

## When your agent uses it

> 多步线性浏览器任务（连续点击、翻页、搜索表单提交、导航跳转）的默认入口：用 `ego-decision-layer` 一条命令让决策层在单个 ego-browser 进程内闭环决策（默认 System One / Jev，可换本地 OpenAI 兼容后端；browser automation / multi-step click chain / form submit / navigation），不再每步退回大模型思考。单步动作、精确 DOM/选择器、批量抓取仍走 ego-browser 原生 API；也可把官方 ego-browser 技能入口接管成路由层。当任务涉及浏览器多步操作、要写 ego-browser nodejs 脚本（await import / fetch / 凭证落盘）时读它。

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs shell and JavaScript scripts](https://github.com/jiangkoumo/ego-decision-layer)
- [Network calls found in its scripts](https://github.com/jiangkoumo/ego-decision-layer)
- [Includes binary files](https://github.com/jiangkoumo/ego-decision-layer)
- [License: MIT](https://github.com/jiangkoumo/ego-decision-layer)

## Features

- **Closed-loop action decisions:** Observes the page, asks a decider for the next operation and target, and dispatches it in a single process.
- **Element table observation:** Builds an indexed table of interactive elements with their current values, including same-origin iframes and open shadow roots.
- **Safety guards before actions:** Checks targets for staleness, coverage and visibility, and blocks destructive actions like payments or deletions.
- **Action cache replay:** Caches verified action fingerprints so repeated page structures can be replayed without a new model request.
- **Structured data extraction:** Extracts JSON from a page by natural-language instruction and validates it against a supplied schema.
- **Pluggable decider backend:** Switches between the default decider and a local OpenAI-compatible endpoint through configuration.

## Good for

- Click through a site's pagination until a specific page is reached
- Search a website for a term and submit the search form
- Fill several fields of a login or contact form and submit it
- Navigate a chain of links to a target page and confirm the URL
- Extract a list of headlines and links from a page into JSON

## Install

### Claude Code

This skill ships in the `ego-decision-layer` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add jiangkoumo/ego-decision-layer
/plugin install ego-decision-layer@ego-decision-layer
```

Or copy only this skill to `~/.claude/skills/ego-decision-layer`:

```sh
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ego-decision-layer &&
git clone --depth 1 https://github.com/jiangkoumo/ego-decision-layer.git ~/.claude/skills/ego-decision-layer
```

For one project only, put the folder in `.claude/skills/ego-decision-layer` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/ego-decision-layer` to use it in every repository:

```sh
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ego-decision-layer &&
git clone --depth 1 https://github.com/jiangkoumo/ego-decision-layer.git ~/.agents/skills/ego-decision-layer
```

For one repository only, put the folder in `.agents/skills/ego-decision-layer` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/ego-decision-layer` to use it in every project:

```sh
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ego-decision-layer &&
git clone --depth 1 https://github.com/jiangkoumo/ego-decision-layer.git ~/.cursor/skills/ego-decision-layer
```

For one project only, put the folder in `.cursor/skills/ego-decision-layer` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/jiangkoumo/ego-decision-layer.git
```

Or copy the folder to `~/.gemini/skills/ego-decision-layer` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/ego-decision-layer`:

```sh
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ego-decision-layer &&
git clone --depth 1 https://github.com/jiangkoumo/ego-decision-layer.git ~/.copilot/skills/ego-decision-layer
```

For one project only, put the folder in `.github/skills/ego-decision-layer` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/jiangkoumo/ego-decision-layer.git
```

Then copy `ego-decision-layer` into your agent's skills folder as `ego-decision-layer`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Ego decision layer need to run?

It requires the ego-browser skill, Node 22 or later for the plain CDP path, and a TypeSafe API key in a credentials file for the default decider.

### Does Ego decision layer change the ego lite application files?

No. It lives in the agent skills directory and rewires the agent's ego-browser entry without modifying files inside the app bundle.

### Which tasks should Ego decision layer handle versus the native API?

Multi-step linear tasks go to this loop, while single actions, precise selectors, screenshots and bulk scraping stay with the native ego-browser API.

### Can Ego decision layer use a local model instead of the default decider?

Yes. A decider configuration file can point it to a local OpenAI-compatible endpoint, though that model is not calibrated for confidence.

### How do I install Ego decision layer in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ego-decision-layer to use it in all your projects, or to .claude/skills/ego-decision-layer in one project. Or install the ego-decision-layer plugin, which includes it: /plugin marketplace add jiangkoumo/ego-decision-layer, then /plugin install ego-decision-layer@ego-decision-layer.

### Does Ego decision layer run scripts?

Yes. It runs shell and JavaScript scripts. Its scripts contain network calls. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Ego decision layer?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Ego decision layer?

The closest alternatives to Ego decision layer are Agent browser, Puppeteer skill, Chrome devtools, Webapp testing and Playwright interactive.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Agent browser](https://ai-powered.com/skills/agent-browser-chachamaru127-2): Agent browser is an open-source agent skill for browser automation.
- [Puppeteer skill](https://ai-powered.com/skills/puppeteer-skill): Puppeteer skill is an open-source agent skill for browser automation.
- [Chrome devtools](https://ai-powered.com/skills/chrome-devtools): Chrome devtools is an open-source agent skill for browser automation.
- [Webapp testing](https://ai-powered.com/skills/webapp-testing-github): Webapp testing is an open-source agent skill for browser automation.
- [Playwright interactive](https://ai-powered.com/skills/playwright-interactive): Playwright interactive is a free agent skill for browser automation.
- [Playwright skill](https://ai-powered.com/skills/playwright-skill): Playwright skill is an open-source agent skill for browser automation.
- [Playwright](https://ai-powered.com/skills/playwright): Playwright is a free agent skill for browser automation.
- [Browserstack migration skill](https://ai-powered.com/skills/browserstack-migration-skill): Browserstack migration skill is an open-source agent skill for browser automation.

---
Source: https://ai-powered.com/skills/ego-decision-layer
