edalcin/biodiversitydataskills

biohousekeeper

Analyzes biodiversity spreadsheets (CSV/XLSX) and proposes a restructured column layout aligned with Darwin Core (DwC), asking the user clarifying questions about anything ambiguous before finalizing the report.

Ver código fuente

Cómo usar

  1. Copia el comando y revisa el paquete antes de instalarlo en tu entorno de agente.
  2. Consulta las herramientas, credenciales y entornos necesarios en el documento original.
  3. Describe las entradas y el resultado deseado; contrasta la salida con las fuentes.
npx skills add https://github.com/edalcin/biodiversitydataskills --skill biohousekeeper

Antes de empezar

  • La instalación no incluye suscripción al modelo, cuota API ni permisos sobre tus archivos.
  • Las estrellas e instalaciones reflejan actividad, no una prueba independiente de calidad o seguridad.
Documento original del Skill

Contenido del repositorio de origen con títulos, ejemplos, código, tablas, enlaces e imágenes preservados.

BioHousekeeper Skill

Turns a messy biodiversity spreadsheet into a Darwin Core-aligned structure through analysis plus a short, targeted conversation - never a silent bulk rewrite.

Setup

bash
cd /path/to/biohousekeeper
pip install -r requirements.txt

Usage

/biohousekeeper analyze <spreadsheet>

bash
python scripts/analyze.py my_spreadsheet.xlsx
python scripts/analyze.py my_spreadsheet.xlsx --sheet "Occurrences"
python scripts/analyze.py data.csv --out-dir ./report

Reads the file (first sheet by default for .xlsx; other sheets are listed but not analyzed - pass --sheet to pick one), inspects both column names and sample cell values, and writes two files next to --out-dir (default: current directory):

  • <name>_biohousekeeper_report.md - human-readable report: column mapping table, proposed transformations, missing recommended fields, open questions
  • <name>_biohousekeeper_report.json - the same findings as a plan, with an apply/auto_apply flag per suggestion, consumed by apply.py

The original spreadsheet is never modified by either script.

What you (the agent) do after running analyze.py

  1. Read the generated Markdown report and present the column mapping table and proposed transformations to the user.
  2. Walk through the questions array in the JSON one at a time (not all at once) - these are the cases the heuristics could not resolve alone:
  • a "coordinates split" needs no question (deterministic, auto_apply: true)
  • a binomial scientificName split into genus/specificEpithet always asks for confirmation - regex-based epithet extraction can be wrong on cultivars, hybrids, or "sp." records
  • a delimited locality column asks the user to name each part left-to-right (e.g. country,stateProvince,municipality) - order is dataset-specific and cannot be inferred
  • a suspected duplicate column asks which one to drop
  1. Record the user's answers by editing the plan JSON directly:
  • set "apply": true (or false) on the relevant column entry or operation
  • for split_locality, fill in "targets" with the DwC term list the user gave you, in order (use "skip" for a part that maps to nothing)
  1. Ask whether the user wants a corrected file. If yes, run apply.py; if no, the report alone stands as the deliverable.

apply.py - write the corrected spreadsheet

bash
python scripts/apply.py my_spreadsheet.xlsx --plan my_spreadsheet_biohousekeeper_report.json --output my_spreadsheet_corrected.xlsx

Executes, in order: date-parts merges, coordinate splits, taxon epithet derivation, locality splits, redundant-column drops, then column header renames. Only operations/columns with apply: true (or their heuristic auto_apply: true default, if untouched) run. --output must differ from the input path - the original file is always preserved.

Detection heuristics (what analyze.py looks for)

