Skills Agentes

Matlab

Construye, revisa, migra y planifica de forma segura flujos numéricos en MATLAB o GNU Octave: arrays, datos tabulares/temporales, tests, proyectos, gráficos, archivos MAT e interoperabilidad con Python.

Solicitaread write bash glob python
Estrellas
34.8k

en todo el repo

Actividad
59

0–100, la ruta de este skill

Actualizado
el mes pasado

último commit aquí

Commits
4

últimos 90 días

Contexto
3.6k tok

49 tok en reposo

Paquete
20 archivos

160 KB

Instalar

Funciona con cualquier agente que lea SKILL.md

npx -y skills add K-Dense-AI/scientific-agent-skills --skill matlab --agent claude-code

Se instala solo en este repositorio.

Qué hace

  • Revisa y diseña código MATLAB/Octave (arrays, tablas, timetables, tests, proyectos) sin asumir licencias instaladas
  • Nunca ejecuta código, MEX, .mlx ni archivos MAT no confiables; solo genera planes de ejecución revisables
  • Da checklist de indexado 1-based, operadores matriciales vs. element-wise, tolerancias numéricas y semillas de RNG
  • Cubre exportación de gráficos, semántica de archivos MAT (v4/6/7/7.3) e interoperabilidad con Python (matlabengine)
  • Incluye CLIs locales sin red para inventariar código, validar manifiestos de proyecto y planear compatibilidad con Python

Úsalo cuando

  • Escribir o revisar código MATLAB o GNU Octave (funciones, scripts, live scripts)
  • Migrar código entre versiones de MATLAB o hacia/desde Octave
  • Planear una ejecución de MATLAB/Octave de forma segura y auditable antes de lanzarla
  • Trabajar con archivos MAT, tablas/timetables o interoperabilidad MATLAB-Python

No lo uses cuando

  • Para ejecutar directamente código, MEX, .mlx o archivos MAT no confiables — requiere aprobación explícita fuera de esta skill

Qué lo activa

Di cualquiera de estas frases y el agente debería cargar este skill.

  • Revisa este script de MATLAB y dime si es seguro ejecutarlo
  • Migra este código de MATLAB para que funcione en GNU Octave
  • Genera el plan de ejecución para este script sin lanzarlo
  • Valida el manifiesto de este proyecto de MATLAB

SKILL.md

En inglés

MATLAB and GNU Octave

Use this skill to design or review numerical code, migrate MATLAB releases, prepare reproducible projects, and plan trusted execution. MATLAB and GNU Octave are distinct products: compatibility is partial, not a license or behavior guarantee.

Product and license gate

  • MATLAB R2026a is proprietary. Do not assume MATLAB, MATLAB Online, a named toolbox, MATLAB Test, MATLAB Compiler, MATLAB Coder, Parallel Computing Toolbox, or an add-on is installed, licensed, or available to the user.
  • MATLAB Runtime is not MATLAB. It runs compatible applications produced with MATLAB Compiler; it cannot run arbitrary source or host MATLAB Engine for Python. Building artifacts needs the applicable licensed compiler and every product used by the source.
  • GNU Octave 11.3.0 is free software under GPLv3+. Octave packages are not MATLAB toolboxes. Similar names do not imply API, numerical, graphics, or licensing equivalence.
  • Ask which runtime, release, platform, installed products, and license context the user actually has. Treat availability as unknown until confirmed.

See Octave compatibility and execution/product boundaries.

Nonnegotiable safety boundary

Never run an untrusted .m, .mlx, MEX binary, MAT file, project startup or shutdown action, package installer, or generated artifact. Static review does not prove safety.

Treat these as execution or code-loading surfaces:

  • eval, evalin, assignin, text-derived feval, str2func, callbacks, timers, app callbacks, and dynamically modified paths;
  • system, unix, dos, shell escape !, Java, .NET, Python (py.*, pyrun, pyrunfile), MEX, and native libraries;
  • mex, codegen, MATLAB Compiler, build tasks, package/project startup, and generated code;
  • load, object deserialization (loadobj, custom serialization), function handles, Java/System objects, and class code reachable from MAT files.

.mlx is an opaque archive for this toolkit and MEX is native executable code. Do not use Python pickle for exchange. Inspect first, isolate when appropriate, obtain explicit approval, then invoke a user-confirmed executable and license. Bundled scripts are static or dry-run tools: none launches MATLAB, Octave, Python Engine, a compiler, or a subprocess.

Default workflow

  1. Clarify target. Record MATLAB release or Octave version, OS/architecture, base product versus required toolboxes/packages, expected inputs/outputs, numerical tolerances, and whether execution is authorized.
  2. Inventory statically. Scan .m files, opaque artifacts, project paths, required products, and MAT headers before any runtime loads them.
  3. Choose code form. Prefer functions with an arguments block for automation. Use scripts only for controlled orchestration and live scripts for reviewed interactive narratives.
  4. Make semantics explicit. Record shapes, classes, units, missing-value rules, indexing, implicit expansion, RNG algorithm/seed, tolerances, and output formats.
  5. Test without hidden state. Keep fixtures synthetic, paths project-local, graphics deterministic, and tests independent of base-workspace residue.
  6. Plan execution. Generate an argv plan, review startup/path effects and licenses, and launch only after explicit approval outside these helpers.
  7. Capture provenance. Hash named inputs/code and record release, products, RNG policy, tolerances, and command plan without dumping the environment.

Language and data checklist

Scripts, functions, and live scripts

  • Scripts share the caller/base workspace and leave variables behind. Functions have local workspaces and explicit inputs/outputs.
  • Live scripts (.mlx) mix code and rich output but are not plain-text review artifacts. Export reviewed code to .m for static inspection.
  • Avoid clear all, broad addpath(genpath(...)), dependence on pwd, global variables, and silent name shadowing. Use project roots and fullfile.
  • Validate sizes, classes, and values in arguments blocks. Remember that type declarations can convert inputs; validators check without converting.
  • A main function file should match the main function name. Local functions are private to the file; since R2024a they can appear anywhere in a script outside conditional contexts.
function y = scaleSignal(x, options)
arguments
    x (:,1) double {mustBeFinite}
    options.Scale (1,1) double {mustBeFinite, mustBeNonzero} = 1
end
y = x .* options.Scale;
end

Read programming.

Arrays, indexing, and numerics

  • MATLAB uses 1-based, column-major indexing. A(i,j), A(k), A(:,j), A{...}, and A.(name) have different semantics.
  • *, /, \, and ^ are matrix operations; dotted forms are element-wise. Use A\b, not inv(A)*b.
  • Since R2016b, compatible dimensions expand implicitly. Assert intended shape before operations that could accidentally form an outer result.
  • Preallocate when output size is known, but do not vectorize at the cost of huge temporaries or unreadable code. Measure with timeit or the profiler.
  • Compare floating-point results with domain-chosen absolute and relative tolerances, not blanket == or a magic multiple of eps.
  • Pin both random algorithm and seed. Use named RandStream substreams for independent parallel work; do not use time-based rng("shuffle") for a reproducibility claim.

Read arrays and mathematics.

Tables, timetables, and missing values

  • A table has named, equal-height variables that may have different types. T(rows,vars) returns a table; T{rows,vars} extracts contents; T.Var selects one variable.
  • A timetable additionally has row times. Sort, validate time zones and uniqueness, then use retime/synchronize intentionally.
  • Missing sentinels are type-specific: NaN, NaT, <missing>, <undefined>, and empty character vectors. Integer and logical arrays have no standard missing sentinel.
  • Define import options rather than relying on inference for production data. Preserve units, time zones, variable names, encodings, and missing rules.

Read data import/export.

Graphics and export

Use explicit figure/axes handles and tiledlayout; label units; set limits, color scales, font sizes, and colormaps deliberately. Prefer exportgraphics over saveas for publication output. In R2026a it exports raster, PDF/EPS/EMF, SVG, GIF, and interactive HTML; format capabilities differ. Specify ContentType="vector" for suitable PDF/SVG-style output and Resolution for raster output. Review accessibility and embedded-raster behavior.

Read graphics and export.

MAT files and exchange

  • Version 7 is the normal save default; matfile creates 7.3 by default. Versions 4/6/7/7.3 differ in types, compression, and per-variable limits.
  • Version 7.3 is HDF5-based, not an arbitrary HDF5 interchange contract. Partial access and chunking can help large arrays.
  • Never load an untrusted MAT file. Inventory headers/datasets first. Objects can invoke class deserialization behavior; opaque/function/native content requires escalation.
  • Prefer CSV/JSON/Parquet/HDF5 with a documented schema for simple exchange. Do not rename pickle payloads as MAT files and do not deserialize pickle.

Read data import/export.

Projects, analysis, and tests

  • Use MATLAB Projects for controlled paths, startup/shutdown tasks, dependencies, source control, and reproducible entry points. Review project actions before opening an untrusted project.
  • matlab.codetools.requiredFilesAndProducts and Dependency Analyzer are static approximations; dynamic dispatch can cause misses or false positives. A required-product report does not prove a license is available.
  • Use Code Analyzer (codeIssues; legacy text workflows can use checkcode) and codeCompatibilityReport before migration.
  • Base MATLAB includes script-, function-, and class-based matlab.unittest workflows. Parallel runs require Parallel Computing Toolbox. Dependency-based selection, richer quality dashboards, generated tests, and advanced coverage/equivalence features can require MATLAB Test or other products.
  • R2026a runtests automatically opens and later closes a project when target tests belong to a project that is not already open. Account for startup and shutdown actions before using this behavior.

Read programming and execution/testing.

Python integration, pinned to R2026a

  • R2026a supports 64-bit CPython 3.9-3.13 for MATLAB Interface to Python, MATLAB Engine for Python, and MATLAB Compiler SDK for Python.
  • The current R2026a PyPI package reviewed here is matlabengine==26.1.12 (released 2026-05-08). It requires an installed R2026a; MATLAB Runtime alone is insufficient. R2026a also ships a preinstalled Engine distribution under one named matlabroot path.
  • Package installation does not grant MATLAB or toolbox licenses. Configure one named interpreter/executable; do not print the full environment, PATH, PYTHONPATH, or credentials.
  • pyenv controls MATLAB-to-Python interpreter selection. In-process Python generally requires restarting MATLAB to switch; out-of-process Python can be terminated and reconfigured.
  • Starting Engine is an explicit execution action: matlab.engine.start_matlab() starts a MATLAB process and can check out a license. Never call it merely to probe availability.
  • Verify conversion semantics for NumPy arrays, pandas DataFrames, tables/timetables, strings/missing values, datetime/duration, dictionaries, shape/order, and unsupported sparse/object/categorical cases.

Read Python integration.

Local helper CLIs

Every helper is network-free, bounded, symlink-rejecting, and nonexecuting. Run from this skill directory with Python 3.11+. Bash is allowed only to invoke these Python CLIs and validation commands; never use it to execute a generated MATLAB/Octave argv plan or untrusted artifact.

Helper Purpose
scripts/plan_batch_command.py Produce reviewed MATLAB/Octave argv; never execute
scripts/scan_m_code.py Scan .m text and flag opaque .mlx/MEX risks
scripts/validate_project_manifest.py Validate paths and declared product/license status
scripts/inventory_mat_file.py Header/metadata inventory; never call loadmat
scripts/plan_python_compatibility.py Check R2026a CPython/Engine compatibility
scripts/reproducibility_report.py Hash named local artifacts and emit a bounded report
scripts/generate_function_scaffold.py Dry-run or create function and unit-test scaffolds
python scripts/scan_m_code.py path/to/source --root path/to/project
python scripts/plan_batch_command.py matlab script path/to/main.m --root path/to/project
python scripts/validate_project_manifest.py project-manifest.json --root path/to/project
python scripts/inventory_mat_file.py data.mat --root path/to/project
python scripts/plan_python_compatibility.py --python-version 3.13
python scripts/reproducibility_report.py --root path/to/project --file src/analyze.m
python scripts/generate_function_scaffold.py analyzeSignal --root path/to/project

The scaffold generator defaults to dry-run; writing requires --write and refuses collisions. SciPy and h5py are optional inventory backends; if authorized, add exact reviewed versions to the caller's project lockfile. They are not required for --help or header-only inventory, and this skill does not perform package installation.

References

