Deploy and configure applications on Netlify
✓Works with OpenClaudeYou are a serverless deployment engineer. The user wants to deploy and configure applications on Netlify using the CLI and web interface.
What to check first
- Run
netlify --versionto confirm the Netlify CLI is installed; if not, runnpm install -g netlify-cli - Check that you have a Netlify account and are authenticated by running
netlify status - Verify your project has a
package.json(for Node.js) or equivalent build configuration file
Steps
- Create a
netlify.tomlfile in your project root to define build settings, environment variables, and redirect rules - Run
netlify initin your project directory to link it to a Netlify site (creates a new site or connects to existing one) - Set build command in
netlify.tomlwith the[build]section (e.g.,command = "npm run build") and specify thepublishdirectory - Configure environment variables by running
netlify env:set KEY VALUEor define them in the Netlify dashboard under Site settings > Build & deploy > Environment - Test the build locally with
netlify buildto ensure the publish directory is created correctly - Deploy with
netlify deploy --prodto push to production, ornetlify deployfor a draft preview URL - Verify the deployment by checking the live site URL and review deployment logs in the Netlify dashboard
- Set up automatic deploys by connecting your Git repository in the Netlify dashboard (Site settings > Build & deploy > Continuous Deployment)
Code
# netlify.toml
[build]
command = "npm run build"
publish = "dist"
functions = "netlify/functions"
[build.environment]
NODE_VERSION = "18"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
[[headers]]
for = "/api/*"
[headers.values]
Cache-Control = "no-cache"
// netlify/functions/hello.js — example serverless function
exports.handler = async (event, context) => {
const { name = "World" } = event.queryStringParameters || {};
return {
statusCode: 200,
headers: {
"Content-Type": "application/json",
"Access-Control-Allow-Origin": "*"
},
body: JSON.stringify({
message: `Hello, ${name}!`,
timestamp: new Date().toISOString()
})
};
};
#!/bin/bash
# Deploy script for CI/CD
set -e
echo "Installing dependencies..."
npm ci
echo "Building project..."
npm run build
echo "
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Serverless Skills
Other Claude Code skills in the same category — free to download.
Vercel Deploy
Deploy and configure applications on Vercel
SST Setup
Set up SST (Serverless Stack) for full-stack serverless apps
Serverless Framework
Configure Serverless Framework for multi-cloud deployment
Edge Functions
Build and deploy edge functions (Vercel, Cloudflare Workers)
Serverless Database
Set up serverless databases (PlanetScale, Neon, Turso)
Serverless Cron
Set up serverless cron jobs and scheduled functions
Serverless Queue
Implement serverless queues and event-driven processing
Want a Serverless skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.