Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/treylom/knowledge-manager/km-browser-abstractionnpx skills add treylom/knowledge-manager --skill km-browser-abstractiongit clone --depth 1 https://github.com/treylom/knowledge-managerWrote 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.
[](https://agentmods.dev/skills/treylom/knowledge-manager/km-browser-abstraction)<a href="https://agentmods.dev/skills/treylom/knowledge-manager/km-browser-abstraction"><img src="https://agentmods.dev/badge/skills/treylom/knowledge-manager/km-browser-abstraction.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00021 | $0.00997 |
| Opus 5 | $0.00010 | $0.00498 |
| Sonnet 5 | $0.00004 | $0.00199 |
| Haiku 4.5 | $0.00002 | $0.00100 |
Grade A, and why
km-browser-abstraction 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Browser Abstraction Layer
Unified interface for web content extraction across browser providers
Provider Selection
function get_browser_provider() {
// 1. Check environment first
if (is_antigravity_environment()) {
return "antigravity" // Use native browser agent
}
// 2. Fall back to config
config = Read("km-config.json")
return config?.browser?.provider || "playwright"
}
function is_antigravity_environment() {
// Antigravity provides built-in browser capabilities
// Check if running inside Antigravity IDE
return typeof antigravity !== 'undefined' ||
process.env.ANTIGRAVITY_SESSION ||
file_exists("~/.gemini/antigravity/")
}
Provider Comparison
| Feature | Antigravity Native | Playwright | Hyperbrowser |
|---|---|---|---|
| Setup required | None (built-in) | MCP server | MCP + API key |
| Simple scraping | Natural language | navigate → snapshot |
scrape_webpage |
| Stealth mode | Built-in | Not supported | useStealth: true |
| Social media | Excellent | May be blocked | Good |
| Cost | Free (with Antigravity) | Free | API key required |
| Authentication | Session-aware | Limited | Profile support |
Unified Scraping Function
function scrape_url(url, options = {}) {
provider = get_browser_provider()
switch (provider) {
case "antigravity":
// Antigravity has built-in browser agent
// Simply ask it to fetch and analyze the page
return antigravity_browser_fetch(url, options)
case "hyperbrowser":
return mcp__hyperbrowser__scrape_webpage({
url: url,
outputFormat: ["markdown"],
sessionOptions: {
useStealth: options.stealth || false
}
})
case "playwright":
default:
mcp__playwright__browser_navigate({ url: url })
mcp__playwright__browser_wait_for({ time: 3 })
return mcp__playwright__browser_snapshot()
}
}
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.
- 3d ago First seen · 168 lines · 21 tokens per session scan A 6562730de4af
km-browser-abstraction is a skill published in the GitHub repository treylom/knowledge-manager (230 stars, last pushed yesterday), licensed MIT. It adds 21 tokens to every session and 997 once invoked, about $0.0001 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-09-01.
Other skills, from other repositories
v8-jit
V8 JIT optimization patterns for writing high-performance JavaScript in Next.js server internals. Use when writing or reviewing hot-path code in app-render, stream-utils, routing, caching, or any per-request code path. Covers hidden classes / shapes, monomorphic call sites, inline caches, megamorphic deopt, closure…
use-agent-browser-for-airi
Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…
opencli-sitemap-author
Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.
debug-optimize-lcp
Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
interactive-login
How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.