arcgis-starter-app
Skill1 starsChanged 6 months agoMITView on GitHub
Scaffold a new ArcGIS Maps SDK for JavaScript 5.1 web project from scratch with Vite and TypeScript (strict). Covers dependency setup, the API key via environment variables (and keeping .env out of git, which the Vite template does not do), Map Components registration, getting the view with viewOnReady() (the arcgisViewReadyChange detail is null), and framework integration for vanilla TS, React 19, and Angular. Use this skill whenever the user starts a new ArcGIS project, asks how to set up the SDK, or wires it into a framework.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- GeoDaoyu/arcgis-maps-sdk-js-ai-contexttheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- GeoDaoyu/arcgis-maps-sdk-js-ai-context★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository73 other files it gives its agents.
- skills/arcgis-3d-layers/AGENTS.mdAGENTS.md
- skills/arcgis-advanced-layers/AGENTS.mdAGENTS.md
- skills/arcgis-ai-components/AGENTS.mdAGENTS.md
- skills/arcgis-arcade/AGENTS.mdAGENTS.md
- skills/arcgis-authentication/AGENTS.mdAGENTS.md
- skills/arcgis-charts/AGENTS.mdAGENTS.md
- skills/arcgis-cim-symbols/AGENTS.mdAGENTS.md
- skills/arcgis-coding-components/AGENTS.mdAGENTS.md
- skills/arcgis-coordinates-projection/AGENTS.mdAGENTS.md
- skills/arcgis-core-maps/AGENTS.mdAGENTS.md
- skills/arcgis-core-utilities/AGENTS.mdAGENTS.md
- skills/arcgis-custom-rendering/AGENTS.mdAGENTS.md
- skills/arcgis-editing/AGENTS.mdAGENTS.md
- skills/arcgis-embeddable-maps/AGENTS.mdAGENTS.md
- skills/arcgis-feature-effects/AGENTS.mdAGENTS.md
- skills/arcgis-geometry-operations/AGENTS.mdAGENTS.md
- skills/arcgis-imagery/AGENTS.mdAGENTS.md
- skills/arcgis-interaction/AGENTS.mdAGENTS.md
- skills/arcgis-knowledge-graphs/AGENTS.mdAGENTS.md
- skills/arcgis-layers/AGENTS.mdAGENTS.md
- skills/arcgis-map-tools/AGENTS.mdAGENTS.md
- skills/arcgis-parquet/AGENTS.mdAGENTS.md
- skills/arcgis-performance/AGENTS.mdAGENTS.md
- skills/arcgis-popup-templates/AGENTS.mdAGENTS.md
- skills/arcgis-portal-content/AGENTS.mdAGENTS.md
- skills/arcgis-rest-services/AGENTS.mdAGENTS.md
- skills/arcgis-scene-environment/AGENTS.mdAGENTS.md
- skills/arcgis-smart-mapping/AGENTS.mdAGENTS.md
- skills/arcgis-spatial-analysis/AGENTS.mdAGENTS.md
- skills/arcgis-starter-app/AGENTS.mdAGENTS.md
- skills/arcgis-tables-forms/AGENTS.mdAGENTS.md
- skills/arcgis-time-animation/AGENTS.mdAGENTS.md
- skills/arcgis-utility-networks/AGENTS.mdAGENTS.md
- skills/arcgis-visualization/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-advanced/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-ui/AGENTS.mdAGENTS.md
- skills/hello-world/AGENTS.mdAGENTS.md
- arcgis-3d-layersSkill
- arcgis-advanced-layersSkill
- arcgis-ai-componentsSkill
- arcgis-arcadeSkill
- arcgis-authenticationSkill
- arcgis-chartsSkill
- arcgis-cim-symbolsSkill
- arcgis-coding-componentsSkill
- arcgis-coordinates-projectionSkill
- arcgis-core-mapsSkill
- arcgis-core-utilitiesSkill
- arcgis-custom-renderingSkill
- arcgis-editingSkill
- arcgis-embeddable-mapsSkill
- arcgis-feature-effectsSkill
- arcgis-geometry-operationsSkill
- arcgis-imagerySkill
- arcgis-interactionSkill
- arcgis-knowledge-graphsSkill
- arcgis-layersSkill
- arcgis-map-toolsSkill
- arcgis-parquetSkill
- arcgis-performanceSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 102
Keep the real key in .env and ship .env.example.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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.
Files
Starter App
When to use: Activate this skill whenever the user starts a new ArcGIS Maps SDK 5.0 project, sets up dependencies, configures the API key, or integrates the SDK into Vite, React 19, or Angular.
Overview
This skill bootstraps a working SDK 5.1 project and wires it correctly so the first map renders.
- Problem it solves: going from empty folder to a running, type-safe ArcGIS app in minutes.
- Who it serves: developers (especially LATAM SEs) starting greenfield ArcGIS web apps.
- Pattern it teaches: Vite + TS strict, Map-Components-first, API key via
import.meta.env. - What it does NOT cover: building the map itself (see
arcgis-core-maps) or adding data (arcgis-layers).
Quick Start
bash scripts/scaffold.sh my-arcgis-app # PKG_MANAGER=npm to use npm
cd my-arcgis-app
cp .env.example .env # add VITE_ARCGIS_API_KEY (the scaffold git-ignores .env)
pnpm devMeasured on 2026-10-27 (pnpm 10 and npm 11): the scaffold resolved @arcgis/core and @arcgis/map-components
5.1.27, @esri/calcite-components 5.2.0, Vite 8.3 and TypeScript 7.0, and pnpm build (tsc && vite build)
passed.
Decision Tree
- Which framework?
- Vanilla TS → use the scaffold as-is.
- React 19+ → use Map Components directly (custom elements +
onarcgis*event props). - Angular → add
CUSTOM_ELEMENTS_SCHEMA; import component CSS explicitly.
- Do you have an API key yet?
- No → use
basemap="osm"while developing;arcgis/*basemaps need a key (see Pitfall 3). - Yes → put it in
.envasVITE_ARCGIS_API_KEY.
- No → use
Default: Vite + vanilla TS with Map Components.
Import Patterns
Direct ESM (recommended for npm/Vite/Webpack)
import esriConfig from "@arcgis/core/config.js";Dynamic Imports (CDN)
const esriConfig = await $arcgis.import("@arcgis/core/config.js");Map Components (recommended for new projects)
import "@arcgis/map-components/components/arcgis-map";Key Concepts
Concept 1: Vite + TypeScript strict
The scaffold uses the Vite vanilla-ts template with moduleResolution: "bundler", which the SDK's package exports
require. Measured: the current template does not set strict, so the scaffold adds "strict": true itself.
Concept 2: API key via environment
Set esriConfig.apiKey = import.meta.env.VITE_ARCGIS_API_KEY. Vite only exposes variables prefixed with VITE_.
Keep the real key in .env and ship .env.example. Measured: the Vite template's .gitignore ignores *.local but
not .env; the scaffold appends it.
Concept 3: Registering components and reaching the view
Map Components are custom elements registered via side-effect imports. To use the view from code, await
el.viewOnReady() and read el.view; the arcgisViewReadyChange event carries no payload.
Common Pitfalls (Top 3)
Pitfall 1: Reading the view from the event detail
// ❌ Anti-pattern
mapEl.addEventListener("arcgisViewReadyChange", (e) => console.log((e as CustomEvent).detail.view));// ✅ Correct
const mapEl = document.querySelector("arcgis-map")!;
await mapEl.viewOnReady();
console.log(mapEl.view.type); // "2d"Impact: measured with 5.1.27: the event fired once with detail === null, so detail.view throws
Cannot read properties of null. The previous version of this skill's own scaffold shipped that line.
Pitfall 2: A .env that git does not ignore
# ❌ Anti-pattern
cp .env.example .env && git add . && git commit -m "init" # the Vite template does not ignore .env# ✅ Correct
grep -qx ".env" .gitignore || echo ".env" >> .gitignore # the scaffold does thisImpact: measured: the generated .gitignore lists *.local but not .env, so the real API key goes into git
history. Never hardcode the key in source either.
Pitfall 3: arcgis/* basemaps with no key
<!-- ❌ Anti-pattern: no VITE_ARCGIS_API_KEY yet -->
<arcgis-map basemap="arcgis/topographic" center="-74.08,4.6" zoom="11"></arcgis-map><!-- ✅ Correct while you have no key -->
<arcgis-map basemap="osm" center="-74.08,4.6" zoom="11"></arcgis-map>Impact: measured on the scaffolded app with no .env: a 401, a sign-in calcite-dialog, and view.ready
still false after 15 s. Nothing in the console says "missing API key".
When to Read references/
| If you need... | Read |
| Config / tsconfig / env details | references/api-detail.md |
| React 19 and Angular setups | references/examples.md |
| More pitfalls (5+ extended) | references/pitfalls.md |
Related Skills
arcgis-core-maps— build the map after scaffoldingarcgis-widgets-ui— add Calcite + components UIarcgis-performance— optimize the bundle
Reference Samples
Changelog
- 0.2.0 (2026-10-27): SDK 5.1. Ran the scaffold end to end (pnpm and npm), built it, and loaded it in Chromium;
runtime checks in
tests/runtime/casos/arcgis-starter-app.ts. Fixed the scaffold: itsmain.tsread(e as CustomEvent).detail.view, which throws (detailisnull); the Vite template neither setsstrictnor ignores.env; the final hint saidnpm dev. Dependencies now^5.1. Updated the moduleResolution pitfall (TypeScript 7 removednode; on 5.9 typed imports from map-components fail). New top pitfalls: the null detail, the unignored.env, andarcgis/*basemaps without a key. - 0.1.0 (2026-05-31): Initial release.
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
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.

