MCPcopy
hub / github.com/pqoqubbw/icons / GET

Function GET

app/skill.md/route.ts:4–79  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

2import { SERVER_EVENT, trackServer } from "@/lib/server-analytics";
3
4export function GET(req: Request) {
5 trackServer(SERVER_EVENT.LLMS_VIEW, {
6 page: "skill.md",
7 userAgent: req.headers.get("user-agent") ?? "",
8 });
9 const content = `---
10name: ${SITE.NAME}
11description: Install and use animated React icons from ${SITE.URL}
12---
13
14# ${SITE.NAME} skill
15
16> For the complete documentation index, see [llms.txt](${SITE.URL}/llms.txt). Per-icon markdown is at \`${SITE.URL}/icons/<name>.md\`. An MCP server is available at \`${SITE.URL}/mcp\`.
17
18Use this skill when a user asks to add an animated icon to a React or Next.js project, or when they reference ${SITE.NAME}.
19
20## Discover available icons
21
22- Index of all icons: ${SITE.URL}/llms.txt
23- Full corpus (long-context): ${SITE.URL}/llms-full.txt
24- Per-icon docs: ${SITE.URL}/icons/<name>.md (replace \`<name>\` with kebab-case icon name)
25
26Icon names follow Lucide's kebab-case convention (\`activity\`, \`arrow-right\`, \`circle-check\`, etc.).
27
28## Install one icon
29
30Use the shadcn CLI:
31
32\`\`\`bash
33npx shadcn@latest add "${SITE.URL}/r/<icon-name>.json"
34\`\`\`
35
36This drops a single React component file into the user's project under \`components/icons/<icon-name>.tsx\` and adds \`motion\` to dependencies if missing.
37
38## Use the component
39
40\`\`\`tsx
41import { Activity } from "@/components/icons/activity";
42
43export function Demo() {
44 return <Activity className="size-6" />;
45}
46\`\`\`
47
48The component name is the PascalCase form of the icon's kebab-case name. Components animate on hover by default. All props from \`SVGProps<SVGSVGElement>\` are forwarded, so you can pass \`className\`, \`onClick\`, \`aria-label\`, etc.
49
50## Constraints
51
52- Requires React 18 or newer.
53- Requires \`motion\` (added automatically by the shadcn CLI when installing the first icon).
54- Tailwind CSS is recommended for sizing/coloring but not required.
55- MIT licensed (${LINK.LICENSE}) — free for personal and commercial use.
56
57## MCP tools (optional)
58
59An MCP server is available at \`${SITE.URL}/mcp\` (Streamable HTTP). Tools: \`search_icons\` (fuzzy lookup by name/keyword), \`list_icons\` (paginated list), \`get_icon\` (install command + usage snippet for one icon). Use these when you have an MCP-compatible host instead of fetching markdown.
60
61## Common pitfalls

Callers

nothing calls this directly

Calls 1

trackServerFunction · 0.90

Tested by

no test coverage detected