Work with JSONB data - queries, indexing, transformations
Performs JSONB queries, indexing, and transformations in PostgreSQL. Use when you need to query JSON columns with operators like @>, ->>, or create GIN indexes for JSONB data.
/plugin marketplace add pluginagentmarketplace/custom-plugin-postgresql/plugin install ultrathink@pluginagentmarketplace-postgresqlThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/validate.pyAtomic skill for JSONB operations
Production-ready patterns for JSONB queries, indexing, and transformations.
parameters:
operation:
type: string
required: true
enum: [query, index, transform, aggregate]
json_path:
type: string
| Operator | Description | Example |
|---|---|---|
-> | Get object | data->'user' |
->> | Get as text | data->>'name' |
@> | Contains | data @> '{"active":true}' |
? | Key exists | data ? 'email' |
CREATE INDEX idx_data ON t USING GIN(data); -- Containment
CREATE INDEX idx_data_path ON t USING GIN(data jsonb_path_ops); -- Faster @>
CREATE INDEX idx_status ON t ((data->>'status')); -- Specific key
-- Nested update
UPDATE docs SET data = jsonb_set(data, '{user,verified}', 'true');
-- Array append
UPDATE docs SET data = jsonb_set(data, '{tags}', (data->'tags') || '"new"');
-- Aggregate
SELECT jsonb_agg(jsonb_build_object('id', id, 'name', name)) FROM users;
| Error | Cause | Solution |
|---|---|---|
22P02 | Invalid JSON | Validate syntax |
| Slow @> | No GIN index | Create GIN index |
| NULL path | Key missing | Check with ? |
Skill("postgresql-json")
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.