[{"data":1,"prerenderedAt":315},["ShallowReactive",2],{"page:\u002Fblog\u002Fclaude-code-plugin":3},{"id":4,"title":5,"body":6,"description":297,"extension":298,"frontmatter":299,"heading":303,"meta":304,"navigation":305,"order":303,"path":306,"seo":307,"sitemap":308,"source":311,"stem":312,"__hash__":313,"hasPopups":314},"site\u002Fblog\u002Fclaude-code-plugin.md","Kubb as a Claude Code plugin",{"type":7,"value":8,"toc":283},"minimark",[9,16,20,23,28,33,133,145,149,152,166,177,188,192,205,212,216,233,237,240,256,269,276],[10,11,12],"p",{},[13,14],"img",{"src":15,"alt":5},"\u002Fblog\u002Fclaude-code-plugin\u002Fcover.svg",[17,18,5],"h1",{"id":19},"kubb-as-a-claude-code-plugin",[10,21,22],{},"Kubb v5 already ships a built-in MCP server, so AI assistants can drive code generation over HTTP. The next step was to make that setup a single command. Kubb is now a Claude Code plugin. Install it from the marketplace and you get slash commands, a config skill, an expert agent, and the Kubb MCP server, all wired together.",[24,25,27],"blockquote",{"as":26},"important","The plugin requires Kubb v5 or higher. It builds on the v5 CLI and the built-in MCP server.",[29,30,32],"h2",{"id":31},"install","Install",[34,35,36,41,49,99,103],"steps",{},[37,38,40],"h3",{"id":39},"install-kubb","Install Kubb",[10,42,43,44,48],{},"The commands run ",[45,46,47],"code",{},"npx kubb",", so install Kubb in your project or globally first:",[50,51,52,82],"code-group",{},[53,54,59],"pre",{"language":55,"filename":56,"code":57,"class":58},"shell","Project","npm install -D kubb","shiki shiki-themes github-light github-dark dark:github-dark",[45,60,62],{"class":61},"language-shell",[63,64,67,71,75,79],"span",{"class":65,"style":66},"line","display: inline",[63,68,70],{"style":69},"color:#6F42C1;--shiki-dark:#B392F0","npm",[63,72,74],{"style":73},"color:#032F62;--shiki-dark:#9ECBFF"," install",[63,76,78],{"style":77},"color:#005CC5;--shiki-dark:#79B8FF"," -D",[63,80,81],{"style":73}," kubb",[53,83,86],{"language":55,"filename":84,"code":85,"class":58},"Global","npm install -g kubb",[45,87,88],{"class":61},[63,89,90,92,94,97],{"class":65,"style":66},[63,91,70],{"style":69},[63,93,74],{"style":73},[63,95,96],{"style":77}," -g",[63,98,81],{"style":73},[37,100,102],{"id":101},"add-the-marketplace-and-plugin","Add the marketplace and plugin",[53,104,107],{"language":55,"filename":105,"code":106,"class":58},"Claude Code","\u002Fplugin marketplace add kubb-labs\u002Fkubb\n\u002Fplugin install kubb@kubb",[45,108,109,123,124],{"class":61},[63,110,111,114,117,120],{"class":65,"style":66},[63,112,113],{"style":69},"\u002Fplugin",[63,115,116],{"style":73}," marketplace",[63,118,119],{"style":73}," add",[63,121,122],{"style":73}," kubb-labs\u002Fkubb","\n",[63,125,126,128,130],{"class":65,"style":66},[63,127,113],{"style":69},[63,129,74],{"style":73},[63,131,132],{"style":73}," kubb@kubb",[24,134,136,137,140,141,144],{"as":135},"note","A ",[45,138,139],{},"SessionStart"," hook checks for ",[45,142,143],{},"kubb"," when a session starts and warns you when it is missing. It never installs anything itself, so nothing runs behind your back.",[29,146,148],{"id":147},"three-slash-commands","Three slash commands",[10,150,151],{},"The plugin maps the Kubb CLI to commands you can call from a Claude Code session.",[10,153,154,157,158,161,162,165],{},[45,155,156],{},"\u002Fkubb:init [input] [output] [plugins]"," scaffolds a ",[45,159,160],{},"kubb.config.ts"," and installs the ",[45,163,164],{},"@kubb\u002Fplugin-*"," packages you pick. Point it at a spec to start:",[53,167,170],{"language":168,"code":169,"class":58},"text","\u002Fkubb:init .\u002Fpetstore.yaml",[45,171,173],{"class":172},"language-text",[63,174,175],{"class":65,"style":66},[63,176,169],{},[10,178,179,180,183,184,187],{},"Claude asks which outputs you want, writes the config, and installs the packages. Run ",[45,181,182],{},"\u002Fkubb:generate"," to re-run codegen whenever the spec changes, and ",[45,185,186],{},"\u002Fkubb:validate \u003Cspec>"," to check an OpenAPI or Swagger document before you generate from it.",[29,189,191],{"id":190},"a-skill-and-an-agent","A skill and an agent",[10,193,194,195,198,199,201,202,204],{},"The ",[45,196,197],{},"config"," skill teaches Claude how to write ",[45,200,160],{}," and which ",[45,203,164],{}," package maps to which output, so the config is correct rather than guessed.",[10,206,207,208,211],{},"For bigger jobs, the ",[45,209,210],{},"kubb-expert"," agent takes a whole \"add Kubb to my project\" task from spec to generated code. It picks plugins, scaffolds the config, runs generation, and reports what changed.",[29,213,215],{"id":214},"the-mcp-server-bundled","The MCP server, bundled",[10,217,218,219,224,225,228,229,232],{},"The plugin wires in the ",[220,221,223],"a",{"href":222},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@kubb\u002Fmcp","Kubb MCP server"," (",[45,226,227],{},"kubb mcp",") through its ",[45,230,231],{},".mcp.json",". When you would rather describe what you want than run a command, the server lets Claude generate code against your config in conversation.",[29,234,236],{"id":235},"try-it-locally","Try it locally",[10,238,239],{},"Before installing from the marketplace, run the plugin straight from a checkout:",[53,241,243],{"language":55,"code":242,"class":58},"claude --plugin-dir .\u002Ftools\u002Fclaude",[45,244,245],{"class":61},[63,246,247,250,253],{"class":65,"style":66},[63,248,249],{"style":69},"claude",[63,251,252],{"style":77}," --plugin-dir",[63,254,255],{"style":73}," .\u002Ftools\u002Fclaude",[10,257,258,259,263,264,268],{},"The plugin is open source and lives in the ",[220,260,262],{"href":261},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb","kubb-labs\u002Fkubb"," repository. If you hit anything unexpected, open an issue on ",[220,265,267],{"href":266},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb\u002Fissues","GitHub",".",[10,270,271,272,268],{},"Kubb is community-driven. If it helps your team, consider ",[220,273,275],{"href":274},"https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fstijnvanhulle","sponsoring the project",[10,277,278,279],{},"👋🏽 ",[220,280,282],{"href":281},"https:\u002F\u002Ftwitter.com\u002Fstijnvanhulle","Stijn Van Hulle",{"title":284,"searchDepth":285,"depth":285,"links":286},"",5,[287,293,294,295,296],{"id":31,"depth":288,"text":32,"children":289},2,[290,292],{"id":39,"depth":291,"text":40},3,{"id":101,"depth":291,"text":102},{"id":147,"depth":288,"text":148},{"id":190,"depth":288,"text":191},{"id":214,"depth":288,"text":215},{"id":235,"depth":288,"text":236},"Install Kubb inside Claude Code and turn an OpenAPI spec into TypeScript types, Zod schemas, clients and React Query hooks without leaving the editor. Ships slash commands, a config skill, an expert agent and the Kubb MCP server.","md",{"layout":300,"title":5,"description":297,"outline":301,"image":15,"date":302},"doc","deep","2026-05-29",null,{"layout":300,"outline":301,"image":15,"date":302},true,"\u002Fblog\u002Fclaude-code-plugin",{"title":5,"description":297},{"loc":306,"images":309,"lastmod":302},[310],{"loc":15},"platform\u002Fapps\u002Fkubb.dev\u002Fcontent\u002Fblog\u002Fclaude-code-plugin.md","blog\u002Fclaude-code-plugin","YrEdSXCH3C-eVZSZYpZ2HUwEkqxfosGjxMH-ccbtUl0",false,1792276901654]