본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)48k · #5515

progressive-web-app

하는 일

PWA는 앱처럼 동작하는 웹사이트입니다. 모바일 기기에 설치할 수 있고 오프라인에서도 사용할 수 있습니다. 빠르고 안정적으로 동작하도록 최신 기술을 사용합니다.

사용하는 경우

  • ✓웹사이트를 오프라인에서도 작동하게 하고 싶을 때.
  • ✓웹사이트를 기기의 홈 화면에 설치할 수 있게 하고 싶을 때.
  • ✓웹사이트의 속도와 안정성을 높이고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/progressive-web-app/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/progressive-web-app/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“웹사이트를 오프라인에서도 작동하고 앱처럼 설치할 수 있게 만들려면 어떻게 해야 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

앱을 설명하는 '매니페스트'와 백그라운드에서 실행되는 추가 코드인 '서비스 워커'를 사용합니다. 이 코드가 캐싱(저장된 파일)을 관리하고, 연결이 없어도 사이트가 작동하게 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Progressive Web Apps (PWAs)

Overview

A Progressive Web App is a web application that uses modern browser capabilities to deliver a fast, reliable, and installable experience — even on unreliable networks. The three required pillars are:

  1. HTTPS — Required in production for service workers to register (localhost is exempt for development).
  2. Web App Manifest (manifest.json) — Makes the app installable and defines its appearance on device home screens.
  3. Service Worker (sw.js) — A background script that intercepts network requests, manages caches, and enables offline functionality.

When to Use This Skill

  • Use when the user wants their web app to work offline or on unreliable networks.
  • Use when building a mobile-first web project where users should be able to install the app to their home screen.
  • Use when the user asks about caching strategies, service workers, or improving web app performance and resilience.
  • Use when the user mentions Workbox, web app manifests, background sync, or push notifications for the web.
  • Use when the user asks "can my website be installed like an app?" or "how do I make my site work offline?" — even if they don't use the word PWA.

Deliverables Checklist

Every PWA implementation must include these files at minimum:

  • index.html — Links manifest, registers service worker
  • manifest.json — Full app metadata and icon set
  • sw.js — Service worker with install, activate, and fetch handlers
  • app.js — Main app logic with SW registration and install prompt handling
  • offline.html — Fallback page shown when navigation fails offline (required — missing file will cause install to fail)

Step 1: Web App Manifest (manifest.json)

Defines how the app appears when installed. Must be linked from <head> via <link rel="manifest">.

{
  "name": "My Awesome PWA",
  "short_name": "MyPWA",
  "description": "A fast, offline-capable Progressive Web App.",
  "start_url": "/",
  "scope": "/",
  "display": "standalone",
  "orientation": "portrait-primary",
  "background_color": "#ffffff",
  "theme_color": "#0055ff",
  "icons": [
    {
      "src": "/assets/icons/icon-192x192.png",
      "sizes": "192x192",
      "type": "image/png",
      "purpose": "any maskable"
    },
    {
      "src": "/assets/icons/icon-512x512.png",
      "sizes": "512x512",
      "type": "image/png",
      "purpose": "any maskable"
    }
  ],
  "screenshots": [
    {
      "src": "/assets/screenshots/desktop.png",
      "sizes": "1280x720",
      "type": "image/png",
      "form_factor": "wide"
    }
  ]
}

Key fields:

  • display: standalone hides browser UI; minimal-ui shows minimal controls; browser is standard tab.
  • purpose: "maskable" on icons enables adaptive icons on Android (safe zone matters — keep content in center 80%).
  • screenshots is optional but required for Chrome's enhanced install dialog on desktop.

Step 2: HTML Shell (index.html)

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My Awesome PWA</title>

  <!-- PWA manifest -->
  <link rel="manifest" href="/manifest.json">

  <!-- Theme color for browser chrome -->
  <meta name="theme-color" content="#0055ff">

  <!-- iOS-specific (Safari doesn't fully use manifest) -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="default">
  <meta name="apple-mobile-web-app-title" content="MyPWA">
  <link rel="apple-touch-icon" href="/assets/icons/icon-192x192.png">

  <link rel="stylesheet" href="/styles.css">
</head>
<body>
  <div id="app">
    <header><h1>My PWA</h1></header>
    <main id="content">Loading...</main>
    <!-- Optional: install button, hidden by default -->
    <button id="install-btn" hidden>Install App</button>
  </div>
  <script src="/app.js"></script>
</body>
</html>

Step 3: Service Worker Registration & Install Prompt (app.js)

// ─── Service Worker Registration ───────────────────────────────────────────
if ('serviceWorker' in navigator) {
  window.addEventListener('load', async () => {
    try {
      const registration = await navigator.serviceWorker.register('/sw.js');
      console.log('[App] SW registered, scope:', registration.scope);
    } catch (err) {
      console.error('[App] SW registration failed:', err);
    }
  });
}


…
자주 묻는 질문

'서비스 워커'는 무엇인가요?

브라우저에서 백그라운드로 실행되는 스크립트(코드)입니다. 네트워크 요청을 가로채고, 파일 캐싱을 관리하고, 웹사이트가 오프라인에서도 작동하게 해 줍니다.

'웹 앱 매니페스트'는 무엇인가요?

이름, 아이콘, 색상, 설치 시 동작 방식 등 웹 앱 정보를 담은 JSON 파일입니다. 이 파일 덕분에 웹사이트를 기기의 홈 화면에 추가할 수 있습니다.

HTTPS가 필요한가요?

네, 실제 배포된 웹사이트에서 서비스 워커가 작동하려면 HTTPS가 필요합니다. 로컬호스트(개발 환경)는 예외입니다.

상세 정보

작성자의 원본 설명

Build Progressive Web Apps (PWAs) with offline support, installability, and caching strategies. Trigger whenever the user mentions PWA, service workers, web app manifests, Workbox, 'add to home screen', or wants their web app to work offline, feel native, or be installable.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5515
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