/ 目錄 / 演練場 / skills
● 官方 matlab ⚡ 即開即用

skills

作者 matlab · matlab/skills

Official MathWorks Agent Skills for MATLAB — makes Claude actually write idiomatic MATLAB instead of generic numeric code.

A curated set of Agent Skills from matlab/skills that activate when Claude is doing MATLAB work: language idioms, toolbox-aware patterns, MATLAB Projects layout, test frameworks, and performance tips. Because it's published by MathWorks, it encodes current best practices rather than Stack-Overflow-of-2012 habits.

為什麼要用

核心特性

即時演示

實際使用效果

skills-skill-4.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "skills-skill-4": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/matlab/skills",
        "~/.claude/skills/skills"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "skills-skill-4": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/matlab/skills",
        "~/.claude/skills/skills"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "skills-skill-4": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/matlab/skills",
        "~/.claude/skills/skills"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "skills-skill-4": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/matlab/skills",
        "~/.claude/skills/skills"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "skills-skill-4",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/matlab/skills",
        "~/.claude/skills/skills"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "skills-skill-4": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/matlab/skills",
          "~/.claude/skills/skills"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add skills-skill-4 -- git clone https://github.com/matlab/skills ~/.claude/skills/skills

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: skills

How to get Claude to write idiomatic MATLAB, not MATLAB-flavored Python

👤 MATLAB developers who noticed Claude defaulting to loops everywhere ⏱ ~25 min intermediate

何時使用: Any MATLAB authoring task — from scripts to toolboxes.

前置條件
  • MATLAB R2023b+ recommended — mathworks.com/products/matlab.html
  • Skill cloned — git clone https://github.com/matlab/skills ~/.claude/skills/skills
步驟
  1. Describe the task
    Write a function that computes the moving-window correlation of two time series — MATLAB, idiomatic.✓ 已複製
    → Vectorized implementation, correct function signature, docstring
  2. Ask for tests
    Add MATLAB unit tests using matlab.unittest.✓ 已複製
    → Tests in a separate file following MATLAB Test conventions
  3. Profile
    If this is called in a tight loop, how would you profile and speed it up?✓ 已複製
    → tic/toc or profile() suggestions, preallocation hints

結果: Idiomatic, fast, tested MATLAB code.

注意事項
  • Claude reaches for Python-style loops — Explicitly ask for vectorized form; reference MATLAB docs style
搭配使用: filesystem

Port a Python/NumPy script to MATLAB correctly

👤 Engineers moving research code into a MATLAB pipeline ⏱ ~30 min intermediate

何時使用: You have a NumPy prototype and need a clean MATLAB equivalent.

步驟
  1. Share the Python
    Port this NumPy script to MATLAB. Preserve numerical behavior — flag where semantics differ.✓ 已複製
    → Translated code + explicit notes on 1-indexing, broadcasting, default dtypes
  2. Verify with a test
    Write a side-by-side test that shows both produce the same outputs on known inputs.✓ 已複製
    → A small cross-check script

結果: MATLAB port with documented semantic differences.

注意事項
  • Off-by-one from zero- vs one-indexing — Claude should call these out; if not, re-ask

組合

與其他 MCP 搭配,撬動十倍槓桿

skills-skill-4 + filesystem

Work across a MATLAB Projects folder structure

Read +mytools/, add a new function, and update the tests package.✓ 已複製
skills-skill-4 + github

Open PRs for MATLAB codebases with proper test coverage

Open a PR that adds the new function + tests.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
matlab-authoring task description Any MATLAB task 0
matlab-testing function under test After authoring 0
perf-guidance slow code + context When something is too slow 0

成本與限制

運行它的成本

API 配額
none
每次呼叫 Token 數
~3–10k per task
費用
free; MATLAB license sold separately
提示
Constrain to a specific toolbox when asking — reduces context

安全

權限、密鑰、影響範圍

憑證儲存: none
資料出站: none

故障排查

常見錯誤與修復

Generated code uses a toolbox you don't have licensed

Tell Claude which toolboxes are available.

驗證: ver in MATLAB
Script errors in older MATLAB

Specify your MATLAB release; skill adapts suggestions.

驗證: version in MATLAB

替代方案

skills 對比其他方案

替代方案何時用它替代權衡
jupyterYou're really doing Python science and only occasionally MATLABDifferent ecosystem

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills