Setup Custom Libraries logo

Setup Custom Libraries

OrganizationPopular
matlab
setup-custom-libraries

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.

Overview

Publishermatlab
Repositorysimulink-agentic-toolkit
Skill namesetup-custom-libraries
Stars
1.2K
Forks
112
Bundled files
2
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by matlab on GitHub. Read the source before you install it.

Installation

Install the Setup Custom Libraries AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/model-based-design-core/setup-custom-libraries
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/matlab/simulink-agentic-toolkit.git /tmp/simulink-agentic-toolkit
mkdir -p .claude/skills
cp -r /tmp/simulink-agentic-toolkit/skills-catalog/model-based-design-core/setup-custom-libraries .claude/skills/setup-custom-libraries
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Setup Custom Libraries in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Setup Custom Libraries on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Setup Custom Libraries is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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:

  • found: false → no custom libraries configured. Do NOT proceed with setup unless the user explicitly asked. Return control to the calling skill.
  • gatePass: true, found: true → all data files present and KB populated. Offer management menu (below).
  • gatePass: false, found: true → libraries declared but KB needs population. Skip Gate 1 (libraries already exist). Start from Gate 2 below using dataRoot as the target.

Follow references/library-setup.md for all gate API details — it is the single source of truth for API calls, examples, and options at each gate.

Gate 1 — Library declaration: Only when the user explicitly asked to set up custom libraries and no libraries file exists yet. STOP and ask the user about reusable libraries. Present two options: Yes (declare libraries) or None (no libraries right now). Do not read reference files, open models, or plan blocks until they respond.

  • If user provides libraries (Yes) → save to prefdir via library.LibraryConfig.save(prefdir(), libraries).
  • If user says "none" → do not create any files. The gate remains open (no config = use standard blocks).

Gate 2 — Block policy: If .satk/block-policy.json is missing, STOP and ask the user about policy setup by following references/library-setup.md. Do not proceed until policy is resolved.

Gate 3 — Library blocks knowledge index: If the KB is empty (index.md contains populated: false) or missing, STOP and ask the user whether to index their library blocks so the agent knows which blocks are available during model building. Offer two options: Automatic (agent infers categories/descriptions autonomously) or Guided setup (interactive curation). Both invoke the simulink-curating-library-kg skill. Follow references/library-setup.md for details. Do not proceed until KG generation completes.

Management menu (config already complete)

Retrieve and display the user's current configuration status using the APIs in references/library-setup.md § "Status Display (Management Menu)". Show library names/paths, policy mode with fallback, and KG block/category counts. Then offer:

  • (a) Add or remove libraries — load existing config via library.LibraryConfig.load(dataRoot), append/remove entries, save via library.LibraryConfig.save(dataRoot, allLibs), then invoke simulink-curating-library-kg skill (automatic mode) to regenerate KG.
  • (b) Update block policy — load configuring-block-policy skill.
  • (c) Promote config to prefdir — only show if tier is project or legacy. Copy .satk/ folder to prefdir/.satk/ (expand relative paths to absolute). See references/library-setup.md § "Gate 1" for the promote API.
  • (d) Regenerate knowledge index — load simulink-curating-library-kg skill.

Adding files to existing config

When satk-libraries.json already exists with declared libraries: read the existing config, append the new library entries, save via library.LibraryConfig.save(), then invoke the simulink-curating-library-kg skill (automatic mode) to infer categories/descriptions for the new blocks and regenerate the knowledge index.

Guardrails

  • Never write config files or .satk/ JSON manually. Always follow the instructions and APIs in references/library-setup.md for each case.
  • Do not use find_system, load_system to discover, validate, or enumerate library contents. All library operations must go through the specified APIs in references/library-setup.md.
  • Each gate requires explicit user input before proceeding. Do not assume anything, wait for the response before moving to the next gate.
  • Paths at prefdir must be absolute. (Project-level paths can be relative to project root.)

Copyright 2026 The MathWorks, Inc.


Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Setup Custom Libraries AI skill do?

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.

Why use Setup Custom Libraries on TypingMind?

Because you install it once and use it with any model. Setup Custom Libraries is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Setup Custom Libraries in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/model-based-design-core/setup-custom-libraries. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Setup Custom Libraries?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Setup Custom Libraries?

As many as you like. As long as a model supports skills, you can use Setup Custom Libraries with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Setup Custom Libraries AI skill free?

It is published on GitHub by matlab. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