pocketbase-api-add-field

Add new fields to PocketBase collections using the JavaScript SDK.

3|2|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/Whamp/whamp-claude-tools --skill pocketbase-api-add-field
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pocketbase-api-add-field
Source: https://github.com/Whamp/whamp-claude-tools/tree/main/pocketbase-plugin/skills/pocketbase-api-add-field
Command: npx skills add https://github.com/Whamp/whamp-claude-tools --skill pocketbase-api-add-field

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pocketbase, and includes scripts (resource) components.

What problem does it solve?

This Skill provides guidance and examples for adding new fields to existing PocketBase collections using the JavaScript SDK, enabling automated migrations and deployment workflows.

Core Features & Use Cases

  • Programmatic schema updates: define and append new fields to existing collections.
  • Admin-authenticated updates via the JS SDK.
  • Migration-ready patterns and production-ready examples for adding fields safely.

Quick Start

Run the Basic Field Addition example to append new fields to the users collection.

Frequently Asked Questions about pocketbase-api-add-field

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add new fields to a PocketBase collection programmatically?

Add new fields to PocketBase collections using the JavaScript SDK by retrieving the current schema, merging new field definitions, and updating the collection with admin authentication. This enables automated migrations without the Admin UI.

Can I automate schema changes in PocketBase during deployment?

Yes, PocketBase schema migrations can be automated through deployment scripts using the JavaScript SDK. This approach handles batch updates across multiple collections and verification of resulting fields in production workflows.

What authentication is required to modify PocketBase collection schemas?

Modifying PocketBase schemas via the JavaScript SDK requires admin authentication. The Skill handles credential management and authenticated requests to ensure only authorized users can alter collection definitions.

How do I verify new fields were added correctly to my PocketBase collection?

After adding fields using the JavaScript SDK, verification retrieves and inspects the updated collection schema to confirm new field definitions are present and properly configured in PocketBase.

Can I add multiple fields to a PocketBase collection in one operation?

Yes, multiple fields can be added in a single operation by merging all new field definitions into the existing schema before updating the collection, enabling efficient batch schema modifications.

What's the best way to handle existing schemas when adding new fields in PocketBase?

Retrieve the current collection schema first, then merge new field definitions with existing fields before updating. This pattern prevents data loss and ensures compatibility with production schemas.