Agent skill

Code Simplification for ego-lite

by citrolabs in citrolabs/ego-lite

Finds and implements evidence-backed simplifications in the ego-lite repository, such as dead code, duplicated state and speculative abstractions, without hiding behavior changes.

MITAuto-check passedDevelopment

Install Code Simplification for ego-lite

skills CLI
$ npx skills add citrolabs/ego-lite --skill ego-lite-simplify -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install citrolabs/ego-lite ego-lite-simplify --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/citrolabs/ego-lite.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/dev-skills/ego-lite-simplify .claude/skills/ego-lite-simplify && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ego-lite-simplify
GitHub stars
17k
Token cost
~1.2k tokens
SKILL.md length
605 words
Files
2
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Finds and implements evidence-backed simplifications in the ego-lite repository, such as dead code, duplicated state and speculative abstractions, without hiding behavior changes.

  • Works in 4 steps: Read AGENTS.md and the design document… → Inspect git status and preserve… → Decide whether the request is an audit… → …
  • Auditing ego-lite for dead code or duplicated state
  • SKILL.md covers Establish the contract, Find strong candidates, Prove each candidate and Report before broad removal, plus 1 more section
  • Calls npm and git

What it does

The aim is to cut concepts and maintenance surface rather than line count, preferring a few well-proven deletions to a long list of guesses. The agent first reads `AGENTS.md` and the design document that owns the behavior, checks `git status` to preserve unrelated changes, and decides whether the request is an audit or an authorized implementation. It also maps the boundaries: `globalThis.ego` comes from a closed-source app and is documented in `docs/native-bindings-api.md`, there are CLI and embedded SDK startup paths, and public agent APIs must stay aligned with tests, `help()` and `skills/ego-browser/SKILL.md`.

Strong candidates include exports, options and fallbacks with no production consumer, tests or docs that are the only users of dropped behavior, duplicated state representations, pass-through layers, compatibility code on a breaking branch and hand-written parsers, queues or retry logic that a Node.js built-in could replace. Moving logic into a wrapper does not count, and each candidate is proven with `rg` searches and a read of its callers before anything is removed.

When your agent uses it

  • Auditing ego-lite for dead code or duplicated state
  • Replacing hand-written utilities with a Node.js built-in
  • Reducing maintenance surface without changing behavior silently

Example prompts

  • “Audit ego-lite for exports and options that no production code uses, and report only what you can prove.”
  • “Remove the compatibility layer on this breaking branch and list the behavior changes it causes.”
  • “Find hand-written retry or queue logic that a Node.js built-in could replace.”

Requirements

  • A checkout of the ego-lite repository

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read AGENTS.md and the design document that owns the affected behavior.
  2. Inspect git status and preserve unrelated user changes.
  3. Decide whether the request is an audit or an authorized implementation. Do not turn a cleanup into a product decision without making the…
  4. Identify the relevant boundary before judging code

What it can do on your machine

Read from SKILL.md and the folder at commit dca7003. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Simplification for ego-lite loads about 1.2k tokens when it runs. Until then it costs about 98 tokens; SKILL.md has 605 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~98
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from citrolabs/ego-lite at commit dca7003, republished under its MIT licence (© citrolabs). 605 words, ~1,211 tokens.

Download SKILL.mdSave it as .claude/skills/ego-lite-simplify/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ego-lite-simplify
description
Find and implement evidence-backed simplifications in the ego-lite repository. Use when reviewing the codebase for dead code, duplicated state or APIs, speculative abstractions, unnecessary compatibility layers, hand-written infrastructure, excessive tests or documentation, or when the user asks to reduce code size or maintenance complexity without hiding behavior changes.

Simplify ego-lite

Reduce concepts and maintenance surface, not just line count. Prefer a few well-proven deletions over a long list of guesses.

