base

Database management, forms, reports, and data operations with LibreOffice Base.

31,392 stars
Complexity: medium

About this skill

This skill enables AI agents to interact directly with LibreOffice Base, providing robust capabilities for creating, managing, and automating database workflows. It supports the native ODB (OpenDocument Database) format, allowing agents to design tables, views, relationships, and even embed HSQLDB/Firebird databases. Beyond creation, the skill facilitates connecting to external databases like MySQL and PostgreSQL, automating complex database operations, generating custom forms and reports, and building complete database applications. It's ideal for tasks requiring structured data management, reporting, and application development within the LibreOffice ecosystem, offering a powerful tool for agents to handle desktop-centric data tasks programmatically.

Best use case

Automating various database management tasks, from creating new databases and designing their structure to connecting with external data sources and generating sophisticated reports and forms, all leveraging the power of LibreOffice Base.

Database management, forms, reports, and data operations with LibreOffice Base.

An AI agent capable of programmatically interacting with LibreOffice Base to set up, manage, query, and report on databases, delivering structured data, generated forms, or reports based on user prompts.

Practical example

Example input

Create a new LibreOffice Base database named 'ProjectTracker' with tables 'Projects' (ProjectID PRIMARY KEY, Name, Status, StartDate) and 'Tasks' (TaskID PRIMARY KEY, ProjectID FOREIGN KEY, Description, AssignedTo, DueDate). Then, generate a report showing all 'In Progress' projects and their associated tasks, sorted by due date.

Example output

Successfully created 'ProjectTracker.odb' with 'Projects' and 'Tasks' tables. The report 'InProgressProjectsReport.pdf' showing 'In Progress' projects and tasks, sorted by due date, has been generated and saved to the default documents directory. Would you like to add an index to the 'DueDate' column in the 'Tasks' table?

When to use this skill

  • When needing to create new ODB databases from scratch, including table, view, and relationship design.
  • For tasks involving embedding HSQLDB or Firebird databases within LibreOffice Base projects.
  • To connect AI agents to external databases like MySQL or PostgreSQL through LibreOffice Base.
  • When automating routine database operations, data entry, and report generation.

When not to use this skill

  • For high-performance, large-scale enterprise data warehousing or real-time analytics requiring specialized database engines (e.g., Snowflake, Oracle Exadata).
  • When the primary goal is cloud-native database management or serverless data operations without a local LibreOffice Base installation.
  • If the required database operations are extremely simple and can be handled by plain CSV or spreadsheet files without needing a full relational database.
  • When working with proprietary database formats not natively supported by LibreOffice Base.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/base/SKILL.md --create-dirs "https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/plugins/antigravity-awesome-skills-claude/skills/libreoffice/base/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/base/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How base Compares

Feature / AgentbaseStandard Approach
Platform SupportClaudeLimited / Varies
Context Awareness High Baseline
Installation ComplexitymediumN/A

Frequently Asked Questions

What does this skill do?

Database management, forms, reports, and data operations with LibreOffice Base.

Which AI agents support this skill?

This skill is designed for Claude.

How difficult is it to install?

The installation complexity is rated as medium. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# LibreOffice Base

## Overview

LibreOffice Base skill for creating, managing, and automating database workflows using the native ODB (OpenDocument Database) format.

## When to Use This Skill

Use this skill when:
- Creating new databases in ODB format
- Connecting to external databases (MySQL, PostgreSQL, etc.)
- Automating database operations and reports
- Creating forms and reports
- Building database applications

## Core Capabilities

### 1. Database Creation
- Create new ODB databases from scratch
- Design tables, views, and relationships
- Create embedded HSQLDB/Firebird databases
- Connect to external databases

### 2. Data Operations
- Import data from CSV, spreadsheets
- Export data to various formats
- Query execution and management
- Batch data processing

### 3. Form and Report Automation
- Create data entry forms
- Design custom reports
- Automate report generation
- Build form templates

### 4. Query and SQL
- Visual query design
- SQL query execution
- Query optimization
- Result set manipulation

### 5. Integration
- Command-line automation
- Python scripting with UNO
- JDBC/ODBC connectivity

## Workflows

### Creating a New Database

#### Method 1: Command-Line
```bash
soffice --base
```

#### Method 2: Python with UNO
```python
import uno

def create_database():
    local_ctx = uno.getComponentContext()
    resolver = local_ctx.ServiceManager.createInstanceWithContext(
        "com.sun.star.bridge.UnoUrlResolver", local_ctx
    )
    ctx = resolver.resolve(
        "uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext"
    )
    smgr = ctx.ServiceManager
    doc = smgr.createInstanceWithContext("com.sun.star.sdb.DatabaseDocument", ctx)
    doc.storeToURL("file:///path/to/database.odb", ())
    doc.close(True)
```

### Connecting to External Database

