Agent skill
managing-seo-metadata
Strategies for dynamic SEO using Next.js Metadata API. Use to generate social share cards and search-engine-friendly titles for tours.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/managing-seo-metadata
SKILL.md
SEO and Metadata Strategy
When to use this skill
- Any page intended for public discovery (Tours, Destinations, Blog).
- Creating dynamic OpenGraph (OG) images for social media sharing.
Workflow
- Use
export const metadatafor static pages. - Use
export async function generateMetadatafor dynamic routes (tours/[id]). - Fetch the tour data inside
generateMetadatato populate tags.
Example (Dynamic Metadata)
export async function generateMetadata({ params }): Promise<Metadata> {
const { id } = await params;
const tour = await TourService.getById(id);
return {
title: `${tour.title} | Tourly`,
description: tour.description.substring(0, 160),
openGraph: {
images: [tour.images[0]],
},
};
}
Instructions
- Memoization: Next.js automatically deduplicates fetch requests between
generateMetadataand your Page component. - Defaults: Set a global
title.templateinroot layout.tsx(e.g.,%s | Tourly). - Canonical: Always include
canonicalURLs to prevent duplicate content issues.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?