{"owner":"mapbox","repo":"mapbox-gl-js","hasSkills":true,"totalSkillsCount":6,"totalTokensCount":2529,"categories":["gemini-rule","root-instruction","claude-rule","mcp-config","marketplace","plugin-manifest"],"hasMcp":true,"mcpConfig":{"mcpServers":{"mapbox-gl-js":{"command":"npx","args":["-y","@modelcontextprotocol/server-mapbox-gl-js"]}}},"found":["GEMINI.md","AGENTS.md","CLAUDE.md",".cursor/mcp.json",".claude-plugin/marketplace.json",".claude-plugin/plugin.json"],"skills":{"GEMINI.md":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n","AGENTS.md":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n","CLAUDE.md":"# CLAUDE.md\n\n## Project Overview\n\nMapbox GL JS is a JavaScript library for interactive, customizable vector maps on the web. It uses WebGL to render vector tiles that conform to the Mapbox Vector Tile Specification.\n\n## Workflow\n- Keep changes minimal and fully justified\n- Always inspect a referenced file before explaining or fixing it\n- Understand WHY code exists before changing it — GL JS has many browser quirks, performance hacks, and WebGL subtleties; check git blame when in doubt\n- No abstractions or helpers until you see repetition, and only if cleaner than the duplication\n- Always run `npm run tsc` and `npm run lint` when you're done making a series of code changes\n- Run `npm run codegen` if you modify style properties or the style specification\n- Run `npm run test-typings` after modifying public API types or the style specification\n- Prefer running single tests, and avoid running the whole test suite, for performance\n- Never add any dependencies unless explicitly requested\n\n## Essential Commands\n\n### Development\n\n```bash\nnpm start\nnpm run build-esm-dev\nnpm run build-esm-prod\nnpm run build-prod # UMD build\nnpm run build-css\nnpm run codegen\n```\n\n### Testing\n\n```bash\nnpm run test-unit\nnpm run test-unit -- test/unit/style-spec/spec.test.ts -t 'Style#addImage'\n\nnpm run test-render -- -t \"background-color\"\n# Regenerate expected.png baselines (inspect diffs before committing!)\nUPDATE=true npm run test-render -- -t \"<pattern>\"\n\nnpm run test-typings\n```\n\nRender tests:\n- Test name = folder path under `test/integration/render-tests/` (e.g. `circle-radius/literal`). `-t` matches substrings — use a trailing slash to narrow: `-t \"circle-radius/\"` not `-t \"circle\"` (also hits `circle-color`, `circle-blur`, etc.)\n- Always use `npm run test-render`, not `npx vitest` — the `pretest-render` hook rebuilds the ESM dev bundle (`dist/esm-dev/`)\n- Inspect diffs: `open test/integration/render-tests/render-tests.html`\n- Platform-specific failures → `metadata.test.skip-test` rules in the test's `style.json` (matched by `platform-tag-contains`), with the issue in `metadata.test.tickets`; see `test/integration/README.md`\n\n### Code Quality\n\n```bash\nnpm run tsc\nnpm run lint\nnpm run lint-css\n```\n\n## Architecture Overview\n\nTile parsing and layout run in Web Workers; rendering runs on the main thread. `Map` is the top-level handle, `Style` owns layers and configuration, `SourceCache` manages tile loading/caching per source, `Transform` owns camera state and projection math, and `Painter` orchestrates WebGL rendering.\n\n1. **Tile Parsing & Layout** (Worker)\n   - `WorkerTile#parse()` decodes features and creates `Bucket` instances per style layer family\n   - Each `Bucket` holds vertex/element arrays ready for WebGL upload\n   - `ProgramConfiguration` maps style properties to shader attributes/uniforms\n   - Feature geometries are indexed in `FeatureIndex` for `queryRenderedFeatures` / `querySourceFeatures`\n\n2. **Transfer** — parsed bucket data is serialized and sent to the main thread via `src/util/web_worker_transfer.ts`\n\n3. **Symbol Placement** (Main Thread) — symbols run cross-tile collision detection after worker parsing\n\n4. **WebGL Rendering** (Main Thread)\n   - `Painter#render()` iterates layers by render pass (`Painter.renderPass`: offscreen → opaque → translucent)\n   - Layer-specific `draw*()` functions in `src/render/draw_*.ts`\n\n## Project Structure\n\n```\n3d-style/ # (mirrors src)\n\nsrc/\n├── data/\n├── geo/\n├── gl/\n├── render/\n├── shaders/\n├── source/\n├── style/\n├── style-spec/ (separate workspace)\n├── symbol/\n├── terrain/\n├── ui/\n└── util/\n\ntest/\n├── unit/\n├── integration/\n└── build/\n\ndebug/ # served by `npm start`\n```\n\n## Code Style\n\n- Prefer named exports over default exports\n- Modules export classes or functions (no namespace objects)\n- Use `assert` for invariants\n- Use `import type` for type-only imports\n- No TODO/FIXME comments in committed code\n\n## TypeScript\n\n- Configured with `strict: false`, but write code as if strict — no `any`, handle all `null`/`undefined`, use proper type annotations\n- Prefer explicit return types over `// @ts-expect-error` suppressions for functions that may not return a value\n- Prefer literal unions over boolean flags; allows future extension without breaking changes\n\n## Testing Guidelines\n\n### Integration Tests\n\n- Any PR that changes rendering behavior (shader changes, draw function logic, bucket data changes) must include a render test in `test/integration/render-tests/`\n- For query behavior changes, add corresponding query tests covering all affected layer types\n- Render tests for bug fixes must fail without the fix; a tolerance loose enough to pass either way is useless\n- Every render test `style.json` must start with a `description` field explaining what it checks\n- Keep render tests minimal: omit anything that can be dropped, e.g. unused `wait` steps (including a trailing one), empty feature `properties`, empty `layout` objects, or `pixelRatio` when the test doesn't need it\n- Don't inflate render test tolerance to make a failing test pass — investigate the root cause\n- Size render test expected images to the minimum needed (e.g., 32×64, not 128×128)\n\n### Unit Tests\n\n- No shared variables between test cases\n- Don't mock internal domain objects (Style, Map, Transform, Dispatcher)\n- One return value or side effect per test - pull shared logic into functions\n- Only test return values and global side effects - not internal behavior or method calls\n- No network requests - use `mockFetch` from `test/util/network.ts` if needed\n\n## Documentation Conventions\n\n- All public API must have JSDoc comments; private items tagged with `@private`\n- Style-spec `doc` fields in `v8.json` are public — use unambiguous language, avoid internal terms, and don't reference implementation details\n- When adding a new property to `v8.json`, populate the `sdk-support` table and set `experimental: true` until release version is confirmed\n\n## WebGL and Shaders\n\n- Custom `#pragma mapbox` directives in shaders expand to uniforms or attributes based on style properties\n- Use named `#define` constants for integer mode values in shaders — never bare magic numbers like `if (u_blend_mode == 1)`\n- Use `#if defined(A) && defined(B)` for compound shader conditionals (not `#ifdef`); required for the Metal preprocessing pipeline\n- See [src/shaders/README.md](src/shaders/README.md) for shader documentation\n\n## Performance\n\n- Allocate GPU objects (buffers, textures, bind groups, UBOs) at bucket creation or style load time; invalidate only when underlying data changes. **Never allocate GPU objects inside draw functions that run every frame.**\n- In hot paths, prefer flat typed arrays (`Float32Array`, `Uint16Array`) over arrays of objects or nested arrays\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.claude-plugin/plugin.json)"},"files":{"GEMINI.md":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n","AGENTS.md":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n","CLAUDE.md":"# CLAUDE.md\n\n## Project Overview\n\nMapbox GL JS is a JavaScript library for interactive, customizable vector maps on the web. It uses WebGL to render vector tiles that conform to the Mapbox Vector Tile Specification.\n\n## Workflow\n- Keep changes minimal and fully justified\n- Always inspect a referenced file before explaining or fixing it\n- Understand WHY code exists before changing it — GL JS has many browser quirks, performance hacks, and WebGL subtleties; check git blame when in doubt\n- No abstractions or helpers until you see repetition, and only if cleaner than the duplication\n- Always run `npm run tsc` and `npm run lint` when you're done making a series of code changes\n- Run `npm run codegen` if you modify style properties or the style specification\n- Run `npm run test-typings` after modifying public API types or the style specification\n- Prefer running single tests, and avoid running the whole test suite, for performance\n- Never add any dependencies unless explicitly requested\n\n## Essential Commands\n\n### Development\n\n```bash\nnpm start\nnpm run build-esm-dev\nnpm run build-esm-prod\nnpm run build-prod # UMD build\nnpm run build-css\nnpm run codegen\n```\n\n### Testing\n\n```bash\nnpm run test-unit\nnpm run test-unit -- test/unit/style-spec/spec.test.ts -t 'Style#addImage'\n\nnpm run test-render -- -t \"background-color\"\n# Regenerate expected.png baselines (inspect diffs before committing!)\nUPDATE=true npm run test-render -- -t \"<pattern>\"\n\nnpm run test-typings\n```\n\nRender tests:\n- Test name = folder path under `test/integration/render-tests/` (e.g. `circle-radius/literal`). `-t` matches substrings — use a trailing slash to narrow: `-t \"circle-radius/\"` not `-t \"circle\"` (also hits `circle-color`, `circle-blur`, etc.)\n- Always use `npm run test-render`, not `npx vitest` — the `pretest-render` hook rebuilds the ESM dev bundle (`dist/esm-dev/`)\n- Inspect diffs: `open test/integration/render-tests/render-tests.html`\n- Platform-specific failures → `metadata.test.skip-test` rules in the test's `style.json` (matched by `platform-tag-contains`), with the issue in `metadata.test.tickets`; see `test/integration/README.md`\n\n### Code Quality\n\n```bash\nnpm run tsc\nnpm run lint\nnpm run lint-css\n```\n\n## Architecture Overview\n\nTile parsing and layout run in Web Workers; rendering runs on the main thread. `Map` is the top-level handle, `Style` owns layers and configuration, `SourceCache` manages tile loading/caching per source, `Transform` owns camera state and projection math, and `Painter` orchestrates WebGL rendering.\n\n1. **Tile Parsing & Layout** (Worker)\n   - `WorkerTile#parse()` decodes features and creates `Bucket` instances per style layer family\n   - Each `Bucket` holds vertex/element arrays ready for WebGL upload\n   - `ProgramConfiguration` maps style properties to shader attributes/uniforms\n   - Feature geometries are indexed in `FeatureIndex` for `queryRenderedFeatures` / `querySourceFeatures`\n\n2. **Transfer** — parsed bucket data is serialized and sent to the main thread via `src/util/web_worker_transfer.ts`\n\n3. **Symbol Placement** (Main Thread) — symbols run cross-tile collision detection after worker parsing\n\n4. **WebGL Rendering** (Main Thread)\n   - `Painter#render()` iterates layers by render pass (`Painter.renderPass`: offscreen → opaque → translucent)\n   - Layer-specific `draw*()` functions in `src/render/draw_*.ts`\n\n## Project Structure\n\n```\n3d-style/ # (mirrors src)\n\nsrc/\n├── data/\n├── geo/\n├── gl/\n├── render/\n├── shaders/\n├── source/\n├── style/\n├── style-spec/ (separate workspace)\n├── symbol/\n├── terrain/\n├── ui/\n└── util/\n\ntest/\n├── unit/\n├── integration/\n└── build/\n\ndebug/ # served by `npm start`\n```\n\n## Code Style\n\n- Prefer named exports over default exports\n- Modules export classes or functions (no namespace objects)\n- Use `assert` for invariants\n- Use `import type` for type-only imports\n- No TODO/FIXME comments in committed code\n\n## TypeScript\n\n- Configured with `strict: false`, but write code as if strict — no `any`, handle all `null`/`undefined`, use proper type annotations\n- Prefer explicit return types over `// @ts-expect-error` suppressions for functions that may not return a value\n- Prefer literal unions over boolean flags; allows future extension without breaking changes\n\n## Testing Guidelines\n\n### Integration Tests\n\n- Any PR that changes rendering behavior (shader changes, draw function logic, bucket data changes) must include a render test in `test/integration/render-tests/`\n- For query behavior changes, add corresponding query tests covering all affected layer types\n- Render tests for bug fixes must fail without the fix; a tolerance loose enough to pass either way is useless\n- Every render test `style.json` must start with a `description` field explaining what it checks\n- Keep render tests minimal: omit anything that can be dropped, e.g. unused `wait` steps (including a trailing one), empty feature `properties`, empty `layout` objects, or `pixelRatio` when the test doesn't need it\n- Don't inflate render test tolerance to make a failing test pass — investigate the root cause\n- Size render test expected images to the minimum needed (e.g., 32×64, not 128×128)\n\n### Unit Tests\n\n- No shared variables between test cases\n- Don't mock internal domain objects (Style, Map, Transform, Dispatcher)\n- One return value or side effect per test - pull shared logic into functions\n- Only test return values and global side effects - not internal behavior or method calls\n- No network requests - use `mockFetch` from `test/util/network.ts` if needed\n\n## Documentation Conventions\n\n- All public API must have JSDoc comments; private items tagged with `@private`\n- Style-spec `doc` fields in `v8.json` are public — use unambiguous language, avoid internal terms, and don't reference implementation details\n- When adding a new property to `v8.json`, populate the `sdk-support` table and set `experimental: true` until release version is confirmed\n\n## WebGL and Shaders\n\n- Custom `#pragma mapbox` directives in shaders expand to uniforms or attributes based on style properties\n- Use named `#define` constants for integer mode values in shaders — never bare magic numbers like `if (u_blend_mode == 1)`\n- Use `#if defined(A) && defined(B)` for compound shader conditionals (not `#ifdef`); required for the Metal preprocessing pipeline\n- See [src/shaders/README.md](src/shaders/README.md) for shader documentation\n\n## Performance\n\n- Allocate GPU objects (buffers, textures, bind groups, UBOs) at bucket creation or style load time; invalidate only when underlying data changes. **Never allocate GPU objects inside draw functions that run every frame.**\n- In hot paths, prefer flat typed arrays (`Float32Array`, `Uint16Array`) over arrays of objects or nested arrays\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.claude-plugin/plugin.json)"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n","isInternal":false,"tokens":22,"sizeBytes":82},{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"# CLAUDE.md\n\n## Project Overview\n\nMapbox GL JS is a JavaScript library for interactive, customizable vector maps on the web. It uses WebGL to render vector tiles that conform to the Mapbox Vector Tile Specification.\n\n## Workflow\n- Keep changes minimal and fully justified\n- Always inspect a referenced file before explaining or fixing it\n- Understand WHY code exists before changing it — GL JS has many browser quirks, performance hacks, and WebGL subtleties; check git blame when in doubt\n- No abstractions or helpers until you see repetition, and only if cleaner than the duplication\n- Always run `npm run tsc` and `npm run lint` when you're done making a series of code changes\n- Run `npm run codegen` if you modify style properties or the style specification\n- Run `npm run test-typings` after modifying public API types or the style specification\n- Prefer running single tests, and avoid running the whole test suite, for performance\n- Never add any dependencies unless explicitly requested\n\n## Essential Commands\n\n### Development\n\n```bash\nnpm start\nnpm run build-esm-dev\nnpm run build-esm-prod\nnpm run build-prod # UMD build\nnpm run build-css\nnpm run codegen\n```\n\n### Testing\n\n```bash\nnpm run test-unit\nnpm run test-unit -- test/unit/style-spec/spec.test.ts -t 'Style#addImage'\n\nnpm run test-render -- -t \"background-color\"\n# Regenerate expected.png baselines (inspect diffs before committing!)\nUPDATE=true npm run test-render -- -t \"<pattern>\"\n\nnpm run test-typings\n```\n\nRender tests:\n- Test name = folder path under `test/integration/render-tests/` (e.g. `circle-radius/literal`). `-t` matches substrings — use a trailing slash to narrow: `-t \"circle-radius/\"` not `-t \"circle\"` (also hits `circle-color`, `circle-blur`, etc.)\n- Always use `npm run test-render`, not `npx vitest` — the `pretest-render` hook rebuilds the ESM dev bundle (`dist/esm-dev/`)\n- Inspect diffs: `open test/integration/render-tests/render-tests.html`\n- Platform-specific failures → `metadata.test.skip-test` rules in the test's `style.json` (matched by `platform-tag-contains`), with the issue in `metadata.test.tickets`; see `test/integration/README.md`\n\n### Code Quality\n\n```bash\nnpm run tsc\nnpm run lint\nnpm run lint-css\n```\n\n## Architecture Overview\n\nTile parsing and layout run in Web Workers; rendering runs on the main thread. `Map` is the top-level handle, `Style` owns layers and configuration, `SourceCache` manages tile loading/caching per source, `Transform` owns camera state and projection math, and `Painter` orchestrates WebGL rendering.\n\n1. **Tile Parsing & Layout** (Worker)\n   - `WorkerTile#parse()` decodes features and creates `Bucket` instances per style layer family\n   - Each `Bucket` holds vertex/element arrays ready for WebGL upload\n   - `ProgramConfiguration` maps style properties to shader attributes/uniforms\n   - Feature geometries are indexed in `FeatureIndex` for `queryRenderedFeatures` / `querySourceFeatures`\n\n2. **Transfer** — parsed bucket data is serialized and sent to the main thread via `src/util/web_worker_transfer.ts`\n\n3. **Symbol Placement** (Main Thread) — symbols run cross-tile collision detection after worker parsing\n\n4. **WebGL Rendering** (Main Thread)\n   - `Painter#render()` iterates layers by render pass (`Painter.renderPass`: offscreen → opaque → translucent)\n   - Layer-specific `draw*()` functions in `src/render/draw_*.ts`\n\n## Project Structure\n\n```\n3d-style/ # (mirrors src)\n\nsrc/\n├── data/\n├── geo/\n├── gl/\n├── render/\n├── shaders/\n├── source/\n├── style/\n├── style-spec/ (separate workspace)\n├── symbol/\n├── terrain/\n├── ui/\n└── util/\n\ntest/\n├── unit/\n├── integration/\n└── build/\n\ndebug/ # served by `npm start`\n```\n\n## Code Style\n\n- Prefer named exports over default exports\n- Modules export classes or functions (no namespace objects)\n- Use `assert` for invariants\n- Use `import type` for type-only imports\n- No TODO/FIXME comments in committed code\n\n## TypeScript\n\n- Configured with `strict: false`, but write code as if strict — no `any`, handle all `null`/`undefined`, use proper type annotations\n- Prefer explicit return types over `// @ts-expect-error` suppressions for functions that may not return a value\n- Prefer literal unions over boolean flags; allows future extension without breaking changes\n\n## Testing Guidelines\n\n### Integration Tests\n\n- Any PR that changes rendering behavior (shader changes, draw function logic, bucket data changes) must include a render test in `test/integration/render-tests/`\n- For query behavior changes, add corresponding query tests covering all affected layer types\n- Render tests for bug fixes must fail without the fix; a tolerance loose enough to pass either way is useless\n- Every render test `style.json` must start with a `description` field explaining what it checks\n- Keep render tests minimal: omit anything that can be dropped, e.g. unused `wait` steps (including a trailing one), empty feature `properties`, empty `layout` objects, or `pixelRatio` when the test doesn't need it\n- Don't inflate render test tolerance to make a failing test pass — investigate the root cause\n- Size render test expected images to the minimum needed (e.g., 32×64, not 128×128)\n\n### Unit Tests\n\n- No shared variables between test cases\n- Don't mock internal domain objects (Style, Map, Transform, Dispatcher)\n- One return value or side effect per test - pull shared logic into functions\n- Only test return values and global side effects - not internal behavior or method calls\n- No network requests - use `mockFetch` from `test/util/network.ts` if needed\n\n## Documentation Conventions\n\n- All public API must have JSDoc comments; private items tagged with `@private`\n- Style-spec `doc` fields in `v8.json` are public — use unambiguous language, avoid internal terms, and don't reference implementation details\n- When adding a new property to `v8.json`, populate the `sdk-support` table and set `experimental: true` until release version is confirmed\n\n## WebGL and Shaders\n\n- Custom `#pragma mapbox` directives in shaders expand to uniforms or attributes based on style properties\n- Use named `#define` constants for integer mode values in shaders — never bare magic numbers like `if (u_blend_mode == 1)`\n- Use `#if defined(A) && defined(B)` for compound shader conditionals (not `#ifdef`); required for the Metal preprocessing pipeline\n- See [src/shaders/README.md](src/shaders/README.md) for shader documentation\n\n## Performance\n\n- Allocate GPU objects (buffers, textures, bind groups, UBOs) at bucket creation or style load time; invalidate only when underlying data changes. **Never allocate GPU objects inside draw functions that run every frame.**\n- In hot paths, prefer flat typed arrays (`Float32Array`, `Uint16Array`) over arrays of objects or nested arrays\n","isInternal":false,"tokens":1585,"sizeBytes":6864},{"name":"GEMINI.md","path":"GEMINI.md","rawUrl":"https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/GEMINI.md","title":"Gemini Agent & Antigravity Instructions","category":"gemini-rule","format":"markdown","content":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n","isInternal":false,"tokens":22,"sizeBytes":82},{"name":"marketplace.json","path":".claude-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.claude-plugin/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.claude-plugin/marketplace.json)","tokens":300,"sizeBytes":198},{"name":"plugin.json","path":".claude-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.claude-plugin/plugin.json","title":"claude-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.claude-plugin/plugin.json)","tokens":300,"sizeBytes":184},{"name":"mcp.json","path":".cursor/mcp.json","rawUrl":"https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.cursor/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.cursor/mcp.json)","tokens":300,"sizeBytes":177}],"systemPromptSnippet":"<yakaai_skills repo=\"mapbox/mapbox-gl-js\">\n<!-- File: AGENTS.md (Tokens: ~22 | Category: root-instruction) -->\n# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n\n<!-- File: CLAUDE.md (Tokens: ~1585 | Category: claude-rule) -->\n# CLAUDE.md\n\n## Project Overview\n\nMapbox GL JS is a JavaScript library for interactive, customizable vector maps on the web. It uses WebGL to render vector tiles that conform to the Mapbox Vector Tile Specification.\n\n## Workflow\n- Keep changes minimal and fully justified\n- Always inspect a referenced file before explaining or fixing it\n- Understand WHY code exists before changing it — GL JS has many browser quirks, performance hacks, and WebGL subtleties; check git blame when in doubt\n- No abstractions or helpers until you see repetition, and only if cleaner than the duplication\n- Always run `npm run tsc` and `npm run lint` when you're done making a series of code changes\n- Run `npm run codegen` if you modify style properties or the style specification\n- Run `npm run test-typings` after modifying public API types or the style specification\n- Prefer running single tests, and avoid running the whole test suite, for performance\n- Never add any dependencies unless explicitly requested\n\n## Essential Commands\n\n### Development\n\n```bash\nnpm start\nnpm run build-esm-dev\nnpm run build-esm-prod\nnpm run build-prod # UMD build\nnpm run build-css\nnpm run codegen\n```\n\n### Testing\n\n```bash\nnpm run test-unit\nnpm run test-unit -- test/unit/style-spec/spec.test.ts -t 'Style#addImage'\n\nnpm run test-render -- -t \"background-color\"\n# Regenerate expected.png baselines (inspect diffs before committing!)\nUPDATE=true npm run test-render -- -t \"<pattern>\"\n\nnpm run test-typings\n```\n\nRender tests:\n- Test name = folder path under `test/integration/render-tests/` (e.g. `circle-radius/literal`). `-t` matches substrings — use a trailing slash to narrow: `-t \"circle-radius/\"` not `-t \"circle\"` (also hits `circle-color`, `circle-blur`, etc.)\n- Always use `npm run test-render`, not `npx vitest` — the `pretest-render` hook rebuilds the ESM dev bundle (`dist/esm-dev/`)\n- Inspect diffs: `open test/integration/render-tests/render-tests.html`\n- Platform-specific failures → `metadata.test.skip-test` rules in the test's `style.json` (matched by `platform-tag-contains`), with the issue in `metadata.test.tickets`; see `test/integration/README.md`\n\n### Code Quality\n\n```bash\nnpm run tsc\nnpm run lint\nnpm run lint-css\n```\n\n## Architecture Overview\n\nTile parsing and layout run in Web Workers; rendering runs on the main thread. `Map` is the top-level handle, `Style` owns layers and configuration, `SourceCache` manages tile loading/caching per source, `Transform` owns camera state and projection math, and `Painter` orchestrates WebGL rendering.\n\n1. **Tile Parsing & Layout** (Worker)\n   - `WorkerTile#parse()` decodes features and creates `Bucket` instances per style layer family\n   - Each `Bucket` holds vertex/element arrays ready for WebGL upload\n   - `ProgramConfiguration` maps style properties to shader attributes/uniforms\n   - Feature geometries are indexed in `FeatureIndex` for `queryRenderedFeatures` / `querySourceFeatures`\n\n2. **Transfer** — parsed bucket data is serialized and sent to the main thread via `src/util/web_worker_transfer.ts`\n\n3. **Symbol Placement** (Main Thread) — symbols run cross-tile collision detection after worker parsing\n\n4. **WebGL Rendering** (Main Thread)\n   - `Painter#render()` iterates layers by render pass (`Painter.renderPass`: offscreen → opaque → translucent)\n   - Layer-specific `draw*()` functions in `src/render/draw_*.ts`\n\n## Project Structure\n\n```\n3d-style/ # (mirrors src)\n\nsrc/\n├── data/\n├── geo/\n├── gl/\n├── render/\n├── shaders/\n├── source/\n├── style/\n├── style-spec/ (separate workspace)\n├── symbol/\n├── terrain/\n├── ui/\n└── util/\n\ntest/\n├── unit/\n├── integration/\n└── build/\n\ndebug/ # served by `npm start`\n```\n\n## Code Style\n\n- Prefer named exports over default exports\n- Modules export classes or functions (no namespace objects)\n- Use `assert` for invariants\n- Use `import type` for type-only imports\n- No TODO/FIXME comments in committed code\n\n## TypeScript\n\n- Configured with `strict: false`, but write code as if strict — no `any`, handle all `null`/`undefined`, use proper type annotations\n- Prefer explicit return types over `// @ts-expect-error` suppressions for functions that may not return a value\n- Prefer literal unions over boolean flags; allows future extension without breaking changes\n\n## Testing Guidelines\n\n### Integration Tests\n\n- Any PR that changes rendering behavior (shader changes, draw function logic, bucket data changes) must include a render test in `test/integration/render-tests/`\n- For query behavior changes, add corresponding query tests covering all affected layer types\n- Render tests for bug fixes must fail without the fix; a tolerance loose enough to pass either way is useless\n- Every render test `style.json` must start with a `description` field explaining what it checks\n- Keep render tests minimal: omit anything that can be dropped, e.g. unused `wait` steps (including a trailing one), empty feature `properties`, empty `layout` objects, or `pixelRatio` when the test doesn't need it\n- Don't inflate render test tolerance to make a failing test pass — investigate the root cause\n- Size render test expected images to the minimum needed (e.g., 32×64, not 128×128)\n\n### Unit Tests\n\n- No shared variables between test cases\n- Don't mock internal domain objects (Style, Map, Transform, Dispatcher)\n- One return value or side effect per test - pull shared logic into functions\n- Only test return values and global side effects - not internal behavior or method calls\n- No network requests - use `mockFetch` from `test/util/network.ts` if needed\n\n## Documentation Conventions\n\n- All public API must have JSDoc comments; private items tagged with `@private`\n- Style-spec `doc` fields in `v8.json` are public — use unambiguous language, avoid internal terms, and don't reference implementation details\n- When adding a new property to `v8.json`, populate the `sdk-support` table and set `experimental: true` until release version is confirmed\n\n## WebGL and Shaders\n\n- Custom `#pragma mapbox` directives in shaders expand to uniforms or attributes based on style properties\n- Use named `#define` constants for integer mode values in shaders — never bare magic numbers like `if (u_blend_mode == 1)`\n- Use `#if defined(A) && defined(B)` for compound shader conditionals (not `#ifdef`); required for the Metal preprocessing pipeline\n- See [src/shaders/README.md](src/shaders/README.md) for shader documentation\n\n## Performance\n\n- Allocate GPU objects (buffers, textures, bind groups, UBOs) at bucket creation or style load time; invalidate only when underlying data changes. **Never allocate GPU objects inside draw functions that run every frame.**\n- In hot paths, prefer flat typed arrays (`Float32Array`, `Uint16Array`) over arrays of objects or nested arrays\n\n<!-- File: GEMINI.md (Tokens: ~22 | Category: gemini-rule) -->\n# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n\n<!-- File: .claude-plugin/marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.claude-plugin/marketplace.json)\n\n<!-- File: .claude-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.claude-plugin/plugin.json)\n\n<!-- File: .cursor/mcp.json (Tokens: ~300 | Category: mcp-config) -->\n# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/mapbox/mapbox-gl-js/HEAD/.cursor/mcp.json)\n</yakaai_skills>"}