agentleFS
iagogfeiagogfe/excalidraw-icons-mcp/CLAUDE.md

excalidraw-icons-mcp

CLAUDE.md32 starsChanged 3 months agoMITView on GitHub

MCP server for Excalidraw with vendor-icon search (AWS/Azure/GCP/OCI/Kubernetes), plus a canvas server the MCP talks to over HTTP. TypeScript, Node >= 20, npm. Public repository, MIT. - Install: npm ci - Type check: npm run type-check - Build: npm run build (frontend via Vite, server via tsc) - Run locally: npm run canvas then point an MCP client at dist/index.js - Tests: the test:* scripts are standalone probes (scripts/*.mjs), not a suite. There is no npm test yet — adding…

The file

We split this CLAUDE.md into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run locally: npm run canvas then point an MCP client at dist/index.js

    line 10
  2. Distinctive:

    Prefer names that return <5 grep hits in the codebase.

    line 62
  3. Distinctive:

    No code duplication. Extract shared logic into a function/module.

    line 66
  4. Distinctive:

    Keep your own comments. Don't strip them on refactor — they carry intent and provenance.

    line 77
  5. Very specific:

    Write WHY, not WHAT. Skip // increment counter above i++.

    line 79
  6. Distinctive:

    Every new function gets a test.

    line 87
  7. Very specific:

    Follow the framework's convention (Rails, Django, Next.js, etc.).

    line 100
  8. Distinctive:

    Prefer small focused modules over god files.

    line 101
  9. Very specific:

    Use the language default formatter (cargo fmt, gofmt, prettier, black, rubocop -A).

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

excalidraw-icons-mcp

MCP server for Excalidraw with vendor-icon search (AWS/Azure/GCP/OCI/Kubernetes), plus a canvas server the MCP talks to over HTTP. TypeScript, Node >= 20, npm. Public repository, MIT.

  • Install: npm ci
  • Type check: npm run type-check
  • Build: npm run build (frontend via Vite, server via tsc)
  • Run locally: npm run canvas then point an MCP client at dist/index.js
  • Tests: the test:* scripts are standalone probes (scripts/*.mjs), not a suite. There is no npm test yet — adding one is the single highest-value change to this repo's CI.
  • Linter: none. The style gate is the only automated style check.

Distribution is by container image (ghcr.io/iagogfe/excalidraw-icons-mcp and -canvas) and by cloning. The npm package name is reserved in package.json but has never been published.

CI

Four workflows, all self-contained. The style gate is vendored under .github/actions/gate-estilo, and changes to it have to be carried across by hand when the shared implementation changes.

  • ci.yml — build matrix (Node 20/22/24), testes determinísticos, E2E Playwright e style gate
  • security.yml — Gitleaks, osv-scanner, Semgrep, CodeQL
  • docker.yml — Hadolint, build, Trivy, publish to ghcr.io
  • scorecard.yml — OpenSSF Scorecard (public repositories only)

Actions are pinned by full SHA with the version in a trailing comment; tags are mutable and were the vector of the tj-actions and trivy-action attacks. Dependabot bumps both together.

Conventions

Rules tagged [gate] are measured on every PR by .github/actions/gate-estilo, which compares this branch against the base and fails if the count got worse. Old debt never blocks — only what the PR adds. Where the gate threshold differs from the rule, the rule is the target and the threshold is the point where you get interrupted. To exclude vendored or generated code, list the globs in a .gate-estilo-ignore file at the root; this repo does not need one today.

On a pull request from a fork the token is read-only, so the gate cannot post its comment. It still runs and still fails — the table goes to the job summary.

The CI runs test:ci on Node 22 and test:e2e:ci with Chromium. The individual test:* scripts remain useful for local feedback, while the style gate covers the repository-wide heuristics described below. Comments, dependency design and structure still depend on review rather than an automated rule.

Code style

  • Functions: 4-20 lines. Split if longer. [gate] — counted above 60 NLOC. The gate measures NLOC, not physical lines, so comments never make a function "long".
  • Files: under 500 lines. Split by responsibility. [gate]
  • One thing per function, one responsibility per module (SRP).
  • Names: specific and unique. Avoid data, handler, Manager. [gate] — those three names are counted where they are declared, not where used. Prefer names that return <5 grep hits in the codebase.
  • Types: explicit. No any, no Dict, no untyped functions. [gate] — the gate counts lines containing any, @ts-ignore or @ts-expect-error. Lines, not occurrences: function f(x: any): any counts once.
  • No code duplication. Extract shared logic into a function/module. [gate, informational] — reported, never blocking: near-identical and identical blocks are hard to tell apart, and the wrong abstraction costs more than the duplication.
  • Early returns over nested ifs. Max 2 levels of indentation. [gate] — approximated by cyclomatic complexity above 10, which is the closest thing a parser can measure.
  • Exception messages must include the offending value and expected shape.

Comments

  • Keep your own comments. Don't strip them on refactor — they carry intent and provenance.
  • Write WHY, not WHAT. Skip // increment counter above i++.
  • Docstrings on public functions: intent + one usage example.
  • Reference issue numbers / commit SHAs when a line exists because of a specific bug or upstream constraint.

Tests

  • Tests run with a single command: see the header of this file.
  • Every new function gets a test. Bug fixes get a regression test.
  • Mock external I/O (API, DB, filesystem) with named fake classes, not inline stubs.
  • Tests must be F.I.R.S.T: fast, independent, repeatable, self-validating, timely.

Dependencies

  • Inject dependencies through constructor/parameter, not global/import.
  • Wrap third-party libs behind a thin interface owned by this project.

Structure

  • Follow the framework's convention (Rails, Django, Next.js, etc.).
  • Prefer small focused modules over god files.
  • Predictable paths: controller/model/view, src/lib/test, etc.

Formatting

  • Use the language default formatter (cargo fmt, gofmt, prettier, black, rubocop -A). Don't discuss style beyond that.

Logging

  • Structured JSON when logging for debugging / observability.
  • Plain text only for user-facing CLI output. [gate] — console.log outside the CLI directories is counted.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.