```python
import uno

def connect_to_mysql(host, port, database, user, password):
    local_ctx = uno.getComponentContext()
    resolver = local_ctx.ServiceManager.createInstanceWithContext(
        "com.sun.star.bridge.UnoUrlResolver", local_ctx
    )
    ctx = resolver.resolve(
        "uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext"
    )
    smgr = ctx.ServiceManager
    
    doc = smgr.createInstanceWithContext("com.sun.star.sdb.DatabaseDocument", ctx)
    datasource = doc.getDataSource()
    datasource.URL = f"sdbc:mysql:jdbc:mysql://{host}:{port}/{database}"
    datasource.Properties["UserName"] = user
    datasource.Properties["Password"] = password
    
    doc.storeToURL("file:///path/to/connected.odb", ())
    return doc
```

## Database Connection Reference

### Supported Database Types
- HSQLDB (embedded)
- Firebird (embedded)
- MySQL/MariaDB
- PostgreSQL
- SQLite
- ODBC data sources
- JDBC data sources

### Connection Strings

```
# MySQL
sdbc:mysql:jdbc:mysql://localhost:3306/database

# PostgreSQL
sdbc:postgresql://localhost:5432/database

# SQLite
sdbc:sqlite:file:///path/to/database.db

# ODBC
sdbc:odbc:DSN_NAME
```

## Command-Line Reference

```bash
soffice --headless
soffice --base  # Base
```

## Python Libraries

```bash
pip install pyodbc    # ODBC connectivity
pip install sqlalchemy # SQL toolkit
```

## Best Practices

1. Use parameterized queries
2. Create indexes for performance
3. Backup databases regularly
4. Use transactions for data integrity
5. Store ODB source files in version control
6. Document database schema
7. Use appropriate data types
8. Handle connection errors gracefully

## Troubleshooting

### Cannot open socket
```bash
killall soffice.bin
soffice --headless --accept="socket,host=localhost,port=8100;urp;"
```

### Connection Issues
- Verify database server is running
- Check connection string format
- Ensure JDBC/ODBC drivers are installed
- Verify network connectivity

## Resources

- [LibreOffice Base Guide](https://documentation.libreoffice.org/)
- [UNO API Reference](https://api.libreoffice.org/)
- [HSQLDB Documentation](http://hsqldb.org/)
- [Firebird Documentation](https://firebirdsql.org/)

## Related Skills

- writer
- calc
- impress
- draw
- workflow-automation

Related Skills

food-database-query

31392
from sickn33/antigravity-awesome-skills

Food Database Query

NutritionClaude

firebase

31392
from sickn33/antigravity-awesome-skills

Firebase gives you a complete backend in minutes - auth, database, storage, functions, hosting. But the ease of setup hides real complexity. Security rules are your last line of defense, and they're often wrong.

Developer ToolsClaude

database

31392
from sickn33/antigravity-awesome-skills

Database development and operations workflow covering SQL, NoSQL, database design, migrations, optimization, and data engineering.

Workflow & Automation BundlesClaude

database-optimizer

31392
from sickn33/antigravity-awesome-skills

Expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures.

Database ManagementClaude

database-migrations-sql-migrations

31392
from sickn33/antigravity-awesome-skills

SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, and SQL Server. Focus on data integrity and rollback plans.

Database ManagementClaude

database-migrations-migration-observability

31392
from sickn33/antigravity-awesome-skills

Migration monitoring, CDC, and observability infrastructure

DevOps ToolsClaude

database-migration

31392
from sickn33/antigravity-awesome-skills

Master database schema and data migrations across ORMs (Sequelize, TypeORM, Prisma), including rollback strategies and zero-downtime deployments.

Database ManagementClaude

database-design

31392
from sickn33/antigravity-awesome-skills

Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.

Software DevelopmentClaude

database-cloud-optimization-cost-optimize

31392
from sickn33/antigravity-awesome-skills

You are a cloud cost optimization expert specializing in reducing infrastructure expenses while maintaining performance and reliability. Analyze cloud spending, identify savings opportunities, and implement cost-effective architectures across AWS, Azure, and GCP.

Cloud Cost OptimizationClaude

database-architect

31392
from sickn33/antigravity-awesome-skills

Expert database architect specializing in data layer design from scratch, technology selection, schema modeling, and scalable database architectures.

Database Design & ArchitectureClaude

codebase-cleanup-refactor-clean

31392
from sickn33/antigravity-awesome-skills

You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.

Code Refactoring & QualityClaude

codebase-cleanup-deps-audit

31392
from sickn33/antigravity-awesome-skills

You are a dependency security expert specializing in vulnerability scanning, license compliance, and supply chain security. Analyze project dependencies for known vulnerabilities, licensing issues, outdated packages, and provide actionable remediation strategies.

Security AnalysisClaude