skills/aayushbaniya2006/seo-handler/SKILL.md
Manage SEO, sitemaps, and metadata for optimal search engine visibility
npx skillsauth add aiskillstore/marketplace seo-handlerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill ensures your Next.js application is optimized for search engines. It covers sitemaps, metadata (OpenGraph), server-side rendering (SSR/ISR), structured data (JSON-LD), and robots.txt configuration.
src/app/sitemap.ts.layout.tsx for defaults; override in page.tsx.next-seo components (JSON-LD) on every content page.src/app/robots.ts to guide crawlers.File: src/app/sitemap.ts
When adding a new public route (e.g., /features), add it to the staticPages array.
const staticPages = [
"", // Home
"/features", // New page
// ...
];
If you have >50k URLs (e.g., user profiles, products), use generateSitemaps.
File: src/app/products/sitemap.ts
import { BASE_URL } from '@/lib/constants';
export async function generateSitemaps() {
// Fetch total count and divide by batch size (e.g., 50,000)
return [{ id: 0 }, { id: 1 }];
}
export default async function sitemap({ id }: { id: { id: number } }) {
const start = id.id * 50000;
const products = await getProducts(start, 50000);
return products.map(product => ({
url: `${BASE_URL}/products/${product.slug}`,
lastModified: product.updatedAt,
}));
}
Base Layout: src/app/layout.tsx (or group layout) defines the template.
export const metadata: Metadata = {
title: {
template: "%s | My App",
default: "My App - The Best SaaS",
},
description: "...",
openGraph: { ... }, // Default OG
};
Page Level: src/app/blog/[slug]/page.tsx
export async function generateMetadata({ params }): Promise<Metadata> {
const post = await getPost(params.slug);
return {
title: post.title,
description: post.summary,
openGraph: {
images: [post.coverImage], // Overrides default
},
};
}
Use next-seo components to inject JSON-LD structured data. This helps search engines understand your content (Articles, Products, FAQs, etc.).
Page Component: src/app/blog/[slug]/page.tsx
import { ArticleJsonLd } from "next-seo";
export default function BlogPost({ post }) {
return (
<>
<ArticleJsonLd
useAppDir
url={`https://myapp.com/blog/${post.slug}`}
title={post.title}
images={[post.image]}
datePublished={post.date}
authorName="My App"
description={post.description}
/>
<article>...</article>
</>
);
}
If a specific schema isn't supported by next-seo, use a raw script tag. Wrap in Suspense if the data fetching is async.
import { Suspense } from "react";
export default function Page() {
const jsonLd = {
'@context': 'https://schema.org',
'@type': 'CustomType',
name: 'Custom Name',
description: 'Description',
};
return (
<section>
<Suspense fallback={null}>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
</Suspense>
{/* Page Content */}
</section>
);
}
For content pages (Blogs, Docs, Marketing) that rely on database content, use ISR to cache them at the edge.
Page Component:
// src/app/blog/[slug]/page.tsx
// 1. Enable ISR
export const revalidate = 3600; // Revalidate every hour (in seconds)
// OR use dynamic params with generateStaticParams for full static export behavior
export const dynamicParams = true;
export async function generateStaticParams() {
const posts = await db.query.posts.findMany();
return posts.map((post) => ({ slug: post.slug }));
}
export default async function BlogPost({ params }) {
// 2. Fetch on Server (Data is cached based on revalidate config)
const post = await getPost(params.slug);
return <article>{/* ... */}</article>;
}
File: src/app/robots.ts
Ensure you disallow private routes (/api/, /app/, /admin/) to save crawl budget.
export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: "*",
allow: "/",
disallow: ["/api/", "/app/", "/super-admin/"],
},
sitemap: `${process.env.NEXT_PUBLIC_APP_URL}/sitemap.xml`,
};
}
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.