Borrowing it
Nothing to install: this file belongs to ianlkl11234s/mini-taiwan-pulse. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ianlkl11234s/mini-taiwan-pulse/master/.claude/commands/new-layer.mdgit clone --depth 1 https://github.com/ianlkl11234s/mini-taiwan-pulseWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/ianlkl11234s/mini-taiwan-pulse/new-layer)<a href="https://agentmods.dev/commands/ianlkl11234s/mini-taiwan-pulse/new-layer"><img src="https://agentmods.dev/badge/commands/ianlkl11234s/mini-taiwan-pulse/new-layer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/ianlkl11234s/mini-taiwan-pulse/new-layer"><img src="https://agentmods.dev/badge/commands/ianlkl11234s/mini-taiwan-pulse/new-layer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.03010 |
| Opus 5 | $0.00015 | $0.01505 |
| Sonnet 5 | $0.00006 | $0.00602 |
| Haiku 4.5 | $0.00003 | $0.00301 |
Grade A, and why
new-layer 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/new-layer
為 Mini Taiwan Pulse 新增一個地圖圖層。
本 command 只負責產骨架。UX 決策 / 資料驗收 / 跨 repo 對齊 → 走 layer-onboarding skill(本 command 執行完會自動提示)。
⚠️ 2026-08-12(AR-22 Phase 4)改版:舊版的「7 步強制順序」裡有 5 個接觸點是 登記簿(
LAYER_COLORS/LAYER_ICONS/ THEMES 的 label /UPSTREAM_REGISTRY/useTransportParams的case),現在全部由layerManifest.ts與layerParamsSpec.ts兩筆宣告派生。新流程是 manifest 一筆 + spec 一筆 + 實質邏輯檔。舊版還要求手動改
useLayerVisibility.ts的DEFAULT_ON—— 那張表的 key 全集已由LAYER_COLORS派生且現為空集合,預設關的層完全不用碰。
參數
$1(必填): layer key,camelCase,例如busRoutes/floodZones--static/--dynamic(擇一):static= Mapbox overlayRegistry(GeoJSON / PMTiles,fill/line/circle)dynamic= Custom WebGL layer 或 Three.js scene(時序動畫)
--source=supabase|geojson|pmtiles:資料來源
Step 0 — 開跑前必做(⚠️ 不可跳)
跑本 command 前先確認:
- Feature slug 已定(kebab-case,例如
flood-zones) - 開分支:
git checkout -b feat/<slug> - 建 feature 資料夾:
cp -r docs/features/_TEMPLATE docs/features/<slug> - 若涉新資料 / 資料契約:先開 upstream handoff
cp taipei-gis-analytics/docs/handoff/_TEMPLATE.md \ taipei-gis-analytics/docs/handoff/<slug>.md
Step 1 — 產骨架
使用 layer-creator subagent 處理樣板產生。委派時傳入:
- Layer key(從 $1)
- Layer 類型(static/dynamic)
- 資料來源
- 現有類似 layer 參考(若 static →
earthquakes/disasterAlerts;若 dynamic →freewayCongestion/cwaImagery)
必產生 / 修改的檔案(新三步 + 條件觸點)
① 型別入口
src/types/index.ts — LayerVisibility interface 加 $1: boolean。
若這層可點選 → 同檔 FeatureInfo["layerType"] union 也加一個 layerType。
🔒 tsc:下游多張 Record<keyof LayerVisibility, T> 會立刻 TS2739。
② manifest 一筆(取代舊版 5 個登記簿觸點)
src/data/layerManifest.ts — LAYER_MANIFEST 加一筆完整 entry:
$1: {
key: "$1",
section: { theme: "水資源 Water", group: "河川" }, // orphan 才寫 null
label: "中文名 English",
// labelMobile / expandable / gated 選填
color: "#0284c7",
icon: Waves, // lucide 元件參照,不是字串
upstream: { status: "verified", datasets: [{ datasetId: "…", confidence: "HIGH" }] },
dataClass: "A", // A 靜態 GeoJSON / B PMTiles / C Supabase / D 自行接線
source: { kind: "geojson", sourceId: "$1-src", url: "./$1.geojson" },
legend: null, // 分類 ≥ 2 色就要填圖例 id(鐵則 2)
popup: null, // 可點選就填 FeatureInfo 的 layerType(鐵則 3)
params: { count: 1, kinds: ["slider"] }, // 沒有控件寫 null(鐵則 1)
description: "一句話說明這層在講什麼",
topics: ["水資源", "河川"],
},
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.
- 11d ago First seen · 191 lines · 30 tokens per session scan A 91242cea8be8
new-layer is a command published in the GitHub repository ianlkl11234s/mini-taiwan-pulse (504 stars, last pushed today), licensed MIT. It adds 30 tokens to every session and 3,010 once invoked, about $0.0002 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.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.