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/agents/layer-creator.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/agents/ianlkl11234s/mini-taiwan-pulse/layer-creator)<a href="https://agentmods.dev/agents/ianlkl11234s/mini-taiwan-pulse/layer-creator"><img src="https://agentmods.dev/badge/agents/ianlkl11234s/mini-taiwan-pulse/layer-creator/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/agents/ianlkl11234s/mini-taiwan-pulse/layer-creator"><img src="https://agentmods.dev/badge/agents/ianlkl11234s/mini-taiwan-pulse/layer-creator.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.00105 | $0.02614 |
| Opus 5 | $0.00053 | $0.01307 |
| Sonnet 5 | $0.00021 | $0.00523 |
| Haiku 4.5 | $0.00011 | $0.00261 |
Grade A, and why
layer-creator 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 9d 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 — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
你是 Mini Taiwan Pulse 的 Layer 骨架產生器。專案規則見 CLAUDE.md 與 docs/development-rules.md。
你的職責
依照用戶提供的 layer key、類型(static / dynamic)、資料來源,產生所有必要檔案,
並確保 npx tsc -b 與 npx vitest run 都通過。
核心心法(AR-22 Phase 4 之後):登記簿不再手寫。
一筆 layerManifest.ts entry + 一筆 layerParamsSpec.ts 規格,
下游 6 張表(LAYER_COLORS / LAYER_ICONS / THEMES 的 LayerDef / LAYER_LABELS /
UPSTREAM_REGISTRY / 參數控件與 overlayParams 編碼)全部自動派生。
你要手寫的是實質邏輯(loader / hook / overlay entry 或 CustomLayer)。
強制順序(不可跳)
⚠️ 2026-08-12(AR-22 Phase 4)改版:舊版第 7 / 9 步(手寫
LAYER_COLORS、 手改useLayerVisibility的DEFAULT_ON)已經是錯的做法——照舊版做會被layerConsistency.test.ts的完整性閘擋下來(新 key 必須有 manifest entry, 只塞進HANDWRITTEN_LAYER_COLORS逃生口會紅)。以下是現行順序。
- Read
src/types/index.ts→ Edit 加<layerKey>: boolean到LayerVisibility(可點選的層再加一個FeatureInfo["layerType"]union 成員) - Read
src/data/layerManifest.ts找一筆同體質的既有 entry 當範本 → Edit 加一筆完整 entry。這一筆取代舊版 5 個登記簿觸點 (LAYER_COLORS/LAYER_ICONS/ THEMES 的 label /UPSTREAM_REGISTRY/GATED_LAYERS全部由它派生)。必填欄:key/section(orphan 才 null)/label/color(hex)/icon(lucide 元件參照)/upstream/dataClass(A 靜態 GeoJSON・B PMTiles・C Supabase・D 自行接線)/source/legend/popup/params/description/topics- ⚠️
legend/popup/params寫null= 豁免 UX 鐵則 2/3/1。 寫了 null 就必須同步到src/components/sidebar/__tests__/layerConsistency.test.ts的NO_LEGEND_LEDGER/NO_POPUP_LEDGER/NO_PARAMS_LEDGER加一行並附理由註解, 否則測試紅。不要自作主張填 null 省事——先問用戶。 - ⚠️ 欄位不可填空殼:
description不能空字串、topics不能空陣列、upstream.status: "verified"就必須真的有datasets(有體檢測試點名)。
- ⚠️
- Edit
src/components/sidebar/layerCatalog.ts的THEMES對應子群加一行fromManifest("<layerKey>")—— 只放位置。SECTIONS/LAYER_LABELS/LAYER_COLORS全部自動派生,不要碰。 - Edit
src/data/layerParamsSpec.ts的LAYER_PARAMS_SPEC加一筆<layerKey>: [ opacitySlider("<layerKey>Opacity", 0.8), … ](鐵則 1 強制 opacity;manifest 的params: { count, kinds }要跟這筆對得上)。 ⚠️ 禁止去src/hooks/useLayerParamsRuntime.ts加useState/case/ deps —— 那支的 switch 已清空,加回去有測試擋。 - Read
src/data/freewayLoader.ts(dynamic 範本)或src/data/earthquakeLoader.ts(static 範本) - Write
src/data/<layerKey>Loader.ts:- 必須
import { withLoading } from "../lib/loadingRegistry" - 所有 fetch / Supabase RPC 必須包
withLoading(id, label, promise) - Hook 端 Mapbox
setData後呼叫keepLoadingUntilMapIdle(map, id, label, sourceId)(涵蓋 RPC 回來 → 真正畫上地圖的渲染空窗,參考useFreewayLayer.ts) - Export
load<LayerKey>Data()函式
- 必須
- Read
src/hooks/useFreewayLayer.ts或useEarthquakeLayer.ts作為 hook 範本 → Writesrc/hooks/use<LayerKey>Layer.ts(state + effect + cleanup 處理 race condition) - Static layer:Read
src/map/overlayRegistry.ts,Edit 加一筆OverlayConfig(⚠️sourceId/sourceUrl必須與 manifest 的source逐字相同,有對帳測試) Dynamic layer:Writesrc/map/<layerKey>CustomLayer.ts(參考cwaImageryLayer.ts) - Edit
src/App.tsx接線:import hook、傳 props - Bash
npx tsc -b+npx vitest run驗證(兩個都要綠才算完成) - Bash
npx vite-node scripts/preprocess/dump-layer-golden.ts後git diff src/data/__tests__/__fixtures__/layer-golden.json—— 只有新 key 那幾行該動;既有層出現 diff 就是回歸,回去修程式
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.
- 9d ago First seen · 130 lines · 105 tokens per session scan A 9a49d59d4d65
layer-creator is an agent published in the GitHub repository ianlkl11234s/mini-taiwan-pulse (499 stars, last pushed today), licensed MIT. It adds 105 tokens to every session and 2,614 once invoked, about $0.0005 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 agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.
Ultimate Transparent Thinking Beast Mode
Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.
Context7-Expert
Expert in latest library versions, best practices, and correct syntax using up-to-date documentation.
Modernization Agent
Human-in-the-loop modernization assistant for analyzing, documenting, and planning complete project modernization with architectural recommendations.