payload-v3-endpoints — community payload-v3-endpoints, payload-plugin-email-newsletter, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Ideal for TypeScript-focused AI Agents needing to ensure compatibility with Payload v3 endpoints and correct logger call patterns. Payload CMS Plugin for creating an email newsletter.

aniketpanjwani aniketpanjwani
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The payload-v3-endpoints skill by aniketpanjwani is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Ideal for TypeScript-focused AI Agents needing to ensure compatibility with Payload v3 endpoints and correct logger call patterns.

Core Value

Empowers agents to validate and correct TypeScript code for Payload v3 endpoints, ensuring adherence to the correct request body access patterns and avoiding runtime errors, leveraging async handlers and req.json() for data retrieval.

Capabilities Granted for payload-v3-endpoints

Debugging TypeScript issues in Payload v3 endpoint handlers
Validating request body access patterns for compatibility
Automating corrections for logger calls and endpoint responses

! Prerequisites & Limits

  • Requires knowledge of TypeScript and Payload v3 endpoint patterns
  • Specific to Payload v3, not compatible with Payload v2 patterns
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

payload-v3-endpoints

Install payload-v3-endpoints, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly
<objective> Ensure all Payload v3 endpoints and logger calls follow the correct patterns to avoid runtime errors and TypeScript issues. </objective>

<critical_patterns>

<pattern name="request-body-access"> **WRONG (Payload v2 pattern):** ```typescript handler: async (req, res) => { const data = req.data // undefined in v3! res.status(200).json({ success: true }) } ```

CORRECT (Payload v3 pattern):

typescript
1handler: async (req) => { 2 const data = await req.json() 3 return Response.json({ success: true }, { status: 200 }) 4}

Alternative using helper:

typescript
1import { addDataAndFileToRequest } from 'payload' 2 3handler: async (req) => { 4 await addDataAndFileToRequest(req) 5 const data = req.data // now available 6 return Response.json({ success: true }) 7}
</pattern> <pattern name="response-format"> **WRONG:** ```typescript res.status(200).json({ message: 'success' }) res.json({ message: 'success' }) ```

CORRECT:

typescript
1return Response.json({ message: 'success' }, { status: 200 }) 2return Response.json({ message: 'success' }) // defaults to 200

Error responses:

typescript
1return Response.json({ error: 'Not found' }, { status: 404 }) 2return Response.json({ error: 'Unauthorized' }, { status: 401 })
</pattern> <pattern name="cookie-access"> **WRONG:** ```typescript const token = req.cookies.token // undefined in v3! ```

CORRECT:

typescript
1const cookieHeader = req.headers.get('cookie') 2const cookies = parseCookies(cookieHeader) 3const token = cookies.token
</pattern> <pattern name="handler-signature"> **WRONG:** ```typescript handler: async (req, res) => { ... } ```

CORRECT:

typescript
1handler: async (req) => { ... } 2// or with PayloadRequest type 3handler: async (req: PayloadRequest) => { ... }
</pattern> <pattern name="logger-api"> Payload uses pino logger. The signature is: `logger.info(object, message)` NOT `logger.info(message, object)`

WRONG:

typescript
1req.payload.logger.info('User created', { userId: 123 }) 2req.payload.logger.error('Failed to save:', error)

CORRECT:

typescript
1req.payload.logger.info({ userId: 123 }, 'User created') 2req.payload.logger.error({ error: String(error) }, 'Failed to save')

For simple messages (no object):

typescript
1req.payload.logger.info('Operation completed') // This is fine
</pattern> <pattern name="endpoint-definition"> Complete endpoint example: ```typescript import type { Endpoint, PayloadRequest } from 'payload'

export const myEndpoint: Endpoint = { path: '/my-endpoint', method: 'post', handler: async (req: PayloadRequest) => { try { const data = await req.json()

  // Access payload
  const result = await req.payload.find({
    collection: 'users',
    where: { email: { equals: data.email } }
  })

  req.payload.logger.info({ count: result.totalDocs }, 'Found users')

  return Response.json({
    success: true,
    data: result
  })
} catch (error) {
  req.payload.logger.error({ error: String(error) }, 'Endpoint failed')
  return Response.json({ error: 'Internal error' }, { status: 500 })
}

} }

</pattern>

</critical_patterns>

<common_errors>
| Error | Cause | Fix |
|-------|-------|-----|
| `req.data is undefined` | Using v2 pattern | Use `await req.json()` |
| `req.cookies is undefined` | Using v2 pattern | Parse from `req.headers.get('cookie')` |
| `res.json is not a function` | Handler has wrong signature | Return `Response.json()` |
| `TS2769: No overload matches` on logger | Wrong argument order | Put object first, message second |
| `Type 'string \| string[]' not assignable` | relationTo can be array | Use `Array.isArray(x) ? x[0] : x` |
</common_errors>

<quick_reference>
```typescript
// Request body
const data = await req.json()

// Response
return Response.json({ data }, { status: 200 })

// Logger
req.payload.logger.info({ key: value }, 'Message')
req.payload.logger.error({ error: String(e) }, 'Error message')

// Handler signature
handler: async (req: PayloadRequest) => { ... }

</quick_reference>

<success_criteria>

  • All endpoints use await req.json() for body access
  • All responses use Response.json()
  • All logger calls have object first, message second
  • Handler signature is (req) not (req, res)
  • TypeScript compiles without errors </success_criteria>

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is payload-v3-endpoints?

Ideal for TypeScript-focused AI Agents needing to ensure compatibility with Payload v3 endpoints and correct logger call patterns. Payload CMS Plugin for creating an email newsletter.

How do I install payload-v3-endpoints?

Run the command: npx killer-skills add aniketpanjwani/payload-plugin-email-newsletter/payload-v3-endpoints. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for payload-v3-endpoints?

Key use cases include: Debugging TypeScript issues in Payload v3 endpoint handlers, Validating request body access patterns for compatibility, Automating corrections for logger calls and endpoint responses.

Which IDEs are compatible with payload-v3-endpoints?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for payload-v3-endpoints?

Requires knowledge of TypeScript and Payload v3 endpoint patterns. Specific to Payload v3, not compatible with Payload v2 patterns.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add aniketpanjwani/payload-plugin-email-newsletter/payload-v3-endpoints. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use payload-v3-endpoints immediately in the current project.

Related Skills

Looking for an alternative to payload-v3-endpoints or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI