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