Skip to main content

localstorage-utilities-template

Template for creating localStorage utility functions following established patterns. Use when creating new localStorage utilities, when storage patterns need standardization, or when error handling is needed. Provides template code with error handling and validation.

ソース情報

リポジトリ
pmarashian/cursor-agent-skills
ソースの最終更新活動
2026年2月13日 19:51
検出された SKILL.md の言語
英語
スター
2
フォーク
1

インストール方法

デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。

ソースファイルを確認

インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。

ファイルエクスプローラー
2 ファイル

SKILL.md を表示中

SKILL.md
ソースの指示 · 読み取り専用プレビュー
name
localStorage-utilities-template
description
Template for creating localStorage utility functions following established patterns. Use when creating new localStorage utilities, when storage patterns need standardization, or when error handling is needed. Provides template code with error handling and validation.
# localStorage Utilities Template ## Overview Template for creating localStorage utilities following established patterns. Standardize utility creation with consistent error handling and validation. ## Template See `assets/template.ts` for complete localStorage utility template. ## Key Features - Error handling (availability checks, JSON parsing) - Data validation - Default fallback values - Consistent API: `load*()`, `save*()`, `get*()` - Exported storage keys ## Usage 1. Copy `assets/template.ts` to your utility file 2. Replace `DataType` with actual type 3. Replace `DEFAULT_DATA` with actual defaults 4. Update `STORAGE_KEY` with camelCase key name 5. Customize validation if needed ## Best Practices - Use camelCase for storage keys - Always include error handling - Validate parsed data structure - Export storage keys as constants - Use consistent API naming ## Resources - `assets/template.ts` - Template code with error handling, validation
GitHubで見る