Automated summary
Creates a new Vercel serverless API endpoint for NuxChain following project conventions: TypeScript, caching, rate limiting, CORS, and registration in vercel.json.
Strengths
- Automates endpoint creation with all best practices built in
- Automatically handles CORS preflight, caching, and error handling
- Ensures the endpoint is properly registered in Vercel configuration
- Uses TTL-based caching for performance optimization
When you need to add a serverless API route to an existing Vercel project using NuxChain conventions.
For simple endpoints that don't require caching, CORS, or complex error handling, or if the project does not use Vercel.
Security analysis
SafeThe skill only instructs creating API endpoint files using standard Write/Edit tools, with no execution of dangerous commands, no data exfiltration, and no safety bypass. It follows best practices for CORS, error handling, and caching, posing no security risk.
No concerns found
How this analysis is madeExamples
Create a new API endpoint for fetching user profile data. Use the namespace 'users' and action 'profile'.Add a new route to /api/products/list that returns a list of products with caching.name: vercel-api-endpoint description: Create a new Vercel serverless API endpoint for NuxChain. Use when user says "create an API", "new endpoint", "add a route to /api/", "serverless function", or needs a backend handler. Enforces the project's pattern: TypeScript, kvCache, rate limiting, CORS, error handling, and vercel.json registration. allowed-tools: Read, Write, Edit, Glob, Grep model: claude-sonnet-4-5 license: MIT metadata: author: nuxchain version: '1.0.0'
See full skill at: .agents/skills/vercel-api-endpoint/SKILL.md
Vercel API Endpoint — Quick Reference
File Location
api/<namespace>/<action>.ts
Checklist (every new endpoint)
- [ ] File at
api/<namespace>/<action>.ts - [ ] Handles OPTIONS (CORS preflight)
- [ ] Uses
kvCachefrom../_services/kv-cache-service - [ ] try/catch with proper error response
- [ ] Registered in
vercel.jsonunder"functions"and"headers" - [ ] Proxy added in
vite.config.ts→ port 3003 - [ ] Local handler added in
src/server/api-server.js
Template
import type { VercelRequest, VercelResponse } from '@vercel/node';
import { kvCache } from '../_services/kv-cache-service';
export default async function handler(req: VercelRequest, res: VercelResponse) {
if (req.method === 'OPTIONS') { res.status(200).end(); return; }
if (req.method !== 'GET') { res.status(405).json({ error: 'Method not allowed' }); return; }
try {
const cached = await kvCache.get('key', { namespace: 'ns', ttl: 30 });
if (cached) return res.json({ success: true, data: cached, cached: true });
const data = await fetchData();
await kvCache.set('key', data, { namespace: 'ns', ttl: 30 });
res.json({ success: true, data, cached: false, timestamp: Date.now() });
} catch (error) {
res.status(500).json({ error: 'Internal server error', message: error instanceof Error ? error.message : 'Unknown' });
}
}
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/vercel-api-endpoint-mma3jrrz/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/vercel-api-endpoint-mma3jrrz' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/vercel-api-endpoint-mma3jrrz/download' --output '.skill-downloads/vercel-api-endpoint-mma3jrrz/SKILL.md.part' && mv '.skill-downloads/vercel-api-endpoint-mma3jrrz/SKILL.md.part' '.skill-downloads/vercel-api-endpoint-mma3jrrz/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.
Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/vercel-api-endpoint-mma3jrrz/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.