Agent Skill
2/7/2026

issue-grooming

Use when a GitHub issue needs grooming into an implementation-ready spec with dependencies, tests, and acceptance criteria.

A
anand
1GitHub Stars
2Views
npx skills add anand-testcompare/sketchi

SKILL.md

Nameissue-grooming
DescriptionUse when a GitHub issue needs grooming into an implementation-ready spec with dependencies, tests, and acceptance criteria.

Sketchi

<p align="center"> <img src="apps/web/public/icons/logo.svg" alt="Sketchi" width="120" height="120" /> </p> <!-- Core Stack -->

Next.js React TypeScript Zod Convex Tailwind CSS

<!-- Tooling -->

Turborepo Better T Stack Bun Biome OpenCode DuckDB

<!-- AI Stack -->

Vercel AI SDK OpenRouter

<!-- Drawing Libraries -->

Excalidraw svg2roughjs dagre

<!-- Testing & CI/CD -->

Stagehand Browserbase Venom Playwright Vitest GitHub Actions

<!-- Deployment & License -->

Deployed on Vercel MIT License


What is Sketchi?

Sketchi is a diagram and icon library toolkit that transforms SVGs into hand-drawn Excalidraw assets. Build icon libraries, generate AI-powered diagrams, and export production-ready .excalidrawlib files.

Key Features:

  • Icon Library Generator - Upload SVGs, customize styles, export as Excalidraw libraries
  • AI Diagram Generation - Convert natural language to flowcharts, architecture diagrams, and more
  • Hand-drawn Rendering - Apply sketchy, hand-drawn aesthetics to any SVG
  • Real-time Collaboration - Powered by Convex for instant sync

Live at: https://sketchi.app/


Screenshots

<p align="center"> <img src="docs/screenshots/home.png" alt="Sketchi Home" width="800" /> <br /> <em>Home - Tool selection dashboard</em> </p> <p align="center"> <img src="docs/screenshots/library-generator.png" alt="Icon Library Generator" width="800" /> <br /> <em>Icon Library Generator - Build and export Excalidraw libraries</em> </p> <p align="center"> <img src="docs/screenshots/web-based-inline-generator-god-hates-js.png" alt="AI Diagram Generator" width="800" /> <br /> <em>AI Diagram Generator - Convert natural language to flowcharts and diagrams</em> </p>

Table of Contents


Architecture

<p align="center"> <img src="docs/screenshots/architecture.png" alt="Sketchi Architecture" width="800" /> <br /> <em>Architecture - System design and data flow</em> </p>

Monorepo Structure:

DirectoryPurpose
apps/webNext.js 16 frontend with React 19
packages/backendConvex functions, actions, and database schema
packages/envShared environment variable validation
packages/configShared TypeScript configuration
tests/e2eEnd-to-end tests with Stagehand

Data Flow:

  1. User interacts with the Next.js frontend
  2. Frontend calls Convex functions via React hooks (useQuery, useMutation)
  3. Convex functions handle business logic, AI calls, and database operations
  4. File uploads stored in Convex storage, metadata in Convex database
  5. AI diagram generation uses Vercel AI SDK through Convex actions

Model Strategy

Sketchi uses a multi-model approach via OpenRouter to balance reasoning, vision, and latency.

RoleModelPrimary Use Case
Braingoogle/gemini-3-flash-previewDiagram generation, structural analysis, and visual grading.
Drivergoogle/gemini-2.5-flash-liteE2E test execution (Stagehand) and UI interaction.
Experimentalgoogle/gemini-3.1-flash-lite-previewLow-latency validation, JSON repair, and classification.
Fallbackz-ai/glm-4.7High-reliability secondary model for diagram retries.

Features

Icon Library Generator

  • SVG Upload - Drag and drop or select multiple SVG files
  • Style Customization - Adjust stroke color, fill style, roughness, and opacity
  • Hand-drawn Conversion - Transform clean SVGs into sketchy, hand-drawn versions
  • Excalidraw Export - Download as .excalidrawlib for direct import

AI Diagram Generation

  • Natural Language Input - Describe your diagram in plain English
  • Multiple Chart Types - Flowcharts, architecture diagrams, decision trees
  • Intermediate Format - Structured JSON representation for predictable layouts
  • Auto Layout - Dagre-based automatic node positioning

