[{"data":1,"prerenderedAt":272},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-agent-skill":77,"-getting-started-agent-skill-surround":267},[4,35,56],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25,30],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F3.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F4.configuration","i-lucide-settings",{"title":26,"path":27,"stem":28,"icon":29},"Supported Formats","\u002Fgetting-started\u002Fsupported-formats","1.getting-started\u002F5.supported-formats","i-lucide-file-code",{"title":31,"path":32,"stem":33,"icon":34},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F6.agent-skill","i-lucide-cpu",{"title":36,"path":37,"stem":38,"children":39,"icon":41},"Reporters","\u002Freporters","2.reporters\u002F1.index",[40,42,46,51],{"title":36,"path":37,"stem":38,"icon":41},"i-lucide-file-chart-column",{"title":43,"path":44,"stem":45,"icon":29},"HTML Reporter","\u002Freporters\u002Fhtml","2.reporters\u002F2.html",{"title":47,"path":48,"stem":49,"icon":50},"JSON Reporter","\u002Freporters\u002Fjson","2.reporters\u002F3.json","i-lucide-braces",{"title":52,"path":53,"stem":54,"icon":55},"Badge Reporter","\u002Freporters\u002Fbadge","2.reporters\u002F4.badge","i-lucide-award",{"title":57,"path":58,"stem":59,"children":60,"icon":62},"API","\u002Fapi","3.api\u002F1.index",[61,63,68,73],{"title":57,"path":58,"stem":59,"icon":62},"i-lucide-code",{"title":64,"path":65,"stem":66,"icon":67},"Core Package","\u002Fapi\u002Fcore","3.api\u002F2.core","i-lucide-box",{"title":69,"path":70,"stem":71,"icon":72},"Server API","\u002Fapi\u002Fserver","3.api\u002F3.server","i-lucide-server",{"title":74,"path":75,"stem":76,"icon":67},"MCP Server","\u002Fapi\u002Fmcp-server","3.api\u002F4.mcp-server",{"id":78,"title":31,"body":79,"description":259,"extension":260,"links":261,"meta":262,"navigation":263,"path":32,"seo":264,"stem":33,"__hash__":266},"docs\u002F1.getting-started\u002F6.agent-skill.md",{"type":80,"value":81,"toc":251},"minimark",[82,87,99,102,132,135,139,142,171,175,181,202,205,213,216,220,247],[83,84,86],"h2",{"id":85},"overview","Overview",[88,89,90,91,98],"p",{},"jscpd includes an agent skill for ",[92,93,97],"a",{"href":94,"rel":95},"https:\u002F\u002Fskills.sh",[96],"nofollow","skills.sh"," that teaches AI coding assistants (Claude, Copilot, Gemini, Cursor, and others) how to detect and eliminate code duplication automatically.",[83,100,16],{"id":101},"installation",[103,104,110],"pre",{"className":105,"code":106,"filename":107,"language":108,"meta":109,"style":109},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npx skills add kucherenko\u002Fjscpd\n","Terminal","bash","",[111,112,113],"code",{"__ignoreMap":109},[114,115,118,122,126,129],"span",{"class":116,"line":117},"line",1,[114,119,121],{"class":120},"sBMFI","npx",[114,123,125],{"class":124},"sfazB"," skills",[114,127,128],{"class":124}," add",[114,130,131],{"class":124}," kucherenko\u002Fjscpd\n",[88,133,134],{},"Once installed, the skill is available to your AI assistant in any project.",[83,136,138],{"id":137},"what-the-skill-does","What the Skill Does",[88,140,141],{},"When activated, the skill instructs the agent to:",[143,144,145,153,156,159,162,165,168],"ol",{},[146,147,148,149,152],"li",{},"Run jscpd with the ",[111,150,151],{},"ai"," reporter on the target path",[146,154,155],{},"Parse the detected clone pairs (file paths + line ranges)",[146,157,158],{},"Read both duplicated code fragments from the source files",[146,160,161],{},"Design a refactoring — extracting a shared function, module, constant, or base class",[146,163,164],{},"Apply the refactoring and update all call sites",[146,166,167],{},"Re-run jscpd to confirm the duplication is eliminated",[146,169,170],{},"Repeat for remaining clones, highest-impact first",[83,172,174],{"id":173},"how-it-uses-the-ai-reporter","How It Uses the AI Reporter",[88,176,177,178,180],{},"The skill uses the ",[111,179,151],{}," reporter, which produces compact, token-efficient output optimized for agent consumption:",[103,182,184],{"className":105,"code":183,"filename":107,"language":108,"meta":109,"style":109},"npx jscpd --reporters ai .\u002Fsrc\n",[111,185,186],{"__ignoreMap":109},[114,187,188,190,193,196,199],{"class":116,"line":117},[114,189,121],{"class":120},[114,191,192],{"class":124}," jscpd",[114,194,195],{"class":124}," --reporters",[114,197,198],{"class":124}," ai",[114,200,201],{"class":124}," .\u002Fsrc\n",[88,203,204],{},"Example output:",[103,206,211],{"className":207,"code":209,"language":210},[208],"language-text","Clones:\nsrc\u002Futils\u002F auth.ts:10-25 ~ helpers.ts:40-55\nsrc\u002Futils\u002Fauth.ts 30-45 ~ 80-95\n---\n2 clones · 3.1% duplication\n","text",[111,212,209],{"__ignoreMap":109},[88,214,215],{},"This format uses ~79% fewer tokens than the default reporter, keeping context usage low while giving the agent everything it needs to locate and fix each duplication.",[83,217,219],{"id":218},"more-information","More Information",[221,222,223,231,242],"ul",{},[146,224,225,226],{},"Skill page: ",[92,227,230],{"href":228,"rel":229},"https:\u002F\u002Fskills.sh\u002Fkucherenko\u002Fjscpd",[96],"skills.sh\u002Fkucherenko\u002Fjscpd",[146,232,233,234,241],{},"Source: ",[92,235,238],{"href":236,"rel":237},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Fblob\u002Fmaster\u002FSKILL.md",[96],[111,239,240],{},"SKILL.md"," in the jscpd repository",[146,243,244,245],{},"AI Reporter docs: ",[92,246,36],{"href":37},[248,249,250],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":109,"searchDepth":252,"depth":252,"links":253},2,[254,255,256,257,258],{"id":85,"depth":252,"text":86},{"id":101,"depth":252,"text":16},{"id":137,"depth":252,"text":138},{"id":173,"depth":252,"text":174},{"id":218,"depth":252,"text":219},"Use jscpd with AI coding assistants to automatically detect and refactor code duplications.","md",null,{},{"icon":34},{"title":31,"description":265},"Install the jscpd agent skill to let AI assistants detect and refactor code duplications automatically.","xkvRDAGe4Xx-C3ToH_U11KFBPMleOxXTsHty8y_3VIs",[268,270],{"title":26,"path":27,"stem":28,"description":269,"icon":29,"children":-1},"Languages and formats supported by jscpd.",{"title":36,"path":37,"stem":38,"description":271,"icon":41,"children":-1},"Output formats and reporters in jscpd.",1776416735926]