agentleFS
RylaispiritRylaispirit/rylai-codex-hermes-skills/skills/netlify-deploy/SKILL.md

netlify-deploy

Skill56 starsChanged 3 months agoMITView on GitHub

Deploy web projects to Netlify with the Netlify CLI. Use for authentication, site linking, preview deploys, production deploys, and post-deploy verification.

  • Reads credentials
  • Installs packages

15 other projects use a version of this, 10 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use changelog-generator and test-driven-development.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ArogyaReddySkill

    changelog-generator

    Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

    Also in 3 projects that use this

  • OpenAISkill

    test-driven-development

    Use when implementing any feature or bugfix, before writing implementation code

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 6 are common, 1 is distinctive, and 9 are very specific to this project.

  • 6

    Common

    Most of the 15 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Check tools, packages, credentials, network access, and runtime capabilities before execution.

    line 29
  2. Very specific:

    When sandboxing blocks the deployment network calls, rerun with the runtime's approved network-access mechanism.

    line 48
  3. Very specific:

    Check authentication status with npx netlify status.

    line 55
  4. Very specific:

    If not authenticated, guide user through npx netlify login.

    line 56
  5. Common:

    Check if the user is logged into Netlify:

    line 67
  6. Common:

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

    line 87
  7. Common:

    Before deploying, ensure project dependencies are installed:

    line 132
  8. Common:

    After deployment, report to user:

    line 170
  9. Very specific:

    If a netlify.toml file exists, the CLI uses it automatically.

    line 178
  10. Common:

    Static HTML: no build command, publish current directory

    line 185
  11. Very specific:

    If deployment fails due to network issues (timeouts, DNS errors, connection resets), rerun the deploy with escalated permissions (use the …

    line 239
  12. Common:

    Never commit secrets to Git

    line 251
  13. Very specific:

    Use netlify deploy (no --prod) first to test before production

    line 257
  14. Very specific:

    Run netlify open to view site in Netlify dashboard

    line 258
  15. Very specific:

    Run netlify logs to view function logs (if using Netlify Functions)

    line 259
  16. Very specific:

    Use netlify dev for local development with Netlify Functions

    line 260

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rylai Codex-Hermes-Claude Edition | Maintained and adapted by Rylai

Runtime Compatibility

  • Codex: install under ~/.agents/skills/netlify-deploy.
  • Hermes: install under ~/.hermes/skills/netlify-deploy or expose the bundle through skills.external_dirs.
  • Claude Code: install under ~/.claude/skills/netlify-deploy or <project>/.claude/skills/netlify-deploy.
  • Claude.ai and Cowork: upload and enable the matching per-skill ZIP.
  • Resolve bundled files relative to this skill directory; do not depend on paths from another machine.
  • Check tools, packages, credentials, network access, and runtime capabilities before execution.

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 the runtime's approved network-access mechanism.
  • 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:

Set NETLIFY_AUTH_TOKEN in the user's environment without printing or storing the token in project files.

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

# 1. Check authentication
npx netlify status

# If not authenticated:
npx netlify login

# 2. Link site (if needed)
# Try Git-based linking first
git remote show origin
npx netlify link --git-remote-url https://github.com/user/repo

# If no site exists, create new one:
npx netlify init

# 3. Install dependencies
npm install

# 4. Deploy (preview for testing)
npx netlify deploy

# 5. Deploy to production (when ready)
npx netlify deploy --prod

Error Handling

Common issues and solutions:

"Not logged in" → Run npx netlify login

"No site linked" → Run npx netlify link or npx netlify init

"Build failed" → Check build command and publish directory in netlify.toml or CLI prompts → Verify dependencies are installed → Review build logs for specific errors

"Publish directory not found" → Verify build command ran successfully → Check publish directory path is correct

Troubleshooting

Escalated Network Access

If deployment fails due to network issues (timeouts, DNS errors, connection resets), rerun the deploy with escalated permissions (use the runtime's approved network-access mechanism). The deploy requires escalated network access when sandbox networking blocks outbound requests.

Example guidance to the user:

The deploy needs escalated network access to deploy to Netlify. I can rerun the command with escalated permissions—want me to proceed?

Environment Variables

For secrets and configuration:

  1. Never commit secrets to Git
  2. Set in Netlify dashboard: Site Settings → Environment Variables
  3. Access in builds via process.env.VARIABLE_NAME

Tips

  • Use netlify deploy (no --prod) first to test before production
  • Run netlify open to view site in Netlify dashboard
  • Run netlify logs to view function logs (if using Netlify Functions)
  • Use netlify dev for local development with Netlify Functions

Reference

Bundled References (Load As Needed)

  • CLI commands
  • Deployment patterns
  • netlify.toml guide

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.