Export Options

  • PNG Export - High-resolution PNG via Browserbase rendering
  • Excalidraw Library - Reusable icon sets for Excalidraw
  • Share Links - Generate shareable Excalidraw links

Quick Start

Prerequisites

Installation

# Clone the repository
git clone https://github.com/anand-testcompare/sketchi.git
cd sketchi

# Install dependencies
bun install

# Set up Convex (follow prompts to create/link project)
bun run dev:setup

# Start development servers
bun run dev

The app will be available at http://localhost:3001.

Environment Variables

Create .env.local in apps/web/:

NEXT_PUBLIC_CONVEX_URL=<your-convex-deployment-url>

For AI features and testing, see .env.e2e.example for additional variables.


OpenCode Plugin

The publishable OpenCode plugin package lives under packages/opencode-excalidraw and is published to npm as @sketchi-app/opencode-excalidraw.

Notes:

  • Install Playwright browsers once per machine:
    • npx playwright install
  • Override API base with SKETCHI_API_URL.
  • Tools exposed: diagram_from_prompt, diagram_tweak, diagram_restructure, diagram_to_png, diagram_grade.
  • Publish channels: next is used for pre-release iteration testing; latest publishes when the plugin release PR is merged.
  • Install and use from any repo:
npm i @sketchi-app/opencode-excalidraw
  • Add to opencode.json:
{
  "plugin": ["@sketchi-app/opencode-excalidraw"]
}

Development

Commands

CommandDescription
bun run devStart all apps (frontend + Convex)
bun run dev:webStart frontend only
bun run dev:serverStart Convex backend only
bun run buildBuild all apps
bun run check-typesTypeScript type checking
bun x ultracite fixFormat code with Biome
bun x ultracite checkLint check with Biome

Code Quality

This project uses Ultracite (Biome preset) for formatting and linting:

# Format and fix issues
bun x ultracite fix

# Check for issues
bun x ultracite check

Testing

Sketchi follows a test hierarchy: API tests > E2E tests > unit tests (last resort).

API Tests (Convex Functions)

Located in packages/backend/convex/*.test.ts. Uses Vitest + convex-test.

# Run all Convex tests
cd packages/backend
bun run test

# Watch mode
bun run test:watch

# Generate report
bun run test:report

Test files:

  • visualGrading.test.ts - Vision-based diagram grading
  • export.test.ts - PNG export via Browserbase
  • diagramGenerateFromIntermediate.test.ts - Diagram rendering
  • diagramLayout.test.ts - Auto-layout algorithms
  • arrowOptimization.test.ts - Arrow path optimization

E2E Tests (Stagehand + Playwright)

Located in tests/e2e/. Uses Stagehand 3 with LLM-based visual grading.

# Set up environment
cp tests/e2e/.env.example tests/e2e/.env.e2e
# Fill in OPENROUTER_API_KEY, BROWSERBASE_API_KEY, etc.

# Run scenario
cd tests/e2e
bun run visual-sanity

Scenarios:

  • visual-sanity.ts - Visual sweep across light/dark modes
  • icon-library-generator-happy-path.ts - Full user flow test

CI/CD

  • Backend tests: Run on every PR via GitHub Actions
  • E2E tests: Run against preview deployments
  • Reports: Uploaded as artifacts to GitHub

Project Structure

sketchi/
├── apps/
│   └── web/                    # Next.js 16 frontend
│       ├── src/
│       │   ├── app/            # App Router pages
│       │   ├── components/     # React components
│       │   └── lib/            # Utilities
│       └── public/             # Static assets
├── packages/
│   ├── backend/                # Convex backend
│   │   ├── convex/             # Functions, schema, tests
│   │   └── lib/                # Shared utilities
│   ├── config/                 # Shared TypeScript config
│   └── env/                    # Environment validation
├── tests/
│   └── e2e/                    # Stagehand E2E tests
├── docs/                       # Documentation
├── turbo.json                  # Turborepo config
└── package.json                # Root workspace config

License

MIT License - see LICENSE for details.

Copyright (c) 2026 Anand Pant | shpit.dev/contact

Skills Info
Original Name:issue-groomingAuthor:anand