Storyboarding with Live Script Skills
Last June I wrote about how I used a MATLAB MCP Server to write some useful code, but I didn't share the actual MCP server that I used. Now all can be revealed, because in the last week MathWorks has released an official MATLAB MCP Server. Try it! It's free! My fellow MathWorks bloggers, Yann and Mike, will tell you all about it.
But that's not what I'm going to talk about this week. Because we've been busy... in addition to the new MCP Server, we've published GitHub repositories full of resources to guide your usage of AI tools (see MATLAB Development & AI Coding Projects). Today I want to talk to you about Skills, a new kind of resource that can be used with Anthropic's Claude model.
For my demo, I'll be using Claude Code (learn more here). I'm typing in my requests to Claude Code and in response it is generating MATLAB code for me. I can then open it and execute it in the MATLAB desktop.
So what's a skill? A skill is a sort of latent prompt for a language model. It's a set of instructions that can be tucked out of the way until needed. That's what makes skills useful: they don't clog the resource pipeline when they're not needed. The skill that I'm going to demonstrate is for making plain text Live Scripts in MATLAB. For my demo, I'm going to use a well-known physical system: the double pendulum.
I'll use a technique that I call storyboarding. You may be familiar with the concept of storyboarding from the movies. The idea is that you draw rough sketches of how the action will play out. This saves you time and money when you're actually trying to move expensive things around the set.

In MATLAB terms, I'm going to write a brief sketch, section by section, of what I want my Live Script to look like. And then I'll let Claude fill in the specifics. This gets me to the result I want with minimal wasted effort.
So I can write something like
I will be modeling a double pendulum. Here are the equations of motion EQUATIONS
That is, I'm literally writing the word "EQUATIONS" and assuming that Claude knows how to derive and fill in the equations. A little further down, I put this.
As an example of the "butterfly effect", here we will start off two simulations with only the tiniest difference between their two sets of initial conditions. Notice how quickly they diverge. PLOT OF THETA1 AND THETA2 VS TIME
Again, I am confident that Claude can make the choices necessary to turn "PLOT OF THETA1 AND THETA2 VS TIME" into a useful plot. Along with my Markdown storyboard script I supply this top-level prompt to get the whole process started.
Build a MATLAB ODE for a double pendulum as specified in this diagram: @diagram.png Use the file @storyboard.md as a template for a Live Script. Use the matlab-live-script skill.

I just have to make sure the skill file is in the right place, and now Claude has everything it needs to fill out the storyboard. A minute later I am rewarded with this Live Script. It's done exactly what I want, and the results look good.

I needed to verify that the equations were correct (they were) and then review the code for good design and safety. But even so, this storyboarding approach saved me a ton of work and got me quickly to an excellent result. Now I'm excited to try some more skills and prompts to see where they can take me.


댓글
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.