domscribe CLAUDE.md

Repository instructions for Domscribe, a tool that lets developers select elements in a running web app and connect their live details to the matching source code for an AI coding agent. They also define the project's TypeScript, module, package, and dependency rules.

In plain words
What is it for?
Use them to develop Domscribe, inspect how its packages connect, add features, and run the project with pnpm.
Why use it?
They reduce guesswork when changing a multi-package web tool and help keep its schemas, imports, and package boundaries consistent.

Instructions file

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 instructions/patchorbit/domscribe/claude-md
Clone the repo
git clone --depth 1 https://github.com/patchorbit/domscribe
Per session 1,823 This file is loaded in full into every session.
When invoked 1,823 The same file — it is already loaded in full.
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.01823 $0.01823
Opus 5 $0.00911 $0.00911
Sonnet 5 $0.00365 $0.00365
Haiku 4.5 $0.00182 $0.00182

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

Security

Grade A, and why

domscribe CLAUDE.md 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 2d 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.md · 153 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. Detailed conventions, testing patterns, and architecture decisions are in .claude/rules/.

What is Domscribe?

Domscribe is a pixel-to-code development tool that lets developers click elements in running web apps, captures runtime context (props, state, events), and maps them to exact source locations for handoff to coding agents via MCP.

How to Work on This Codebase

Read before writing. Understand the existing patterns in a package before adding code. Match the style of what's already there.

Core principles:

  • Schema-first — Define Zod schemas, derive types with z.infer<>. Never hand-write interfaces that duplicate schema shapes.
  • Named exports only — No default exports. Barrel index.ts files define the public API.
  • Module boundaries are enforced — Check tags in project.json before adding cross-package imports. If the boundary disallows it, rethink the design — don't just add a tag.
  • ESM with .js extensions — All imports use .js extension (compiled output). Module system is nodenext.
  • Constructor DI — Dependencies injected via private readonly constructor params. No service locators or global containers.

Testing:

  • Unit tests mock dependencies. Use vi.mock() and vi.fn(). Constructor DI makes this clean.
  • Don't spy on globals (console, etc.) — test behavior, not log output.
  • Test-fixtures is the black-box layer — integration/e2e tests there have zero @domscribe/* imports. They build real apps and validate outputs.
  • Relay is the exception — its unit tests use real services with temp directories (integration-style).

Don't over-engineer. Match the complexity of existing code. No premature abstractions, no speculative features, no redundant tests.

Commands

# Install dependencies (pnpm, NOT npm)
pnpm install

# Build, lint, and test all packages (excludes test-fixtures)
pnpm build:all

# Build only affected packages
pnpm build:affected

# Single package operations
nx build domscribe-core
nx test domscribe-core
nx lint domscribe-core
nx typecheck domscribe-core

# Run specific tests
nx test domscribe-core -- --testPathPattern=annotation
nx test domscribe-core -- -t "test name"

# Integration tests (test-fixtures package)
nx integration domscribe-test-fixtures

# E2E tests (requires Verdaccio + published packages)
nx e2e domscribe-test-fixtures
# Skip env vars: SKIP_SETUP=1, SKIP_PUBLISH=1, SKIP_INSTALL=1

# Local registry pipeline
pnpm release:local          # build → version → sync-dist → publish to Verdaccio
pnpm pipeline:full           # publish → install fixtures → integration + e2e
pnpm pipeline:e2e            # publish → install fixtures → e2e only

# Verdaccio (local npm registry on port 4873)
npx verdaccio --config .verdaccio/config.yml --listen 4873

Read the full file on GitHub · 153 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. 2d ago First seen · 153 lines · 1,823 tokens per session scan A bc9def09dd3c

Subscribe to this mod's changes

domscribe CLAUDE.md is an instructions file published in the GitHub repository patchorbit/domscribe (187 stars, last pushed 23d ago), licensed MIT. It adds 1,823 tokens to every session, about $0.0091 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.