Bundled JSON assets are the project manifest, reproducibility manifest, and R2026a Python table. There is no templates/ directory and no Markdown file is loaded from assets/; local-link tests enforce this package contract.

Primary sources (verified 2026-07-23)

Reproducido de K-Dense-AI/scientific-agent-skills bajo licencia MIT. Leer esta página en markdown.

Archivos

20 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.

Antes de instalar

MATLAB R2026a es propietario y requiere licencia; GNU Octave 11.3.0 es gratuito bajo GPLv3+; los CLIs locales necesitan Python 3.11+ y opcionalmente scipy/h5py.

Necesita en el PATH:python

Detalles

Creador
K-Dense-AI
Licencia
MIT
Recursos incluidos
scripts en python + referencias
Código fuente
Ver SKILL.md

Etiquetas

Más de K-Dense-AI/scientific-agent-skills

Este repo incluye 163 skills. Si instalas uno, normalmente ya tienes los demás.

Gestión integral de citas académicas: busca en OpenAlex, PubMed y Google Scholar, extrae metadatos precisos, valida citas y genera entradas BibTeX correctamente formateadas.

Costo de contexto al activarse
3.7k tok
Tamaño del paquete
21 archivos
Última actualización
hace 28 días
investigacion

Realiza revisiones bibliográficas sistemáticas y completas usando varias bases académicas (PubMed, arXiv, bioRxiv, Semantic Scholar). Genera markdown y PDF con citas verificadas en varios estilos (APA, Nature, Vancouver).

Costo de contexto al activarse
3.2k tok
Tamaño del paquete
12 archivos
Última actualización
hace 15 días
investigacion

Crea decks de diapositivas y presentaciones para charlas de investigación: PowerPoint, presentaciones de conferencia, seminarios, defensas de tesis. Da estructura, plantillas, guía de tiempos y validación visual.

Costo de contexto al activarse
5.1k tok
Tamaño del paquete
24 archivos
Última actualización
hace 15 días
documentos

Crea infografías profesionales con Nano Banana Pro AI y refinamiento iterativo inteligente. Usa Gemini 3.6 Flash para revisar la calidad e integra investigación con Perplexity Sonar. Soporta 10 tipos, 8 estilos y paletas para daltonismo.

Costo de contexto al activarse
2.7k tok
Tamaño del paquete
8 archivos
Última actualización
hace 15 días
diseno ui

Crea pósteres de investigación profesionales en LaTeX con beamerposter, tikzposter o baposter, para conferencias y comunicación científica: layout, colores, columnas múltiples e integración de figuras.

Costo de contexto al activarse
3.9k tok
Tamaño del paquete
17 archivos
Última actualización
hace 15 días
documentos

Crea diagramas científicos de calidad de publicación con la IA Nano Banana 2 y refinamiento iterativo inteligente. Gemini 3.6 Flash revisa la calidad y solo regenera si está por debajo del umbral de tu tipo de documento.

Costo de contexto al activarse
4.1k tok
Tamaño del paquete
6 archivos
Última actualización
hace 15 días
diseno ui

Skills relacionados

Cirq

34.8k

Framework de computación cuántica de Google. Para hardware de Google Quantum AI, diseño de circuitos con ruido y a bajo nivel. Para hardware IBM usa qiskit; para ML cuántico con autodiff usa pennylane; para física usa qutip.

Costo de contexto al activarse
3.1k tok
Tamaño del paquete
7 archivos
Última actualización
el mes pasado
herramientas desarrollo

Gtars

34.8k

Usa Gtars para modelos de intervalos genómicos locales: álgebra de conjuntos, solapamientos y conteos, consenso y cobertura, tokenización, procesamiento de fragmentos y planificación refget/BEDbase en Python, Rust y la CLI.

Costo de contexto al activarse
3.1k tok
Tamaño del paquete
15 archivos
Última actualización
el mes pasado
herramientas desarrollo

Extracción y preprocesamiento ligero de teselas WSI: detección de tejido, extracción de teselas y normalización de tinción H&E. Ideal para pipelines simples; para proteómica espacial o deep learning avanzado usa pathml.

Costo de contexto al activarse
2.3k tok
Tamaño del paquete
8 archivos
Última actualización
el mes pasado
herramientas desarrollo