Skip to content
Back to skills

Libra

ASecurity

"Use the Libra ergonomic machine-learning client for query-driven

  • 247 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 8, 2026
datapythonrustgoapi

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill libra --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Libra?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Libra
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-libra/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-libra)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: libra
description: "Use the Libra ergonomic machine-learning client for query-driven
  tabular, NLP, vision, recommendation, dashboard, and analysis workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Libra Repo Skill

Use this skill when a task involves the Palashio/libra Python package, especially `from libra import client`. Libra builds ML workflows from natural-language-ish query strings, stores trained models and artifacts in `client.models`, and exposes helper methods for model inspection, plots, prediction, analysis, tuning, recommendations, Streamlit dashboards, NLP generation, image classification, and GANs.

Always read `references/environment-and-compatibility.md` before running code. The repository is a legacy TensorFlow/Keras/pandas project: modern Python stacks need compatibility shims, while the original pins are internally inconsistent. Use the bundled `scripts/libra_compat.py` before importing `libra` on modern pandas, and reapply it after import if you are going to run query methods, because `queries.py` resets `FutureWarning` handling during import. Do not assume CUDA is usable just because GPUs are present.

If the checkout or package version has changed, compare it with `references/repo-provenance.md` before trusting the generated skill or before running refresh work.

## Setup
- Do not install `requirements.txt` blindly. It mixes old TensorFlow/Keras pins with imports that only work on older pandas/scikit-learn releases.
- Preferred modern path for inspection and smoke tests:
  1. Prepare a compatible Python environment using the package notes in `references/environment-and-compatibility.md`.
  2. From the repository root, run `python -m pip install -e . --no-deps` so the local checkout is importable without pulling the legacy dependency list verbatim.
  3. Run `python skills/disco/libra/scripts/inspect_client_surface.py --methods-only` for a minimal import/surface check.
  4. Run `python skills/disco/libra/scripts/smoke_tabular_decision_tree.py` for a tiny CPU smoke test.
- For stricter legacy fidelity, use the older Python 3.8 stack described in `references/environment-and-compatibility.md`.

## Fast routing
- For `client(...)`, dataset reading, `models`, `info()`, `model()`, `predict()`, `plots()`, `accuracy()`, `losses()`, `target()`, `vocab()`, `recommend()`, `dashboard()`, tuning, or package/runtime setup, start with this root skill plus `references/api-surface.md` and `references/troubleshooting.md`.
- For tabular regression, classification, clustering, recommendation, model inspection, tuning, or dashboard launch on CSV/XLSX/JSON data, load `sub-skills/tabular-modeling/SKILL.md`.
- For text classification, summarization, named entities, GPT-2 text generation, image captioning, or NLP preprocessing and corpora setup, load `sub-skills/nlp-and-generation/SKILL.md`.
- For image classification, image preprocessing read modes, TFJS/TFLite export, feature maps, GAN generation, or image-layout troubleshooting, load `sub-skills/vision-and-generative/SKILL.md`.

## Core operating pattern
```python
from libra import client

c = client("path/to/data.csv")
c.decision_tree_query("predict target column")
print(c.models.keys())
print(c.info())
```

Key behavior to keep in mind:

1. A `client` instance represents one dataset path. Most queries read `self.dataset` each time.
2. Query methods store a dictionary under a fixed key such as `decision_tree`, `svm`, `regression_ANN`, `classification_ANN`, `convolutional_NN`, `text_classification`, `summarization`, `image_caption`, `text_generation`, `named_entity_recognition`, `content_recommender`, or `DCGAN`.
3. `latest_model` is updated after most query methods; many helper methods default to that value.
4. Target-column inference goes through `get_value_instruction()` plus Levenshtein matching, so user instructions should contain words close to the target column name. If target detection is wrong, make the instruction closer to the exact column name or pass explicit parameters like `label_column`, `drop`, `text`, `image_column`, or `read_mode` where available.
5. Training methods can write files: model save flags, TFJS/TFLite export, CNN image preprocessing, GAN output images, Keras Tuner directories, plot saving, and Streamlit dashboard launches. Choose output directories deliberately.

## Self-contained helper scripts
- `scripts/libra_compat.py` applies pandas/private-warning compatibility shims before importing legacy Libra code on modern stacks.
- `scripts/inspect_client_surface.py` prints public `client` methods and signatures.
- `scripts/smoke_tabular_decision_tree.py` creates a tiny synthetic CSV and runs a CPU decision-tree smoke test without using the original checkout datasets.

These scripts are intentionally generic; they avoid absolute source-checkout paths and do not depend on original-repo example files or notebooks at runtime.

Files in this skill

  • SKILL.md4.8 KB
  • references/api-surface.md4.9 KB
  • references/environment-and-compatibility.md4.1 KB
  • references/repo-provenance.md2 KB
  • references/repo-routing-metadata.json489 B
  • references/source-script-inventory.md3.2 KB
  • references/troubleshooting.md4.4 KB
  • scripts/inspect_client_surface.py1.5 KB
  • scripts/libra_compat.py541 B
  • scripts/smoke_tabular_decision_tree.py1.9 KB
  • sub-skills/nlp-and-generation/SKILL.md3 KB
  • sub-skills/nlp-and-generation/references/api-reference.md2.8 KB
  • sub-skills/nlp-and-generation/references/data-formats.md1.6 KB
  • sub-skills/nlp-and-generation/references/runtime-setup.md1.4 KB
  • sub-skills/nlp-and-generation/references/troubleshooting.md1.9 KB
  • sub-skills/nlp-and-generation/references/workflows.md2.1 KB
  • sub-skills/nlp-and-generation/scripts/prepare_nltk_corpora.py3 KB
  • sub-skills/nlp-and-generation/scripts/smoke_text_generation.py3 KB
  • sub-skills/tabular-modeling/SKILL.md3.2 KB
  • sub-skills/tabular-modeling/references/api-reference.md4.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.