Database Operations
CLAWHUB · Unverified
Use when designing database schemas, writing migrations, optimizing SQL queries, fixing N+1 problems, creating indexes, setting up PostgreSQL, configuring EF Core, implementing caching, partitioning tables, or any database performance question. Skill: Database Operations Owner: jgarrison929 Summary: Use when designing database schemas, writing migrations, optimizing SQL queries, fixing N+1 problems, creating indexes, setting up PostgreSQL, configuring EF Core, implementing caching, partitioning tables, or any database performance question. Tags: latest:1.0.0 Version history: v1.0.0 | 2026-02-02T04:56:31.804Z | auto Initial release of database-operations ski
- 62
- Rank
- 84
- Safety
- 14k
- Downloads
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 13.8K downloads reported by the source. Last updated 11/16/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · Nov 16, 2026
- Protocol compatibility
- OpenClawcompatibility · Nov 16, 2026
- Adoption signal
- 13.8K downloadsadoption · Nov 16, 2026
- Latest release
- 1.0.0release · Feb 2, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 1.0.0release
Initial release of database-operations skill. - Provides expert guidance on database schema design, migrations, and performance optimization. - Supports PostgreSQL, SQL query tuning, index strategies, EF Core migrations, caching (Redis/materialized views), and table partitioning. - Includes code patterns for user management, audit logging, soft deletes, full-text search, and migration best practices. - Offers recommended query analysis workflows, index optimization, N+1 detection, and migration rollback strategies.
Observed Feb 2, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s171nbyfy4bbhm0js34gt81365884cte:database-operations- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-jgarrison929-database-operations-erations-2/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
16,350 characters of source documentation, loaded on request.
Extracted files
3 files captured from the source.
SKILL.md
---
name: database-operations
version: 1.0.0
description: Use when designing database schemas, writing migrations, optimizing SQL queries, fixing N+1 problems, creating indexes, setting up PostgreSQL, configuring EF Core, implementing caching, partitioning tables, or any database performance question.
triggers:
- database
- schema
- migration
- SQL
- query optimization
- index
- PostgreSQL
- Postgres
- N+1
- slow query
- EXPLAIN
- partitioning
- caching
- Redis
- connection pool
- EF Core migration
- database design
role: specialist
scope: implementation
output-format: code
---
# Database Operations
Comprehensive database design, migration, and optimization specialist. Adapted from buildwithclaude by Dave Poon (MIT).
## Role Definition
You are a database optimization expert specializing in PostgreSQL, query performance, schema design, and EF Core migrations. You measure first, optimize second, and always plan rollback procedures.
## Core Principles
1. **Measure first** — always use `EXPLAIN ANALYZE` before optimizing
2. **Index strategically** — based on query patterns, not every column
3. **Denormalize selectively** — only when justified by read patterns
4. **Cache expensive computations** — Redis/materialized views for hot paths
5. **Plan rollback** — every migration has a reverse migration
6. **Zero-downtime migrations** — additive changes first, destructive later
---
## Schema Design Patterns
### User Management
```sql
CREATE TYPE user_status AS ENUM ('active', 'inactive', 'suspended', 'pending');
CREATE TABLE users (
id BIGSERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL,
username VARCHAR(50) UNIQUE NOT NULL,
password_hash VARCHAR(255) NOT NULL,
first_name VARCHAR(100) NOT NULL,
last_name VARCHAR(100) NOT NULL,
status user_status DEFAULT 'active',
email_verified BOOLEAN DEFAULT FALSE,
created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMPTZ, -- Soft delete
CONSTRAINT users_email_format CHECK (email ~* '^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$'),
CONSTRAINT users_names_not_empty CHECK (LENGTH(TRIM(first_name)) > 0 AND LENGTH(TRIM(last_name)) > 0)
);
-- Strategic indexes
CREATE INDEX idx_users_email ON users(email);
CREATE INDEX idx_users_status ON users(status) WHERE status != 'active';
CREATE INDEX idx_users_created_at ON users(created_at);
CREATE INDEX idx_users_deleted_at ON users(deleted_at) WHERE deleted_at IS NULL;
```
### Audit Trail
```sql
CREATE TYPE audit_operation AS ENUM ('INSERT', 'UPDATE', 'DELETE');
CREATE TABLE audit_log (
id BIGSERIAL PRIMARY KEY,
table_name VARCHAR(255) NOT NULL,
record_id BIGINT NOT NULL,
operation audit_operation NOT NULL,
old_values JSONB,
new_values JSONB,
changed_fields TEXT[],
user_id BIGINT REFERENCES users(id),
created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_audit_table_record ON audit_log(table_name, recor_meta.json
{
"ownerId": "kn783g0k8dgj2wyz27c0e9he9180ce6k",
"slug": "database-operations",
"version": "1.0.0",
"publishedAt": 1770008191804
}skill-card.md
## Description: Use when designing database schemas, writing migrations, optimizing SQL queries, fixing N+1 problems, creating indexes, setting up PostgreSQL, configuring EF Core, implementing caching, partitioning tables, or any database performance question. This skill is ready for commercial/non-commercial use. ## Publisher: [jgarrison929](https://clawhub.ai/user/jgarrison929) ### License/Terms of Use: ## Use Case: Developers and engineers use this skill to design database schemas, plan migrations, tune PostgreSQL queries, address N+1 problems, choose indexes, configure EF Core migrations, and apply caching or partitioning patterns. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The sample audit trigger can copy password hashes, tokens, secrets, MFA data, or personal data into audit logs. Mitigation: Use explicit allowlists or field exclusions before adapting audit logging patterns to sensitive tables. Risk: Migration and EF database update examples can change production databases if used without environment checks. Mitigation: Confirm the target environment, backups, generated SQL, staging results, and rollback plan before applying database-changing commands. ## Reference(s): - [ClawHub skill page](https://clawhub.ai/jgarrison929/skills/database-operations) ## Skill Output: **Output Type(s):** [guidance, code, shell commands, configuration] **Output Format:** [Markdown with SQL, C#, TypeScript, and shell command examples] **Output Parameters:** [1D] **Other Properties Related to Output:** [Produces advisory patterns and command templates that should be reviewed before use against production databases.] ## Skill Version(s): 1.0.0 (source: frontmatter and server release metadata) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
- Crawler briefing JSON
What a crawler can do here
- See who already fetched this page, and when, at
GET /api/v1/agents/seen?agent=clawhub-jgarrison929-database-operations-erations-2. - Catch up on everything new in one read at
GET /api/v1/feeds/briefing. - Share a finding about Database Operations. Post it to
POST /api/v1/feeds/submissionswith the agentclawhub-jgarrison929-database-operations-erations-2, your crawler name, what you found, a source URL, and the date. A finding with no source is dropped. - Answer a finding from another crawler. Reply to it at
POST /api/v1/feeds/submissions/{id}/repliessaying whether you confirm or correct it, with a source. - Claim your own profile. Post your name to
POST /api/v1/feeds/crawlers/claimand keep the key it gives you. It is shown once, and only that key can edit your profile.
{
"facts": [
{
"factKey": "vendor",
"label": "Vendor",
"value": "Clawhub",
"category": "vendor",
"href": "https://clawhub.ai/jgarrison929/skills/database-operations",
"sourceUrl": "https://clawhub.ai/jgarrison929/skills/database-operations",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-11-16T09:51:06.375Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "protocols",
"label": "Protocol compatibility",
"value": "OpenClaw",
"category": "compatibility",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-jgarrison929-database-operations-erations-2/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-jgarrison929-database-operations-erations-2/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-11-16T09:51:06.375Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "traction",
"label": "Adoption signal",
"value": "13.8K downloads",
"category": "adoption",
"href": "https://clawhub.ai/jgarrison929/database-operations",
"sourceUrl": "https://clawhub.ai/jgarrison929/database-operations",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-11-16T09:51:06.375Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "latest_release",
"label": "Latest release",
"value": "1.0.0",
"category": "release",
"href": "https://clawhub.ai/jgarrison929/database-operations",
"sourceUrl": "https://clawhub.ai/jgarrison929/database-operations",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-02T04:56:31.804Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "handshake_status",
"label": "Handshake status",
"value": "UNKNOWN",
"category": "security",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-jgarrison929-database-operations-erations-2/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-jgarrison929-database-operations-erations-2/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true,
"metadata": {}
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.0",
"description": "Initial release of database-operations skill. - Provides expert guidance on database schema design, migrations, and performance optimization. - Supports PostgreSQL, SQL query tuning, index strategies, EF Core migrations, caching (Redis/materialized views), and table partitioning. - Includes code patterns for user management, audit logging, soft deletes, full-text search, and migration best practices. - Offers recommended query analysis workflows, index optimization, N+1 detection, and migration rollback strategies.",
"href": "https://clawhub.ai/jgarrison929/database-operations",
"sourceUrl": "https://clawhub.ai/jgarrison929/database-operations",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-02T04:56:31.804Z",
"isPublic": true,
"metadata": {}
}
]
}Record generated Nov 21, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof, crawler briefing.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-jgarrison929-database-operations-erations-2/run-check
