"use client"; import { use } from "react"; import { ArrowLeft, FileText, Folder } from "lucide-react"; import Link from "next/link"; import { useSkill } from "@/lib/hooks"; import { Markdown } from "@/components/Markdown"; export default function SkillDetailPage({ params }: { params: Promise<{ name: string }> }) { const { name } = use(params); const { data, isLoading } = useSkill(name); // Strip YAML frontmatter for rendering let content = data?.content || ""; if (content.startsWith("---")) { const end = content.indexOf("---", 3); if (end > 0) content = content.slice(end + 3).trim(); } return (

{name}

{isLoading ? (
) : data ? ( <> {data.linked_files && Object.keys(data.linked_files).length > 0 && (
Linked Files
{Object.entries(data.linked_files).map(([dir, files]) => (files as string[]).map((f) => (
{dir}/{f}
)) )}
)}
) : (

Skill not found

)}
); }