# Setup Custom Libraries

Register, add, or update existing custom Simulink block libraries and configure block...

- Repository: https://github.com/matlab/simulink-agentic-toolkit (1305 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add matlab/simulink-agentic-toolkit --skill setup-custom-libraries -g -a claude-code -y`
Codex: `npx skills add matlab/simulink-agentic-toolkit --skill setup-custom-libraries -g -a codex -y`
Cursor: `npx skills add matlab/simulink-agentic-toolkit --skill setup-custom-libraries -g -a cursor -y`
Gemini CLI: `npx skills add matlab/simulink-agentic-toolkit --skill setup-custom-libraries -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add matlab/simulink-agentic-toolkit`

## Description

Register, add, or update existing custom Simulink block libraries and configure block policy and knowledge index. Use when a user wants to register, set up, configure, or add existing .slx library files for agent-assisted model building. Do NOT use when the user wants to create or author a new library from scratch, that requires building-simulink-models.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Setup Custom Libraries

Register or update custom Simulink block libraries so the agent prefers them over built-in blocks during model building.

## When to Use

- User asks to set up, register, add, or configure custom libraries
- User wants to add new `.slx` files to an existing library configuration
- User says "setup custom libraries", "add my library", "configure libraries", "add a new library file"
- `building-simulink-models` routes here via the policy gate (`gatePass: false`)
- **Never** invoke when `found: false`, that means no custom libraries are configured and the user hasn't asked for them

## When NOT to Use

- User wants to **create** a custom library from scratch (author new blocks, build a new `.slx` library file) → use `building-simulink-models` skill with `model_edit` directly. This skill only *registers* existing libraries; it cannot create library content.
- Only configuring block exclusions or parameter protection (libraries already declared) → `configuring-block-policy`
- Only curating block descriptions/categories (libraries already declared) → `simulink-curating-library-kg`

## Workflow

**Do this FIRST and ALONE, no other tool calls in the same message.**

Call `library.settingsLookup()`, returns a struct with resolved absolute paths:
- `found`, whether a libraries file was located (satk-libraries.json or legacy reuse-libraries.json)
- `enabled`, whether custom libraries are configured
- `gatePass`, whether the gate is satisfied
- `dataRoot`, absolute path to the directory containing `.satk/`
- `kgIndexPath`, `librariesPath`, `policyPath`, absolute paths to data files

**Interpret the result:**

The rest: https://github.com/matlab/simulink-agentic-toolkit/blob/HEAD/skills-catalog/model-based-design-core/setup-custom-libraries/SKILL.md
