소스 정보
- 저장소
- mikailustuner/OmniRule
- 최근 소스 활동
- 2026년 5월 8일 23:36
- 감지된 SKILL.md 언어
- 영어
- 스타
- 5
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/mikailustuner/OmniRule --skill browser-apis명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | browser-apis |
| description | Browser APIs: Storage, IndexedDB, BroadcastChannel, SharedWorker, Clipboard |
| triggers | {"extensions":[".ts",".tsx"],"keywords":["navigator","localStorage","IndexedDB","ServiceWorker","clipboard","geolocation","notification","Web API"]} |
| auto_load_when | Using browser-native APIs |
| agent | frontend-ops |
| tools | ["Read","Write","Bash"] |
Focus: Client-side storage, cross-tab communication, background processing
Use localStorage when:
├── Simple key-value pairs
├── String data only
├── Under 5MB
└── Synchronous access OK
Use sessionStorage when:
├── Tab-specific data
├── Auto-clear on tab close
└── Sensitive data (per tab)
Use IndexedDB when:
├── Large structured data
├── Complex queries needed
├── Binary data (blobs)
└── Transaction support needed
Use Cache API when:
├── HTTP response caching
├── Offline support
└── Network-first/fallback
Schema design:
├── Object stores: like tables
├── Indexes: for query performance
└── Version increment: for migrations
Transaction modes:
├── Read-only: safe, concurrent
├── Read-write: single writer
└── Version change: schema changes
Async patterns:
├── Promises (modern)
├── Event-based (legacy)
└── Cursor for large datasets
Common mistakes:
├── Not handling version upgrades
├── Transaction too long
└── Storing non-serializable
Use case: Cross-tab sync
├── Same-origin tabs only
├── Real-time communication
└── No server needed
Implementation:
├── Create: new BroadcastChannel('name')
├── Send: channel.postMessage(data)
└── Receive: channel.onmessage
Use patterns:
├── Login state sync
├── Theme changes
├── Cache invalidation
└── Form state sharing
Limits:
├── 1MB message size
├── Not supported in all browsers
└── Safari: limited support
Use case:
├── Shared state across tabs
├── Background processing
└── Single connection management
Communication:
├── Port-based messaging
├── MessageChannel for direct comm
└── Shared state via IndexedDB
Lifecycle:
├── Created on first connection
├── Stays alive while any tab connected
└── Dies when last tab closes
Warning:
├── Debugging is hard
├── Memory leaks possible
└── Browser support varies
Read (paste):
├── Requires permission (navigator.permissions)
├── Support varies by browser
└── Handle plain text and HTML
Write (copy):
├── navigator.clipboard.writeText()
├── Modern: write() with ClipboardItem
├── Fallback: execCommand (deprecated)
Security:
├── User gesture required
├── Permission prompts
└── Don't trust clipboard content
Pattern:
├── Try modern API first
├── Handle errors gracefully
└── Provide fallback UI
localStorage:
├── 5-10MB per origin
├── Synchronous, blocking
└── No transactions
sessionStorage:
├── Same limit as localStorage
├── Per-tab isolation
└── Cleared on close
IndexedDB:
├── Variable: 50MB+
├── User can increase
└── Async, non-blocking
Cache API:
├── No fixed limit
├── Browser-managed eviction
└── Per-origin quota
❌ IntersectionObserver not disconnected after element removed
✅ observer.disconnect() in cleanup / useEffect return
❌ Blocking main thread with synchronous XHR
✅ Always async: fetch() with await
❌ Storing sensitive data in localStorage (XSS accessible)
✅ Sensitive data in HttpOnly cookies; localStorage only for non-sensitive
❌ Registering event listeners without removing on unmount
✅ Return cleanup function in useEffect; removeEventListener
❌ navigator.geolocation without feature detect
✅ Always feature-detect: if ('geolocation' in navigator)
| API | Use case | MDN |
|---|---|---|
| IntersectionObserver | Lazy load, scroll trigger | observe/unobserve |
| ResizeObserver | Responsive components | observe element |
| MutationObserver | Watch DOM changes | observe with config |
| Web Workers | Off-thread computation | postMessage |
| IndexedDB | Large client storage | via idb library |
| Web Crypto | Client-side crypto | subtle.digest, encrypt |