Agent skill

Simulink Use C Function Block

by matlab in matlab/simulink-agentic-toolkit

A skill your agent uses when integrating legacy code, custom code, or C/C++ code into Simulink via C Function blocks.

Custom licenceAuto-check passedDevelopment

Install Simulink Use C Function Block

skills CLI
$ npx skills add matlab/simulink-agentic-toolkit --skill simulink-use-c-function-block -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install matlab/simulink-agentic-toolkit simulink-use-c-function-block --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/matlab/simulink-agentic-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills-catalog/simulink-modeling/simulink-use-c-function-block .claude/skills/simulink-use-c-function-block && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
simulink-use-c-function-block
GitHub stars
1.2k
Token cost
~2.2k tokens
SKILL.md length
843 words
Files
4 (incl. references)
Skills in repo
43
Repo updated
First seen
Licence
Custom licence

At a glance

A skill your agent uses when integrating legacy code, custom code, or C/C++ code into Simulink via C Function blocks.

  • Works in 4 steps: Add the C Function block — use… → Configure custom code settings — point… → Set code sections — configure… → …
  • Integrating legacy code
  • SKILL.md covers When to Use, When NOT to Use, Rules and Workflow Overview, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Simulink Use C Function Block is an agent skill from matlab/simulink-agentic-toolkit. Use when integrating legacy code, custom code, or C/C++ code into Simulink via C Function blocks. Configure Simulink C Function blocks programmatically using the SymbolSpec API. TRIGGER when the user: - Asks about calling or wrapping C/C++ code or libraries in Simulink - Wants to create, configure, or use a C Function block - Mentions integrating custom code, legacy code, or external C/C++ into a model - Asks to integrate a C++ class into a Simulink model or test bench - Mentions inputs/outputs/parameters for a…

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `manifest.yaml`, `references/custom-code-config.md` and `references/examples.md`).

It sits in Development, covering Legacy modernization. It works with C++. The repository describes itself as: The Simulink Agentic Toolkit gives your AI agent both the tools and the expertise to work effectively with Simulink and Model-Based Design.

When your agent uses it

  • Integrating legacy code
  • C/C++ code into Simulink via C Function blocks
  • The user: - Asks about calling
  • Wrapping C/C++ code

Example prompts

  • “/simulink-use-c-function-block”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Add the C Function block — use model_edit with type "C Function" and set CustomCodeSettingLocation (default: "BlockSettings")
  2. Configure custom code settings — point to headers/sources either on the block or model config (see references/custom-code-config.md)
  3. Set code sections — configure OutputCode, StartCode, etc. on the block
  4. Configure symbols via SymbolSpec — use model_query_params to get the SymbolSpec, then evaluate_matlab_code for object operations

What it can do on your machine

Read from SKILL.md and the folder at commit c58e6ae. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are matlab).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Simulink Use C Function Block loads about 2.2k tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 142 tokens; SKILL.md has 843 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~142
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 843 words (~2,233 tokens).

“The SymbolSpec object defines the block's inputs, outputs, persistent state, constants, and parameters.”

— opening of SKILL.md by matlab, Custom licence
name
simulink-use-c-function-block
license
https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md
metadata.author
MathWorks
metadata.version
1.0

Read the full SKILL.md on GitHub

Files

SKILL.md and 3 other files (references) in skills-catalog/simulink-modeling/simulink-use-c-function-block of matlab/simulink-agentic-toolkit.

  • SKILL.md
  • manifest.yaml
  • references/custom-code-config.md
  • references/examples.md

Open the folder on GitHubat commit c58e6ae

Compare with similar skills

Simulink Use C Function Block next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Simulink Use C Function Block compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Simulink Use C Function Block this skillmatlab/simulink-agentic-toolkit1.2k—~2.2kAutomated safety check: PassCustom licence
Msbuild Antipatternsrunceel/ReactiveProperty944—~3.7kAutomated safety check: PassMIT
Msbuild Modernizationmicrosoft/testfx1k3 repos~4.3kAutomated safety check: PassMIT
Msbuild Antipatternsmicrosoft/testfx1k—~4.5kAutomated safety check: PassMIT
Modern C++ Idiomstrailofbits/skills7.4k—~2.2kAutomated safety check: PassCC-BY-SA-4.0
Cpp Core GuidelinesSpecterOps/skills702—~500Automated safety check: PassApache-2.0

