AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Nextjs Metadata Seo And File Conventions

skill-andrewsrigom-agent-skills-nextjs-metadata-seo-and-file-conventions · by andrewsrigom

Manage metadata and SEO surfaces in Next.js App Router. Use when tasks mention `metadata`, `generateMetadata`, `generateViewport`, `ImageResponse`, Open Graph or Twitter images, `robots.txt`, `sitemap.xml`, `manifest.json`, JSON-LD, canonical URLs, or deciding between metadata exports and metadata file conventions.

No reviews yet
0 installs
37 views
0.0% view→install

Install

$ agentstack add skill-andrewsrigom-agent-skills-nextjs-metadata-seo-and-file-conventions

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-andrewsrigom-agent-skills-nextjs-metadata-seo-and-file-conventions)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Nextjs Metadata Seo And File Conventions? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Next.js Metadata, SEO, and File Conventions

Use this skill when the task is mostly about search, sharing, metadata composition, or App Router file-convention outputs.

Scope

  • static metadata exports and dynamic generateMetadata
  • generateViewport
  • metadata files like robots.txt, sitemap.xml, manifest.json, and icons
  • Open Graph and Twitter image workflows
  • canonical URLs and structured data placement
  • choosing file conventions vs runtime functions

Routing cues

  • generateMetadata, metadata objects, OG images, Twitter images, robots.txt, sitemap, manifest, icons, canonical URLs, or JSON-LD -> use this skill
  • data loading and cache invalidation as the primary problem -> use nextjs-data-fetching-and-cache
  • Route Handlers or mutation boundaries as the primary concern -> use nextjs-server-actions-and-route-handlers

Default path

  1. Read [references/metadata-and-file-conventions.md](./references/metadata-and-file-conventions.md) first.
  2. Decide whether the output is static, request-aware, or generated from content state.
  3. Prefer file conventions for stable framework-owned outputs.
  4. Keep canonical URL logic and public URL assembly centralized.

When to deviate

  • Use generateMetadata only when metadata actually depends on params, search params, or fetched content.
  • Generate OG images at runtime only when static image assets are not enough.
  • Move to the data-fetching skill when the hard part is content loading or cache ownership rather than metadata composition.
  • Use a Route Handler only when the framework file convention does not own the output surface.

Quick example

import type { Metadata } from 'next'

export const metadata: Metadata = {
  title: 'Docs',
  description: 'Product documentation',
}

Guardrails

  • Prefer static metadata when values do not depend on request-time data.
  • Use generateMetadata only when metadata genuinely depends on params, search params, or fetched content.
  • Keep sitemap, robots, and canonical URLs derived from the same source of truth.
  • Use metadata file conventions instead of hand-rolled endpoints when the framework already owns the surface.
  • Treat OG-image generation as a public runtime surface with performance and cache implications.

Avoid

  • duplicating canonical URL assembly in multiple files
  • using runtime metadata generation for values that could be static
  • hand-rolling endpoints for robots.txt, sitemap, or manifest when the file convention already exists
  • mixing SEO logic with unrelated mutation or API concerns

Verification checklist

  • the surface is classified correctly as static, request-aware, or content-driven
  • file conventions are used where Next.js already provides them
  • canonical URLs, sitemap entries, and robots rules come from a shared source of truth
  • runtime OG image generation is justified rather than habitual
  • the response routes to cache or server-boundary skills if metadata is not the primary decision

Canonical APIs

  • metadata
  • generateMetadata
  • generateViewport
  • ImageResponse
  • robots.txt
  • sitemap.xml
  • manifest.json

Maintenance

  • Snapshot date: 2026-04-03
  • Package snapshot: next@16.2.2
  • Docs status snapshot: official docs group metadata exports and metadata files together under App Router metadata conventions

References

  • [Metadata and file conventions](./references/metadata-and-file-conventions.md)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.