본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)33k · #8783

netlify-deploy

하는 일

이 스킬은 명령줄 도구를 사용해 웹 프로젝트를 Netlify에 배포합니다. 웹사이트를 온라인에 올리거나 미리보기를 테스트하려는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓웹사이트나 웹 앱을 Netlify에 올려서 공개하고 싶을 때.
  • ✓변경 사항을 실서비스에 반영하기 전에 확인할 미리보기 링크가 필요할 때.
  • ✓기존 프로젝트를 Netlify 사이트에 연결해야 하는 경우.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/netlify-deploy/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“제 웹사이트를 Netlify에 배포해서 미리보기 링크를 공유할 수 있게 해 주세요.”

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

작동 방식

이 스킬은 Netlify에 로그인되어 있는지 확인하고, 프로젝트 유형을 감지하고, 사이트에 연결한 뒤, 미리보기나 실서비스로 배포합니다.

기술 내용 (원본 SKILL.md)

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

Netlify Deployment Skill

Deploy web projects to Netlify using the Netlify CLI with intelligent detection of project configuration and deployment context.

Overview

This skill automates Netlify deployments by:

  • Verifying Netlify CLI authentication
  • Detecting project configuration and framework
  • Linking to existing sites or creating new ones
  • Deploying to production or preview environments

Prerequisites

  • Netlify CLI: Installed via npx (no global install required)
  • Authentication: Netlify account with active login session
  • Project: Valid web project in current directory
  • When sandboxing blocks the deployment network calls, rerun with sandbox_permissions=require_escalated.
  • The deployment might take a few minutes. Use appropriate timeout values.

Authentication Pattern

The skill uses the pre-authenticated Netlify CLI approach:

  1. Check authentication status with npx netlify status
  2. If not authenticated, guide user through npx netlify login
  3. Fail gracefully if authentication cannot be established

Authentication uses either:

  • Browser-based OAuth (primary): netlify login opens browser for authentication
  • API Key (alternative): Set NETLIFY_AUTH_TOKEN environment variable

Workflow

1. Verify Netlify CLI Authentication

Check if the user is logged into Netlify:

npx netlify status

Expected output patterns:

  • ✅ Authenticated: Shows logged-in user email and site link status
  • ❌ Not authenticated: "Not logged into any site" or authentication error

If not authenticated, guide the user:

npx netlify login

This opens a browser window for OAuth authentication. Wait for user to complete login, then verify with netlify status again.

Alternative: API Key authentication

If browser authentication isn't available, users can set:

export NETLIFY_AUTH_TOKEN=your_token_here

Tokens can be generated at: https://app.netlify.com/user/applications#personal-access-tokens

2. Detect Site Link Status

From netlify status output, determine:

  • Linked: Site already connected to Netlify (shows site name/URL)
  • Not linked: Need to link or create site

3. Link to Existing Site or Create New

If already linked → Skip to step 4

If not linked, attempt to link by Git remote:

# Check if project is Git-based
git remote show origin

# If Git-based, extract remote URL
# Format: https://github.com/username/repo or git@github.com:username/repo.git

# Try to link by Git remote
npx netlify link --git-remote-url <REMOTE_URL>

If link fails (site doesn't exist on Netlify):

# Create new site interactively
npx netlify init

This guides user through:

  1. Choosing team/account
  2. Setting site name
  3. Configuring build settings
  4. Creating netlify.toml if needed

4. Verify Dependencies

Before deploying, ensure project dependencies are installed:

# For npm projects
npm install

# For other package managers, detect and use appropriate command
# yarn install, pnpm install, etc.

5. Deploy to Netlify

Choose deployment type based on context:

Preview/Draft Deploy (default for existing sites):

npx netlify deploy

This creates a deploy preview with a unique URL for testing.

Production Deploy (for new sites or explicit production deployments):

npx netlify deploy --prod

This deploys to the live production URL.

Deployment process:

  1. CLI detects build settings (from netlify.toml or prompts user)
  2. Builds the project locally
  3. Uploads built assets to Netlify
  4. Returns deployment URL

6. Report Results

After deployment, report to user:

  • Deploy URL: Unique URL for this deployment
  • Site URL: Production URL (if production deploy)
  • Deploy logs: Link to Netlify dashboard for logs
  • Next steps: Suggest netlify open to view site or dashboard

Handling netlify.toml

If a netlify.toml file exists, the CLI uses it automatically. If not, the CLI will prompt for:

  • Build command: e.g., npm run build, next build
  • Publish directory: e.g., dist, build, .next

Common framework defaults:

  • Next.js: build command npm run build, publish .next
  • React (Vite): build command npm run build, publish dist
  • Static HTML: no build command, publish current directory

The skill should detect framework from package.json if possible and suggest appropriate settings.

Example Full Workflow


자주 묻는 질문

Netlify를 따로 설치해야 하나요?

아니요. 이 스킬은 npx로 Netlify 도구를 실행하므로 전역 설치가 필요 없습니다.

어떻게 로그인하나요?

브라우저를 여는 Netlify 로그인 명령을 실행하거나, 환경 변수에 액세스 토큰을 설정하면 됩니다.

새 사이트를 만들 수 있나요?

네. 프로젝트가 아직 연결되지 않은 경우 새 사이트를 만들 수 있습니다.

상세 정보

작성자의 원본 설명

Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys.

repo: davila7/claude-code-templates

인기도

GitHub 스타
33k
순위
#8783
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