base
Database management, forms, reports, and data operations with LibreOffice Base.
Best use case
base is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Database management, forms, reports, and data operations with LibreOffice Base.
Teams using base should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/base/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How base Compares
| Feature / Agent | base | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Database management, forms, reports, and data operations with LibreOffice Base.
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.
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-automationRelated Skills
hmdb-database
Access Human Metabolome Database (220K+ metabolites). Search by name/ID/structure, retrieve chemical properties, biomarker data, NMR/MS spectra, pathways, for metabolomics and identification.
gwas-database
Query NHGRI-EBI GWAS Catalog for SNP-trait associations. Search variants by rs ID, disease/trait, gene, retrieve p-values and summary statistics, for genetic epidemiology and polygenic risk scores.
geo-database
Access NCBI GEO for gene expression/genomics data. Search/download microarray and RNA-seq datasets (GSE, GSM, GPL), retrieve SOFT/Matrix files, for transcriptomics and expression analysis.
gene-database
Query NCBI Gene via E-utilities/Datasets API. Search by symbol/ID, retrieve gene info (RefSeqs, GO, locations, phenotypes), batch lookups, for gene annotation and functional analysis.
fda-database
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.
ensembl-database
Query Ensembl genome database REST API for 250+ species. Gene lookups, sequence retrieval, variant analysis, comparative genomics, orthologs, VEP predictions, for genomic research.
ena-database
Access European Nucleotide Archive via API/FTP. Retrieve DNA/RNA sequences, raw reads (FASTQ), genome assemblies by accession, for genomics and bioinformatics pipelines. Supports multiple formats.
drugbank-database
Access and analyze comprehensive drug information from the DrugBank database including drug properties, interactions, targets, pathways, chemical structures, and pharmacology data. This skill should be used when working with pharmaceutical data, drug discovery research, pharmacology studies, drug-drug interaction analysis, target identification, chemical similarity searches, ADMET predictions, or any task requiring detailed drug and drug target information from DrugBank.
database
Database development and operations workflow covering SQL, NoSQL, database design, migrations, optimization, and data engineering.
database-optimizer
Expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures.
database-migrations-sql-migrations
SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, and SQL Server. Focus on data integrity and rollback plans.
database-migrations-migration-observability
Migration monitoring, CDC, and observability infrastructure