FindingSignalConfidence
Column already named or synonym of a DwC termName match against references/dwc_terms.csv + a EN/PT/ES synonym dictionaryhigh -> auto-applies
Partial name match onlySubstring match against DwC term listlow -> asks for confirmation
Packed coordinate pair ("−23.5,−46.6")Column name hints at coordinates + delimited values both numeric and in valid lat/lon rangehigh -> auto-applies, original kept as verbatimCoordinates
Binomial scientific name ("Panthera onca")Column maps to scientificName (or name hints at species) + values match a Genus species patternmedium -> always asks
Delimited locality hierarchy ("Brazil / SP / Campinas")Column name hints at locality + a consistent delimiter splits most rows into 2-5 partslow -> always asks which DwC term each part represents
Separate year/month/day columnsThree columns with valid year/month/day rangeshigh -> auto-applies, merges into ISO 8601 eventDate
Redundant duplicate columnsTwo columns match in ≥95% of overlapping non-null rowsmedium -> always asks which to drop
Missing recommended fieldoccurrenceID, basisOfRecord, scientificName, eventDate, decimalLatitude/decimalLongitude, recordedBy, country absent from the mapped termsadvisory note only, not a blocking error

Only column-level renaming and single-column split/merge/drop operations are in scope. BioHousekeeper does not attempt full DwC-DP multi-table normalization (splitting a flat sheet into separate event/occurrence/taxon tables) - use the darwin-core skill's DwC-DP guide for that.

References

Related Skills

[darwin-core](../darwin-core/) - once BioHousekeeper's report and corrected spreadsheet exist, use darwin-core to validate the result, generate a full DwC-A/DwC-DP package, or look up the precise definition of any DwC term the report suggested.

Relacionados por tarea

del mismo repositorio

Más Skills

Todos los Skills
edalcin
Comunidad

darwin-core

Helps users work with Darwin Core (DwC), Darwin Core Archive (DwC-A), Darwin Core Conceptual Model (DwC-CM), and Darwin Core Data Package (DwC-DP), the biodiversity data standards maintained by TDWG. Validates DwC-A files, generates templates, maps CSV columns to DwC terms, explains the standard, explains class relationships via DwC-CM, and helps create DwC-DP packages. Use when the user mentions "Darwin Core", "DwC", "DwC-A", "DwC-DP", "DwC-CM", "GBIF", "biodiversity data", "occurrence", "taxon

instalaciones
1
GitHub Stars
4
Actualizado
26 ago
edalcin
Comunidad

grist-master

Provides comprehensive technical knowledge about Grist (getgrist.com), the spreadsheet-database hybrid tool: REST API, SQL endpoint, MCP server, OAuth apps, webhooks, Python formulas and the full Excel-like function reference, column types, references/lookups, summary tables, access rules, self-hosted (Docker) installation and administration, and integrations (Zapier, n8n, Make, embedding, custom widgets). Use when the user mentions "Grist", "getgrist.com", "grist-core", "grist-widget", building

instalaciones
1
GitHub Stars
4
Actualizado
26 ago
edalcin
Comunidad

iczn

Expert knowledge of the International Code of Zoological Nomenclature (ICZN, 4th edition 1999, with Declarations 44-47 and the 2012 electronic-publication amendment) for zoological taxonomists and for anyone structuring taxonomic data. Decides whether a name is available, which of two competing names is valid, whether a type designation is effective, how authorship and parentheses are cited, and how to model names, taxa and nomenclatural acts in a database. Use this skill whenever the user menti

instalaciones
1
GitHub Stars
4
Actualizado
26 ago
edalcin
Comunidad

skos-xl

Helps users build, validate, convert, and explore controlled vocabularies using SKOS (Simple Knowledge Organization System) and SKOS-XL (the W3C extension for annotatable labels). Supports Darwin Core integration for biodiversity vocabularies (basisOfRecord, habitat types, taxonomic names) and Traditional Knowledge (CTA/EtnoTermos) vocabularies with CARE principles, Nagoya Protocol compliance, per-label access control, and indigenous language attribution (PROV-O). Use when the user mentions "SKO

instalaciones
1
GitHub Stars
4
Actualizado
26 ago