Similar skills

  • Msbuild Antipatterns

    runceel/ReactiveProperty

    Catalog of MSBuild anti-patterns with detection rules and fix recipes.

    944 GitHub stars~3.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Msbuild Modernization

    microsoft/testfx

    Official

    Guide for modernizing and migrating MSBuild project files to SDK-style format.

    1k GitHub starsUsed in 3 repos~4.3k tokens
    DevelopmentAuto-check passed
  • Msbuild Antipatterns

    microsoft/testfx

    Official

    Catalog of MSBuild anti-patterns with detection rules and fix recipes.

    1k GitHub stars~4.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Modern C++ Idioms

    trailofbits/skills

    Official

    Steers C++ code toward C++20, C++23 and C++26 idioms such as smart pointers, concepts, std::expected and std::print, with a security focus.

    7.4k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Cpp Core Guidelines

    SpecterOps/skills

    Apply a condensed version of the ISO C++ Core Guidelines to C++ design, implementation, refactoring, modernization, and code review.

    702 GitHub stars~500 tokensUpdated 14 days ago
    DevelopmentAuto-check passed
  • Modernization Flow

    griddynamics/rosetta

    Workflow for converting, modernizing, upgrading, or re-architecting code (e.g.

    354 GitHub stars~1.7k tokensUpdated 8 days ago
    Backend & APIsAuto-check passed

More from matlab/simulink-agentic-toolkit

All 43 skills in this repo
  • Resolve Design Errors

    matlab/simulink-agentic-toolkit

    A skill your agent uses when asked to run Design Error Detection (quick defect scan), find design errors in a Simulink model, perform root cause analysis on DED findings, fix division-by-zero…

    1.2k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Simscape Write Ssc

    matlab/simulink-agentic-toolkit

    A skill your agent uses when writing or editing Simscape Language (.ssc) source files — components, domains, or functions.

    1.2k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Simulink Optimizing Embedded Code

    matlab/simulink-agentic-toolkit

    Optimizes Simulink models for Embedded Coder generated code.

    1.2k GitHub stars~4.5k tokensUpdated today
    Auto-check passed
  • Checking Model Compliance

    matlab/simulink-agentic-toolkit

    A skill your agent uses when the user asks to check Simulink model compliance against a standard (MISRA, MAB, JMAAB, ISO, DO, IEC, EN, CERT C/CWE, AUTOSAR, Simulink Code Inspector (SLCI)), wants to…

    1.2k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Fix Sldv Incompatibility

    matlab/simulink-agentic-toolkit

    A skill your agent uses when a Simulink model is incompatible with Simulink Design Verifier (sldvcompat returns false, or an SLDV analysis errors out on an unsupported construct) and needs to be…

    1.2k GitHub stars~3.8k tokensUpdated today
    Auto-check passed
  • Simulink Collect Metrics

    matlab/simulink-agentic-toolkit

    Collect and assess quality metrics for Simulink models using the metric.Engine API.

    1.2k GitHub stars~4.4k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Simulink Use C Function Block

What does Simulink Use C Function Block do?

A skill your agent uses when integrating legacy code, custom code, or C/C++ code into Simulink via C Function blocks. Simulink Use C Function Block is an agent skill from matlab/simulink-agentic-toolkit. Use when integrating legacy code, custom code, or C/C++ code into Simulink via C Function blocks.

When should I use Simulink Use C Function Block?

Simulink Use C Function Block fits situations like: integrating legacy code; C/C++ code into Simulink via C Function blocks; the user: - Asks about calling; wrapping C/C++ code.

How do I install Simulink Use C Function Block in Claude Code?

Run `npx skills add matlab/simulink-agentic-toolkit --skill simulink-use-c-function-block -a claude-code`. Or copy the skill folder (skills-catalog/simulink-modeling/simulink-use-c-function-block in matlab/simulink-agentic-toolkit) into .claude/skills/simulink-use-c-function-block in your project. Claude Code loads it when a task matches its description.

How do I install Simulink Use C Function Block in Codex?

Run `npx skills add matlab/simulink-agentic-toolkit --skill simulink-use-c-function-block -a codex`. Or copy the skill folder (skills-catalog/simulink-modeling/simulink-use-c-function-block in matlab/simulink-agentic-toolkit) into .agents/skills/simulink-use-c-function-block in your project. Codex loads it when a task matches its description.

Can I use Simulink Use C Function Block in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add matlab/simulink-agentic-toolkit --skill simulink-use-c-function-block -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/simulink-use-c-function-block, .gemini/skills/simulink-use-c-function-block, .github/skills/simulink-use-c-function-block and .opencode/skills/simulink-use-c-function-block in your project.

What does Simulink Use C Function Block need to run?

SKILL.md names no scripts, command-line tools or credentials: Simulink Use C Function Block is instructions for the agent only.

Does Simulink Use C Function Block access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Simulink Use C Function Block safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Simulink Use C Function Block use?

Simulink Use C Function Block has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Simulink Use C Function Block use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.1k tokens, read only when the agent opens those files.

What are the alternatives to Simulink Use C Function Block?

Skills that share tags, products or a category with Simulink Use C Function Block: Msbuild Antipatterns (runceel/ReactiveProperty, 944 stars), Msbuild Modernization (microsoft/testfx, 1k stars), Msbuild Antipatterns (microsoft/testfx, 1k stars) and Modern C++ Idioms (trailofbits/skills, 7.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Simulink Use C Function Block?

matlab (a GitHub organization) maintains it in matlab/simulink-agentic-toolkit, which has 1,199 GitHub stars. The repository holds 43 skills in this directory. The repository was last updated on October 7, 2026.

Source: matlab/simulink-agentic-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.