[{"data":1,"prerenderedAt":328},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fai\u002Fclaude":3},{"id":4,"title":5,"body":6,"description":309,"extension":310,"frontmatter":311,"heading":5,"meta":319,"navigation":321,"order":315,"path":322,"seo":323,"sitemap":324,"source":325,"stem":326,"__hash__":327},"docs\u002Fdocs\u002F5.x\u002Fai\u002Fclaude.md","Set up the Claude Code plugin",{"type":7,"value":8,"toc":299},"minimark",[9,24,29,32,68,75,88,98,108,112,119,182,185,207,211,218,222,225,265,269,288],[10,11,12,13,18,19,23],"p",{},"Kubb ships a ",[14,15,17],"a",{"href":16},"https:\u002F\u002Fcode.claude.com","Claude Code"," plugin. It adds slash commands and an agent\nthat generate code from an OpenAPI spec. The commands run the ",[20,21,22],"code",{},"kubb"," CLI, so a build you start in\nthe chat matches the one you run in a terminal.",[25,26,28],"h2",{"id":27},"install","Install",[10,30,31],{},"The Kubb repository is also a plugin marketplace. Add it, then install the plugin:",[33,34,39],"pre",{"language":35,"filename":36,"code":37,"class":38},"shell","Terminal","\u002Fplugin marketplace add kubb-labs\u002Fkubb\n\u002Fplugin install kubb@kubb","highlights",[20,40,42,55,56],{"class":41},"language-shell",[43,44,47,51],"span",{"class":45,"style":46},"line","display: inline",[43,48,50],{"style":49},"color:#6f42c1;--hls-dark:#b392f0","\u002Fplugin ",[43,52,54],{"style":53},"color:#24292e;--hls-dark:#e1e4e8","marketplace add kubb-labs\u002Fkubb","\n",[43,57,58,60,63,66],{"class":45,"style":46},[43,59,50],{"style":49},[43,61,62],{"style":53},"install kubb",[43,64,65],{"style":53},"@",[43,67,22],{"style":53},[10,69,70,71,74],{},"The commands run ",[20,72,73],{},"npx kubb",", so install Kubb yourself, either in the project or globally:",[33,76,78],{"language":35,"filename":36,"code":77,"class":38},"npm install -D kubb",[20,79,80],{"class":41},[43,81,82,85],{"class":45,"style":46},[43,83,84],{"style":49},"npm ",[43,86,87],{"style":53},"install -D kubb",[10,89,90,91,94,95,97],{},"A ",[20,92,93],{},"SessionStart"," hook checks for ",[20,96,22],{}," at session start and warns you if it's missing, but it\nnever installs anything for you.",[10,99,100,103,104,107],{},[20,101,102],{},"kubb init"," installs the ",[20,105,106],{},"@kubb\u002Fplugin-*"," packages you select.",[25,109,111],{"id":110},"commands","Commands",[10,113,114,115,118],{},"The commands mirror the Kubb CLI, namespaced under ",[20,116,117],{},"kubb:",".",[120,121,122,135],"table",{},[123,124,125],"thead",{},[126,127,128,132],"tr",{},[129,130,131],"th",{},"Command",[129,133,134],{},"What it does",[136,137,138,155,169],"tbody",{},[126,139,140,146],{},[141,142,143],"td",{},[20,144,145],{},"\u002Fkubb:init [input] [output] [plugins]",[141,147,148,149,152,153,118],{},"Scaffold ",[20,150,151],{},"kubb.config.ts"," and install plugins with ",[20,154,102],{},[126,156,157,162],{},[141,158,159],{},[20,160,161],{},"\u002Fkubb:generate [input]",[141,163,164,165,168],{},"Run ",[20,166,167],{},"kubb generate"," and report what changed.",[126,170,171,176],{},[141,172,173],{},[20,174,175],{},"\u002Fkubb:validate \u003Cspec>",[141,177,178,179,118],{},"Validate an OpenAPI or Swagger spec with ",[20,180,181],{},"kubb validate",[10,183,184],{},"A typical first run:",[33,186,189],{"language":187,"filename":36,"code":188,"class":38},"text","\u002Fkubb:validate .\u002FpetStore.yaml\n\u002Fkubb:init .\u002FpetStore.yaml .\u002Fsrc\u002Fgen plugin-ts,plugin-axios,plugin-zod,plugin-react-query\n\u002Fkubb:generate",[20,190,192,55,197,55,202],{"class":191},"language-text",[43,193,194],{"class":45,"style":46},[43,195,196],{"style":53},"\u002Fkubb:validate .\u002FpetStore.yaml",[43,198,199],{"class":45,"style":46},[43,200,201],{"style":53},"\u002Fkubb:init .\u002FpetStore.yaml .\u002Fsrc\u002Fgen plugin-ts,plugin-axios,plugin-zod,plugin-react-query",[43,203,204],{"class":45,"style":46},[43,205,206],{"style":53},"\u002Fkubb:generate",[25,208,210],{"id":209},"agent","Agent",[10,212,213,214,217],{},"The ",[20,215,216],{},"kubb-expert"," agent handles \"add Kubb to my project\" from start to finish. It validates the\nspec, picks plugins, scaffolds the config, and runs generation.",[25,219,221],{"id":220},"skills","Skills",[10,223,224],{},"Two skills load on their own when the work calls for them, so you never invoke them directly.",[120,226,227,237],{},[123,228,229],{},[126,230,231,234],{},[129,232,233],{},"Skill",[129,235,236],{},"When it loads",[136,238,239,255],{},[126,240,241,246],{},[141,242,243],{},[20,244,245],{},"config",[141,247,248,249,251,252,254],{},"Authoring a ",[20,250,151],{},", picking ",[20,253,106],{}," packages, or debugging generated output.",[126,256,257,262],{},[141,258,259],{},[20,260,261],{},"output",[141,263,264],{},"Writing app or test code that imports the generated types, clients, hooks, schemas, and mocks.",[25,266,268],{"id":267},"conversational-generation","Conversational generation",[10,270,271,272,275,276,279,280,283,284,287],{},"The plugin also registers the Kubb MCP server (",[20,273,274],{},"kubb mcp","). Describe what you want instead of\ntyping a command. Claude then calls the server's ",[20,277,278],{},"validate"," and ",[20,281,282],{},"generate"," tools, or runs the\nmatching ",[20,285,286],{},"\u002Fkubb:"," command, and both produce the same files.",[10,289,290,291,293,294,298],{},"Start Claude Code from your project root, so the server finds your ",[20,292,151],{},". See\n",[14,295,297],{"href":296},"\u002Fdocs\u002F5.x\u002Fai\u002Fmcp","MCP"," for the tools and for other clients.",{"title":300,"searchDepth":301,"depth":301,"links":302},"",5,[303,305,306,307,308],{"id":27,"depth":304,"text":28},2,{"id":110,"depth":304,"text":111},{"id":209,"depth":304,"text":210},{"id":220,"depth":304,"text":221},{"id":267,"depth":304,"text":268},"The Kubb Claude Code plugin adds slash commands and an agent that run Kubb code generation from inside Claude Code.","md",{"layout":312,"title":5,"description":309,"outline":313,"order":315,"navigation":316},"doc",[304,314],3,1,{"title":317,"icon":318},"Claude","i-simple-icons-claude",{"layout":312,"outline":320},[304,314],{"title":317,"icon":318},"\u002Fdocs\u002F5.x\u002Fai\u002Fclaude",{"title":5,"description":309},{"loc":322},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fai\u002Fclaude.md","docs\u002F5.x\u002Fai\u002Fclaude","wCLGadypSoqv5KxU_kewbD_MA0GYNJ9Q08VlBZgjQ_k",1792931639390]