vscode-visual-regression

vscode-visual-regression is a skill for Claude Code, Codex from Kilo-Org/kilocode. It costs 25 tokens per session (3,079 once invoked), scanned A, original, MIT.

A testing guide for checking whether the Kilo VS Code extension’s webview looks correct. Storybook shows UI scenarios, and Playwright takes screenshots and compares them with saved baseline images.

In plain words
What is it for?
Use it to add Storybook stories for webview components in packages/kilo-vscode and create screenshot-based visual regression tests.
Why use it?
It catches accidental visual changes in the extension without requiring you to write a separate browser test for every story.

Skill for Claude CodeCodex

About the project

Kilo Code is an open-source AI coding agent that works inside VS Code and JetBrains, from the command line, or through cloud services. Developers use it to build software with AI models, switch between providers, and run cloud agents or automated code reviews. The catalogue includes eleven skills, eight agents, and one instruction for Kilo Code.

Kilo-Org/kilocode · 27,179 stars · on GitHub

Install

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.

agentmods
npx agentmods add skills/kilo-org/kilocode/vscode-visual-regression
Any agent
npx skills add Kilo-Org/kilocode --skill vscode-visual-regression
Clone the repo
git clone --depth 1 https://github.com/Kilo-Org/kilocode

Made for: Claude Code, Codex.

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 vscode-visual-regression

README.md
[![agentmods](https://agentmods.dev/badge/skills/kilo-org/kilocode/vscode-visual-regression.svg)](https://agentmods.dev/skills/kilo-org/kilocode/vscode-visual-regression)
Your own site
<a href="https://agentmods.dev/skills/kilo-org/kilocode/vscode-visual-regression"><img src="https://agentmods.dev/badge/skills/kilo-org/kilocode/vscode-visual-regression.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,079 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00025 $0.03079
Opus 5 $0.00013 $0.01540
Sonnet 5 $0.00005 $0.00616
Haiku 4.5 $0.00003 $0.00308

Measured 5d ago against content hash e9daf2235326, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

vscode-visual-regression 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 5d 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.

.kilocode/skills/vscode-visual-regression/SKILL.md · 328 lines

How it starts

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

Use this skill when the user asks you to add visual regression tests, screenshot tests, or Storybook stories for components in packages/kilo-vscode/.

Architecture

The VS Code extension uses Storybook + Playwright for visual regression testing:

  1. Storybook stories define UI scenarios using SolidJS components with mock contexts
  2. Playwright auto-discovers all stories, renders each in headless Chromium, and compares screenshots against baseline PNGs using toHaveScreenshot()
  3. Baselines are Linux-only Chromium PNGs stored in tests/visual-regression.spec.ts-snapshots/ (tracked via Git LFS)

The test runner at tests/visual-regression.spec.ts is fully automatic — it fetches ALL stories from the Storybook index and creates one Playwright test per story. You do NOT write Playwright test code. You only write stories.

How to add a visual regression test

Step 1: Decide which story file to use

Stories live in packages/kilo-vscode/webview-ui/src/stories/. Existing files and their scope:

File Components covered
agent-manager.stories.tsx FileTree, DiffPanel, FullScreenDiffView, WorktreeItem
chat.stories.tsx ChatView, QuestionDock
composite.stories.tsx AssistantMessage with tool cards, permissions, questions
prompt-input.stories.tsx PromptInput (sidebar prompt bar)
settings.stories.tsx Settings panel, ProvidersTab
history.stories.tsx SessionList
shared.stories.tsx ModelSelector and shared controls

Add to an existing file if the component fits. Create a new file only for a genuinely new component area.

Step 2: Write the story

Every story file follows this exact structure:

/** @jsxImportSource solid-js */
/**
 * Stories for [ComponentName].
 */

import type { Meta, StoryObj } from "storybook-solidjs-vite"
import { StoryProviders } from "./StoryProviders"
// Import the component(s) under test
import { MyComponent } from "../components/path/MyComponent"

const meta: Meta = {
  title: "MyCategory", // Becomes the snapshot subdirectory name (lowercased)
  parameters: { layout: "padded" }, // or "fullscreen"
}
export default meta
type Story = StoryObj

export const MyStoryName: Story = {
  name: "MyComponent — description of variant",
  render: () => (
    <StoryProviders>
      <div style={{ "max-height": "400px", overflow: "auto" }}>
        <MyComponent someProp="value" />
      </div>
    </StoryProviders>
  ),
}

Read the full file on GitHub · 328 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. 5d ago First seen · 328 lines · 25 tokens per session scan A e9daf2235326

Subscribe to this mod's changes

vscode-visual-regression is a skill published in the GitHub repository Kilo-Org/kilocode (27,179 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 3,079 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-08-30.

Related

Other skills, from other repositories

e2e-testing

E2E test authoring for Backseat Driver. Use when: writing, modifying, or debugging e2e tests under e2e-test-ws/, adding new MCP test scenarios, investigating test failures, understanding test infrastructure, or working with files matching test.cljs in the e2e workspace.

BetterThanTomorrow/calva-backseat-driver · 66 tokens

azure-microsoft-playwright-testing-ts

Run Playwright tests at scale using Azure Playwright Workspaces (formerly Microsoft Playwright Testing). Use when scaling browser tests across cloud-hosted browsers, integrating with CI/CD pipeline...

rootcastleco/rei-skills · 44 tokens

webapp-testing

Test local web applications using Playwright with server lifecycle management, browser automation, and visual verification. Use for frontend testing, debugging UI, capturing screenshots, and viewing browser logs.

yunseo-kim/agent-toolbox · 39 tokens

javascript-testing-patterns

Implement comprehensive testing strategies using Jest, Vitest, and Testing Library for unit tests, integration tests, and end-to-end testing with mocking, fixtures, and test-driven development. Use when writing JavaScript/TypeScript tests, setting up test infrastructure, or implementing TDD/BDD workflows.

yunseo-kim/agent-toolbox · 63 tokens

openspec-verify-change

Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.

wangjs-jacky/quick-ai · 32 tokens

openspec-onboard

Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.

wangjs-jacky/quick-ai · 26 tokens