cc-chrome-extension: Skill for Claude Code

.claude/skills/add-chrome-tool/SKILL.md

add-chrome-tool is a skill for Claude Code from TranHuyQn/cc-chrome-extension. It costs 57 tokens per session (806 once invoked), scanned A, original, MIT.

A development guide for adding browser actions to a Chrome Bridge. It covers the browser extension, the server tool, an end-to-end test, and the README entry.

In plain words
What is it for?
Use it to add, rename, or remove browser capabilities exposed to Claude Code, including their extension handlers, MCP server definitions, tests, and documentation.
Why use it?
It prevents a browser action from working in only part of the system. It also specifies how to handle page scripts, browser debugging commands, and outdated element references.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is TranHuyQn/cc-chrome-extension's own configuration. It tells Claude Code how to work on cc-chrome-extension itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cc-chrome-extension configures →

Reuse

Borrowing it

Nothing to install: this file belongs to TranHuyQn/cc-chrome-extension. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/TranHuyQn/cc-chrome-extension/claude/claude-code-chrome-extension-q9a5sg/.claude/skills/add-chrome-tool/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/TranHuyQn/cc-chrome-extension

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-chrome-tool

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhuyqn/cc-chrome-extension/add-chrome-tool/github.svg)](https://agentmods.dev/skills/tranhuyqn/cc-chrome-extension/add-chrome-tool)
Your own site
<a href="https://agentmods.dev/skills/tranhuyqn/cc-chrome-extension/add-chrome-tool"><img src="https://agentmods.dev/badge/skills/tranhuyqn/cc-chrome-extension/add-chrome-tool/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-chrome-tool

Your own site · 80×15
<a href="https://agentmods.dev/skills/tranhuyqn/cc-chrome-extension/add-chrome-tool"><img src="https://agentmods.dev/badge/skills/tranhuyqn/cc-chrome-extension/add-chrome-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 806 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.00806
Opus 5 $0.00028 $0.00403
Sonnet 5 $0.00011 $0.00161
Haiku 4.5 $0.00006 $0.00081

Measured 11d ago against content hash c6ad0b5bbb7a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

add-chrome-tool scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/add-chrome-tool/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

A tool only works when all four pieces exist. Do them in this order and stop at the first mismatch.

1. Extension handler — extension/background.js

Add a key to the handlers object. The key is the wire method name.

async my_tool(params) {
  const tab = await resolveTab(params);        // honors params.tabId, falls back to active tab
  return await execInTab(tab, pageMyTool, [params.someArg ?? default]);
}
  • Anything touching the DOM goes through execInTab with a pageXxx function. Those are injected into the page: no closures, inline every helper, and end the body with } catch (e) { return { __cc_err: e.message }; } — thrown exceptions are swallowed by chrome.scripting and surface as a useless "no result".
  • Anything needing CDP (keyboard, eval, console, network, full-page screenshot) goes through ensureDebugger(tabId, [domains]) + cdp(tabId, method, params) instead.
  • Element refs: read them from window.__cc_refs; a missing ref must produce a message telling Claude to call read_page again, matching the existing "stale ref" wording.
  • Throw Error with an actionable message rather than returning error objects.

2. MCP tool — server/index.js

Inside buildMcpServer(), register with the same name as the handler key:

tool(
  "my_tool",
  "One line telling Claude when to reach for this and what it gets back.",
  {
    someArg: z.string().describe("..."),
    tabId: tabIdSchema,
  },
  async (args) => textResult(await call("my_tool", args))
);

Reuse tabIdSchema for tab targeting and textResult for the response. Pass a custom timeoutMs as the third arg of call() only for tools that can legitimately outrun the default 45s. Descriptions are read by the model at every session — say when to use the tool, not how it works.

3. E2E coverage — test/e2e.mjs

The test serves its own fixture pages from an in-process HTTP server and drives the real MCP client. Add an assertion next to the related tools:

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 75 lines · 57 tokens per session scan A c6ad0b5bbb7a

Subscribe to this mod's changes

add-chrome-tool is a skill published in the GitHub repository TranHuyQn/cc-chrome-extension (4 stars, last pushed 12d ago), licensed MIT. It adds 57 tokens to every session and 806 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

browser

Use this skill when the user says browser, /browser, test in Chrome, inspect a webpage, verify a localhost app, capture screenshots, check console/network errors, run browser QA, or automate browser flows with the Mochi browser MCP.

DevZonayed/Mochi · 50 tokens

qa-runner

Use when asked to "run QA", "qa check", "test checklist", or execute QA checklists against a running app via browser automation. Requires the browser-bridge MCP server and Chrome extension.

adbarc92/mcp-browser-bridge · 44 tokens

e2e-tester

Test a web app like a QA person — open it in a real browser, click through flows, and report what's broken with screenshots and code references. Works on localhost. Use when the user wants to test their app, verify a flow works, check for visual bugs, or validate changes before pushing.

hanzili/hanzi-browse · 66 tokens

e2e-testing

Playwright E2E testing patterns, Page Object Model, configuration, CI/CD integration, artifact management, and flaky test strategies. Use when writing Playwright tests, structuring page objects, or fixing flaky E2E runs in CI.

affaan-m/ECC · 53 tokens

dogfood

Exploratory QA of web apps: find bugs, evidence, reports.

NousResearch/hermes-agent · 18 tokens

e2e-testing-patterns

Master end-to-end testing with Playwright and Cypress to build reliable test suites that catch bugs, improve confidence, and enable fast deployment. Use when implementing E2E tests, debugging flaky tests, or establishing testing standards.

wshobson/agents · 51 tokens