Establish the contract

  1. Read AGENTS.md and the design document that owns the affected behavior.
  2. Inspect git status and preserve unrelated user changes.
  3. Decide whether the request is an audit or an authorized implementation. Do not turn a cleanup into a product decision without making the behavior change explicit.
  4. Identify the relevant boundary before judging code:
    • globalThis.ego is supplied by the closed-source app; docs/native-bindings-api.md documents that external contract.
    • The runtime has direct CLI and embedded SDK startup paths.
    • Public agent APIs must stay aligned across implementation, tests, help(), and skills/ego-browser/SKILL.md.
    • Browser state can outlive the short Node.js process.

Find strong candidates

Start with production areas carrying the most state, branching, or public surface. Look for:

  • Exports, helpers, events, options, fallbacks, packages, or state fields with no production consumer.
  • Tests or documentation that are the only consumers of behavior that is no longer required.
  • Multiple representations of the same page, task-space, session, ref, lifecycle, or output state.
  • Pass-through layers that add vocabulary but no policy, isolation, or test seam.
  • Compatibility code that is unnecessary on an explicitly breaking branch.
  • Generality with no current product use, such as unsupported concurrency modes or unused extension points.
  • Special cases, rollback paths, or validation that exist only to protect a removable surface.
  • Hand-written parsers, queues, retry logic, or utilities that a Node.js built-in or healthy dependency can replace with less total code.

Do not count moving logic into a wrapper as simplification. Estimate the net result: implementation, tests, docs, public names, state transitions, and special cases removed minus new glue and dependencies added.

Prove each candidate

Use rg first. Search exact symbols, method forms, event names, configuration keys, error codes, protocol strings, and dynamic registration points. Read the callers rather than relying only on static-analysis output.

Classify evidence as:

  • Production: package/ego-browser/src, runtime scripts, build and loader paths, and shipped site learnings.
  • Contract: public JSDoc consumed by help(), skills/ego-browser/SKILL.md, architecture documents, and native binding behavior.
  • Non-production: tests, fixtures, snapshots, comments, and historical or draft documents.
  • Ambiguous: examples and development scripts; inspect how they are invoked before deciding.

Reject or downgrade a candidate when a real production caller exists, the native contract is uncertain, the change merely relocates complexity, or the deletion requires unrelated churn. A small local cleanup may be implemented directly; a behavior or API decision belongs in the owning design document first.

Show full SKILL.md (192 more words)Show less

Report before broad removal

For an audit, present each worthwhile candidate with:

  • The surface to remove or fold.
  • Call-site and contract evidence.
  • The user-visible behavior change, or “none”.
  • What complexity disappears and what replacement remains.
  • Confidence, risks, and the smallest verification needed.

Call out candidates that require a user decision separately from behavior-preserving cleanups.

Implement safely

Follow spec-driven TDD when changing code:

  1. Update or add a characterization test when existing behavior must remain.
  2. Update the owning design or API contract before an intentional behavior change.
  3. Remove the implementation and its now-obsolete tests, fixtures, exports, JSDoc, help entries, and skill documentation together.
  4. Keep comments in English and explain only non-obvious constraints.
  5. Prefer deleting a state or transition over adding another abstraction around it.

Run the narrowest relevant checks first. From package/ego-browser/, use npm test for runtime changes, npm run e2e for real task-space/browser behavior, and npm run validate:site-skills for learning changes. Finish with git diff --check and report any verification that could not run.

Never edit generated build output as the source of a simplification. Never remove a defensive path until its trust or lifecycle boundary is understood.

© citrolabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .github/dev-skills/ego-lite-simplify of citrolabs/ego-lite.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit dca7003

Compare with similar skills

Code Simplification for ego-lite next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Simplification for ego-lite compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Simplification for ego-lite this skillcitrolabs/ego-lite17k—~1.2kAutomated safety check: PassMIT
Codebase Health Refactoringkucherenko/jscpd6.4k—~2.5kAutomated safety check: PassMIT
DRY Refactoring With jscpdkucherenko/jscpd6.4k—~2.1kAutomated safety check: PassMIT
Dead Code Removal with Knipshift-editor/shift348—~1.8kAutomated safety check: PassApache-2.0
TechdebtDataDog/dd-trace-java736—~565Automated safety check: NotesApache-2.0
Code RefinerMathews-Tom/armory328—~3.1kAutomated safety check: PassMIT

Similar skills

  • A three-part cleanup guided by jscpd: measure health, then fix duplicated code, remove dead code and simplify the most complex files, finishing by re-measuring the score.

    6.4k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Removes copy-paste duplication found by jscpd, starting with exact clones and hotspots, then renamed and near-miss copies, using proven refactoring strategies.

    6.4k GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Dead Code Removal with Knip

    shift-editor/shift

    Finds unused files, exports and class members with Knip, then verifies each candidate through reference tracing before removing anything, never using knip --fix.

    348 GitHub stars~1.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Techdebt

    DataDog/dd-trace-java

    Official

    Review a code diff / branch / PR for technical debt — code duplication, unnecessary complexity / over-engineering, and redundant or dead code.

    736 GitHub stars~565 tokensUpdated today
    DevelopmentAuto-check: notes
  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    328 GitHub stars~3.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 9 days ago
    DevelopmentAuto-check passed

Works with

Categories

Questions about Code Simplification for ego-lite

What does Code Simplification for ego-lite do?

Finds and implements evidence-backed simplifications in the ego-lite repository, such as dead code, duplicated state and speculative abstractions, without hiding behavior changes. The aim is to cut concepts and maintenance surface rather than line count, preferring a few well-proven deletions to a long list of guesses.md` and the design document that owns the behavior, checks `git status` to preserve unrelated changes, and decides whether the request is an audit or an authorized implementation.

When should I use Code Simplification for ego-lite?

Code Simplification for ego-lite fits situations like: auditing ego-lite for dead code or duplicated state; replacing hand-written utilities with a Node.js built-in; reducing maintenance surface without changing behavior silently.

How do I install Code Simplification for ego-lite in Claude Code?

Run `npx skills add citrolabs/ego-lite --skill ego-lite-simplify -a claude-code`. Or copy the skill folder (.github/dev-skills/ego-lite-simplify in citrolabs/ego-lite) into .claude/skills/ego-lite-simplify in your project. Claude Code loads it when a task matches its description.

How do I install Code Simplification for ego-lite in Codex?

Run `npx skills add citrolabs/ego-lite --skill ego-lite-simplify -a codex`. Or copy the skill folder (.github/dev-skills/ego-lite-simplify in citrolabs/ego-lite) into .agents/skills/ego-lite-simplify in your project. Codex loads it when a task matches its description.

Can I use Code Simplification for ego-lite in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add citrolabs/ego-lite --skill ego-lite-simplify -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ego-lite-simplify, .gemini/skills/ego-lite-simplify, .github/skills/ego-lite-simplify and .opencode/skills/ego-lite-simplify in your project.

What does Code Simplification for ego-lite need to run?

Going by SKILL.md and its folder, Code Simplification for ego-lite needs the command-line tools its instructions call (npm and git). Our summary lists: A checkout of the ego-lite repository.

Does Code Simplification for ego-lite access the network?

SKILL.md contains no URLs. Its commands use npm and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Code Simplification for ego-lite safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Simplification for ego-lite use?

Code Simplification for ego-lite is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Simplification for ego-lite use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Simplification for ego-lite?

Skills that share tags, products or a category with Code Simplification for ego-lite: Codebase Health Refactoring (kucherenko/jscpd, 6.4k stars), DRY Refactoring With jscpd (kucherenko/jscpd, 6.4k stars), Dead Code Removal with Knip (shift-editor/shift, 348 stars) and Techdebt (DataDog/dd-trace-java, 736 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Simplification for ego-lite?

citrolabs (a GitHub organization) maintains it in citrolabs/ego-lite, which has 16,997 GitHub stars. The repository was last updated on October 8, 2026.

Source: citrolabs/ego-lite on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.