|
| 1 | +# Payload Skill for Claude Code |
| 2 | + |
| 3 | +Claude Code skill providing comprehensive guidance for Payload 3.x development with TypeScript patterns, field configurations, hooks, access control, and API examples. |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +### From GitHub |
| 8 | + |
| 9 | +Install this skill directly from the Payload repository: |
| 10 | + |
| 11 | +```bash |
| 12 | +/plugin install github:payloadcms/payload |
| 13 | +``` |
| 14 | + |
| 15 | +## What's Included |
| 16 | + |
| 17 | +The `payload` skill provides expert guidance on: |
| 18 | + |
| 19 | +- **Collections**: Auth, uploads, drafts, live preview configurations |
| 20 | +- **Fields**: All field types including relationships, arrays, blocks, joins, virtual fields |
| 21 | +- **Hooks**: beforeChange, afterChange, beforeValidate, field hooks |
| 22 | +- **Access Control**: Collection, field, and global access patterns including RBAC and multi-tenant |
| 23 | +- **Queries**: Local API, REST, and GraphQL with complex operators |
| 24 | +- **Database Adapters**: MongoDB, Postgres, SQLite configurations and transactions |
| 25 | +- **Advanced Features**: Jobs queue, custom endpoints, localization, plugins |
| 26 | + |
| 27 | +## Usage |
| 28 | + |
| 29 | +Once installed, Claude will automatically invoke the skill when you're working on Payload CMS projects. The skill activates when you: |
| 30 | + |
| 31 | +- Edit `payload.config.ts` files |
| 32 | +- Work with collection or global configurations |
| 33 | +- Ask about Payload-specific patterns |
| 34 | +- Need guidance on fields, hooks, or access control |
| 35 | + |
| 36 | +You can also explicitly invoke it: |
| 37 | + |
| 38 | +``` |
| 39 | +@payload how do I implement row-level access control? |
| 40 | +``` |
| 41 | + |
| 42 | +## Documentation Structure |
| 43 | + |
| 44 | +``` |
| 45 | +skills/payload/ |
| 46 | +├── SKILL.md # Main skill file with quick reference |
| 47 | +└── reference/ |
| 48 | + ├── FIELDS.md # All field types and configurations |
| 49 | + ├── COLLECTIONS.md # Collection patterns |
| 50 | + ├── HOOKS.md # Hook patterns and examples |
| 51 | + ├── ACCESS-CONTROL.md # Basic access control |
| 52 | + ├── ACCESS-CONTROL-ADVANCED.md # Advanced access patterns |
| 53 | + ├── QUERIES.md # Query patterns and APIs |
| 54 | + ├── ADAPTERS.md # Database and storage adapters |
| 55 | + └── ADVANCED.md # Jobs, endpoints, localization |
| 56 | +``` |
| 57 | + |
| 58 | +## Resources |
| 59 | + |
| 60 | +- [Payload Documentation](https://payloadcms.com/docs) |
| 61 | +- [GitHub Repository](https://github.com/payloadcms/payload) |
| 62 | +- [Examples](https://github.com/payloadcms/payload/tree/main/examples) |
| 63 | +- [Templates](https://github.com/payloadcms/payload/tree/main/templates) |
| 64 | + |
| 65 | +## Version |
| 66 | + |
| 67 | +**Skill Version**: 0.0.1 |
| 68 | +**Payload Version**: 3.x |
| 69 | +**Last Updated**: 2025-01-27 |
| 70 | + |
| 71 | +## License |
| 72 | + |
| 73 | +MIT |
0 commit comments