[{"data":1,"prerenderedAt":297},["ShallowReactive",2],{"page:\u002Fblog\u002Fclaude-code-plugin":3},{"id":4,"title":5,"body":6,"description":280,"extension":281,"frontmatter":282,"heading":286,"meta":287,"navigation":288,"order":286,"path":289,"seo":290,"sitemap":291,"source":294,"stem":295,"__hash__":296},"site\u002Fblog\u002Fclaude-code-plugin.md","Kubb as a Claude Code plugin",{"type":7,"value":8,"toc":266},"minimark",[9,16,20,23,28,33,120,131,135,138,152,163,174,178,191,198,202,219,223,226,239,252,259],[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,88,92],"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,75],"code-group",{},[53,54,59],"pre",{"language":55,"filename":56,"code":57,"class":58},"shell","Project","npm install -D kubb","highlights",[45,60,62],{"class":61},"language-shell",[63,64,67,71],"span",{"class":65,"style":66},"line","display: inline",[63,68,70],{"style":69},"color:#6f42c1;--hls-dark:#b392f0","npm ",[63,72,74],{"style":73},"color:#24292e;--hls-dark:#e1e4e8","install -D kubb",[53,76,79],{"language":55,"filename":77,"code":78,"class":58},"Global","npm install -g kubb",[45,80,81],{"class":61},[63,82,83,85],{"class":65,"style":66},[63,84,70],{"style":69},[63,86,87],{"style":73},"install -g kubb",[37,89,91],{"id":90},"add-the-marketplace-and-plugin","Add the marketplace and plugin",[53,93,96],{"language":55,"filename":94,"code":95,"class":58},"Claude Code","\u002Fplugin marketplace add kubb-labs\u002Fkubb\n\u002Fplugin install kubb@kubb",[45,97,98,106,107],{"class":61},[63,99,100,103],{"class":65,"style":66},[63,101,102],{"style":69},"\u002Fplugin ",[63,104,105],{"style":73},"marketplace add kubb-labs\u002Fkubb","\n",[63,108,109,111,114,117],{"class":65,"style":66},[63,110,102],{"style":69},[63,112,113],{"style":73},"install kubb",[63,115,116],{"style":73},"@",[63,118,119],{"style":73},"kubb",[24,121,123,124,127,128,130],{"as":122},"note","A ",[45,125,126],{},"SessionStart"," hook checks for ",[45,129,119],{}," when a session starts and warns you when it is missing. It never installs anything itself, so nothing runs behind your back.",[29,132,134],{"id":133},"three-slash-commands","Three slash commands",[10,136,137],{},"The plugin maps the Kubb CLI to commands you can call from a Claude Code session.",[10,139,140,143,144,147,148,151],{},[45,141,142],{},"\u002Fkubb:init [input] [output] [plugins]"," scaffolds a ",[45,145,146],{},"kubb.config.ts"," and installs the ",[45,149,150],{},"@kubb\u002Fplugin-*"," packages you pick. Point it at a spec to start:",[53,153,156],{"language":154,"code":155,"class":58},"text","\u002Fkubb:init .\u002Fpetstore.yaml",[45,157,159],{"class":158},"language-text",[63,160,161],{"class":65,"style":66},[63,162,155],{"style":73},[10,164,165,166,169,170,173],{},"Claude asks which outputs you want, writes the config, and installs the packages. Run ",[45,167,168],{},"\u002Fkubb:generate"," to re-run codegen whenever the spec changes, and ",[45,171,172],{},"\u002Fkubb:validate \u003Cspec>"," to check an OpenAPI or Swagger document before you generate from it.",[29,175,177],{"id":176},"a-skill-and-an-agent","A skill and an agent",[10,179,180,181,184,185,187,188,190],{},"The ",[45,182,183],{},"config"," skill teaches Claude how to write ",[45,186,146],{}," and which ",[45,189,150],{}," package maps to which output, so the config is correct rather than guessed.",[10,192,193,194,197],{},"For bigger jobs, the ",[45,195,196],{},"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,199,201],{"id":200},"the-mcp-server-bundled","The MCP server, bundled",[10,203,204,205,210,211,214,215,218],{},"The plugin wires in the ",[206,207,209],"a",{"href":208},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@kubb\u002Fmcp","Kubb MCP server"," (",[45,212,213],{},"kubb mcp",") through its ",[45,216,217],{},".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,220,222],{"id":221},"try-it-locally","Try it locally",[10,224,225],{},"Before installing from the marketplace, run the plugin straight from a checkout:",[53,227,229],{"language":55,"code":228,"class":58},"claude --plugin-dir .\u002Ftools\u002Fclaude",[45,230,231],{"class":61},[63,232,233,236],{"class":65,"style":66},[63,234,235],{"style":69},"claude ",[63,237,238],{"style":73},"--plugin-dir .\u002Ftools\u002Fclaude",[10,240,241,242,246,247,251],{},"The plugin is open source and lives in the ",[206,243,245],{"href":244},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb","kubb-labs\u002Fkubb"," repository. If you hit anything unexpected, open an issue on ",[206,248,250],{"href":249},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb\u002Fissues","GitHub",".",[10,253,254,255,251],{},"Kubb is community-driven. If it helps your team, consider ",[206,256,258],{"href":257},"https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fstijnvanhulle","sponsoring the project",[10,260,261,262],{},"👋🏽 ",[206,263,265],{"href":264},"https:\u002F\u002Ftwitter.com\u002Fstijnvanhulle","Stijn Van Hulle",{"title":267,"searchDepth":268,"depth":268,"links":269},"",5,[270,276,277,278,279],{"id":31,"depth":271,"text":32,"children":272},2,[273,275],{"id":39,"depth":274,"text":40},3,{"id":90,"depth":274,"text":91},{"id":133,"depth":271,"text":134},{"id":176,"depth":271,"text":177},{"id":200,"depth":271,"text":201},{"id":221,"depth":271,"text":222},"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":283,"title":5,"description":280,"outline":284,"image":15,"date":285},"doc","deep","2026-05-29",null,{"layout":283,"outline":284,"image":15,"date":285},true,"\u002Fblog\u002Fclaude-code-plugin",{"title":5,"description":280},{"loc":289,"images":292,"lastmod":285},[293],{"loc":15},"platform\u002Fapps\u002Fkubb.dev\u002Fcontent\u002Fblog\u002Fclaude-code-plugin.md","blog\u002Fclaude-code-plugin","mAy4uj-b6rrUntUOo5XFuHNfmPWgCE2ryq2FHO_m_IM",1792931638105]