Awesome-agent-skills vscode-sftp-config
This skill should be used when setting up SFTP deployment for static websites to production servers, including converting projects from Docker/Express to static hosting, deploying Vue/React/Angular builds, setting up Slidev presentations, or configuring Hugo/Jekyll/Gatsby sites. Use this when the user asks to "setup SFTP deployment", "deploy static site to server", "configure Nginx for static files", "convert from Docker to static hosting", "deploy Vue build to production", "setup subdomain hosting", or "configure SFTP in VS Code". Provides SFTP configuration templates and production-ready Nginx configurations with security headers and caching.
git clone https://github.com/libukai/awesome-agent-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/libukai/awesome-agent-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/vscode-extensions-toolkit/skills/vscode-sftp-config" ~/.claude/skills/libukai-awesome-agent-skills-vscode-sftp-config && rm -rf "$T"
plugins/vscode-extensions-toolkit/skills/vscode-sftp-config/SKILL.mdVSCode SFTP Configuration
Configure VSCode SFTP for deploying static websites to production servers. Provides complete workflow including production-ready Nginx configuration templates with security headers, caching strategies, and performance optimizations.
Core Workflow
Step 1: Analyze Project Structure
Identify the static files to deploy:
- Pure static projects: HTML, CSS, JS in root directory
- Build-based projects: Look for
,dist/
, orbuild/
output directoriespublic/ - Static generators: Check for build commands in
or documentationpackage.json
Ask the user for deployment details:
- Remote server address (IP or hostname)
- Remote path (e.g.,
)/var/www/sitename - SSH authentication method (password or SSH key path)
- Domain name(s) for Nginx configuration
- Whether this is a main domain or subdomain
Step 2: Generate SFTP Configuration
VSCode Extension: This skill uses the code-sftp extension by Satiro Marra.
Step 2A: Configure SSH Config (Recommended Best Practice)
Before creating
sftp.json, set up SSH host alias in ~/.ssh/config for better management:
Host project-prod HostName 82.157.29.215 User root Port 22 IdentityFile ~/.ssh/id_rsa IdentitiesOnly yes ServerAliveInterval 60 ServerAliveCountMax 3
Benefits of SSH config:
- ✅ Eliminates SFTP extension warnings (
)Section for 'IP' not found - ✅ Use host alias in terminal:
ssh project-prod - ✅ Centralized SSH settings (connection keep-alive, compression, etc.)
- ✅ Easier to manage multiple environments (dev, staging, prod)
Check if
~/.ssh/config already has the server:
cat ~/.ssh/config | grep -A 5 "82.157.29.215"
If found, use that existing host alias. If not, add a new entry.
Step 2B: Create SFTP Configuration
Create
.vscode/sftp.json using the template from assets/sftp.json.template.
Essential configuration fields:
: Profile name for easy identificationname
: SSH host alias (e.g.,host
) or IP address"Tencent_Pro"
: "sftp" for SFTP (secure) or "ftp" for FTPprotocol
: 22 for SFTP, 21 for FTPport
: SSH/FTP usernameusername
: Path to SSH private key (e.g.,privateKeyPath
)/Users/username/.ssh/id_rsa
: Remote directory path (e.g.,remotePath
)/var/www/sitename
:uploadOnSave
recommended (manual sync is safer)false
Optional advanced fields:
: Array of files/folders to exclude from uploadignore
: File watching configuration for auto-uploadwatcher
: Sync behavior (delete, update, skip existing files)syncOption
: Use temporary files during uploaduseTempFile
: Auto-download files when openeddownloadOnOpen
Customize for the project:
- Replace
with SSH config alias (recommended) or IP address{{HOST_ALIAS}} - Replace other
with actual values{{PLACEHOLDERS}} - Add project-specific files to
array (ignore
,.claude
, build artifacts, etc.)nginx.conf - For build-based projects: Keep
, sync manually after builduploadOnSave: false - For pure static projects: Optionally enable
for instant deploymentuploadOnSave: true
Step 3: Generate Nginx Configuration
Choose the appropriate template:
- Main domain: Use
for primary websiteassets/nginx-static.conf.template - Subdomain: Use
for subdomains likeassets/nginx-subdomain.conf.templateslides.example.com
Customize the configuration:
- Replace
with actual domain name{{DOMAIN}} - Replace
with remote path (e.g.,{{DOCUMENT_ROOT}}
)/var/www/aiseed - Adjust SSL certificate paths if using custom certificates
- Configure subdomain-specific settings if needed
Include essential features from
references/nginx-best-practices.md:
- HTTP → HTTPS redirect
- HTTP/2 support
- Gzip compression
- Static resource caching (1 year for JS/CSS/images, 1 hour for HTML)
- Security headers (HSTS, X-Frame-Options, CSP, etc.)
- Access and error logs
Step 4: Provide Deployment Instructions
Generate a deployment checklist based on
assets/deploy-checklist.md:
-
Initial setup (one-time):
- Install VSCode extension: code-sftp by Satiro Marra
- Open Command Palette (Cmd/Ctrl+Shift+P) →
to createSFTP: Config.vscode/sftp.json - Verify SSH access to server:
ssh user@host - Ensure remote directory exists:
ssh user@host "mkdir -p /var/www/sitename" - Set proper permissions:
ssh user@host "chmod 755 /var/www/sitename"
-
File deployment:
- For build projects: Run build command first (e.g.,
)npm run build - Open VSCode Command Palette →
to upload all filesSFTP: Sync Local → Remote - Or right-click folder in Explorer → "Upload Folder"
- Monitor upload progress in VSCode Output panel (View → Output → SFTP)
- Verify files uploaded:
ssh user@host "ls -la /var/www/sitename"
- For build projects: Run build command first (e.g.,
-
Nginx configuration:
- Upload generated config to
/etc/nginx/sites-available/ - Create symlink:
ln -s /etc/nginx/sites-available/site.conf /etc/nginx/sites-enabled/ - Test config:
sudo nginx -t - Reload:
sudo systemctl reload nginx
- Upload generated config to
-
SSL/TLS setup (if not configured):
- Refer to
for certificate setupreferences/ssl-security.md - Use Let's Encrypt for free certificates:
certbot --nginx -d example.com
- Refer to
-
Verification:
- Test HTTPS:
curl -I https://example.com - Check security headers: Use securityheaders.com
- Test performance: Use PageSpeed Insights
- Test HTTPS:
Step 5: Document the Setup
Update project documentation (README.md or CLAUDE.md) with:
- Deployment method (SFTP to
)/var/www/path - SFTP configuration location (
).vscode/sftp.json - Nginx configuration reference
- Build commands (if applicable)
- Deployment workflow for future updates
Benefits of This Architecture
Explain to users why static + SFTP deployment is advantageous:
- Simplicity: Edit → Upload → Live (no build pipelines, no containers)
- Performance: Nginx serves static files faster than Node.js/Python backends
- Reliability: No backend processes to crash or hang
- Resource efficiency: Lower server memory and CPU usage
- Cost effective: Can host on minimal VPS or shared hosting
- Easy rollback: Copy previous version from backup directory
When NOT to Use This Architecture
Static + SFTP deployment is not appropriate when:
- Backend API endpoints are required
- Server-side form processing is needed (unless using external services like n8n, FormSpree)
- User authentication/sessions are required
- Database interactions are needed
- Server-side rendering (SSR) is required
Resources
references/
- SSH config file setup and best practices (host aliases, jump hosts, security)ssh-config.md
- Comprehensive Nginx optimization guide for static sitesnginx-best-practices.md
- SSL/TLS certificate setup and security configurationssl-security.md
assets/
- VSCode SFTP configuration template (array format, uses SSH host alias)sftp.json.template
- Main domain Nginx configuration templatenginx-static.conf.template
- Subdomain Nginx configuration templatenginx-subdomain.conf.template
- Step-by-step deployment verification checklistdeploy-checklist.md