import { e as createComponent, k as renderComponent, l as renderScript, r as renderTemplate, h as createAstro, m as maybeRenderHead, g as addAttribute, u as unescapeHTML } from '../chunks/astro/server_B-2LxKLH.mjs'; import 'piccolore'; import { _ as _export_sfc, $ as $$Base } from '../chunks/_plugin-vue_export-helper_B1lnwsE2.mjs'; import { useSSRContext, defineComponent, ref, mergeProps } from 'vue'; import { ssrRenderAttrs, ssrInterpolate } from 'vue/server-renderer'; import { g as getSkill } from '../chunks/skills_COWfD5oy.mjs'; import { marked } from 'marked'; export { renderers } from '../renderers.mjs'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "DeleteButton", props: { slug: {} }, setup(__props, { expose: __expose }) { __expose(); const props = __props; const deleting = ref(false); async function handleDelete() { if (!confirm(`Delete "${props.slug}"? This cannot be undone.`)) return; deleting.value = true; try { const res = await fetch(`/api/skills/${props.slug}`, { method: "DELETE" }); if (!res.ok && res.status !== 204) { throw new Error("Failed to delete"); } window.location.href = "/"; } catch { alert("Failed to delete skill."); deleting.value = false; } } const __returned__ = { props, deleting, handleDelete }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) { _push(``); } const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/DeleteButton.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; const DeleteButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]); const $$Astro = createAstro(); const $$slug = createComponent(async ($$result, $$props, $$slots) => { const Astro2 = $$result.createAstro($$Astro, $$props, $$slots); Astro2.self = $$slug; const { slug } = Astro2.params; const skill = await getSkill(slug); if (!skill) { return Astro2.redirect("/"); } const accept = Astro2.request.headers.get("accept") || ""; if (!accept.includes("text/html")) { return new Response(skill.raw, { headers: { "Content-Type": "text/markdown; charset=utf-8" } }); } const html = await marked(skill.content); const installCmd = `curl -fsSL ${Astro2.url.origin}/${slug} -o .claude/skills/${slug}.md`; return renderTemplate`${renderComponent($$result, "Base", $$Base, { "title": `${skill.name} \u2014 Skillit` }, { "default": async ($$result2) => renderTemplate` ${maybeRenderHead()}
${skill.description}
`}Run this in your project root. The skill file will be saved to .claude/skills/${slug}.md and Claude Code will load it automatically.
${installCmd} This skill uses: ${skill["allowed-tools"].join(", ")}. Claude will have access to these tools when this skill is active.
`}