Skip to content

aiskillstore/marketplace / skills/abdulsamad94/next-js-patterns

next-js-patterns

Verified

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

FileKindSize
SKILL.mdskill md1.5 KB
skill-report.jsonconfig18.6 KB

skill-report.json

View on GitHub
{
  "schema_version": "2.0",
  "meta": {
    "generated_at": "2026-07-18T09:50:13.099Z",
    "slug": "abdulsamad94-next-js-patterns",
    "source_url": "https://github.com/AbdulSamad94/Hackhaton-SpecsKitPlus/tree/master/.claude/skills/nextjs",
    "source_ref": "master",
    "model": "claude",
    "analysis_version": "3.0.0",
    "source_type": "community",
    "content_hash": "1b265ebe35aaedbb362ef578e4759327b649f573e1dfd98647ae41f57e250356",
    "tree_hash": "8fa161afddc1100e8b75acde5cda6d498b5588a1a7e8387f61aa10c9405b62e1",
    "provenance": {
      "model_effective": "claude",
      "fallback_chain": [
        {
          "agent": "codex",
          "outcome": "failed",
          "error": "2026-07-18T09:50:13.629262Z ERROR codex_models_manager::manager: failed to refresh available models: Missing environment variable: `HELM_API_KEY`.\n2026-07-18T09:50:13.650398Z ERROR codex_models_manage…"
        },
        {
          "agent": "claude",
          "outcome": "success"
        }
      ],
      "analysis_version": "3.0.0"
    }
  },
  "skill": {
    "name": "Next.js Patterns",
    "description": "Guides Next.js App Router structure, navigation, data fetching, font loading, and metadata patterns.",
    "summary": "Apply project-focused Next.js App Router conventions.",
    "icon": "📦",
    "author": "AbdulSamad94",
    "license": "MIT",
    "category": "coding",
    "tags": [
      "nextjs",
      "app-router",
      "react",
      "server-components",
      "routing"
    ],
    "supported_tools": [
      "claude",
      "codex",
      "claude-code"
    ],
    "risk_factors": [
      "external_commands",
      "network"
    ]
  },
  "security_audit": {
    "risk_level": "safe",
    "is_blocked": false,
    "safe_to_publish": true,
    "analysis_status": "ok",
    "summary": "All 13 external-command detections are false positives caused by Markdown inline code and fenced TypeScript examples. The single network detection is documentation that recommends ordinary application data fetching and contains no endpoint, credential, or exfiltration instruction. No prompt injection, deceptive instruction, or other intent-level security concern was found.",
    "remediation": [],
    "risk_factor_evidence": [
      {
        "factor": "external_commands",
        "evidence": [
          {
            "file": "SKILL.md",
            "line_start": 9,
            "line_end": 9
          },
          {
            "file": "SKILL.md",
            "line_start": 12,
            "line_end": 12
          },
          {
            "file": "SKILL.md",
            "line_start": 14,
            "line_end": 14
          },
          {
            "file": "SKILL.md",
            "line_start": 17,
            "line_end": 17
          },
          {
            "file": "SKILL.md",
            "line_start": 21,
            "line_end": 21
          },
          {
            "file": "SKILL.md",
            "line_start": 22,
            "line_end": 22
          },
          {
            "file": "SKILL.md",
            "line_start": 24,
            "line_end": 34
          },
          {
            "file": "SKILL.md",
            "line_start": 34,
            "line_end": 37
          },
          {
            "file": "SKILL.md",
            "line_start": 37,
            "line_end": 38
          },
          {
            "file": "SKILL.md",
            "line_start": 38,
            "line_end": 38
          },
          {
            "file": "SKILL.md",
            "line_start": 41,
            "line_end": 41
          },
          {
            "file": "SKILL.md",
            "line_start": 42,
            "line_end": 45
          },
          {
            "file": "SKILL.md",
            "line_start": 45,
            "line_end": 45
          }
        ]
      },
      {
        "factor": "network",
        "evidence": [
          {
            "file": "SKILL.md",
            "line_start": 37,
            "line_end": 37
          }
        ]
      }
    ],
    "static_findings": [
      {
        "id": "external_commands:SKILL.md:9:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 9,
        "line_end": 9,
        "snippet": "We use the Next.js 15 App Router located in `app/`."
      },
      {
        "id": "external_commands:SKILL.md:12:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 12,
        "line_end": 12,
        "snippet": "- **Location**: `app/[route]/page.tsx`"
      },
      {
        "id": "external_commands:SKILL.md:14:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 14,
        "line_end": 14,
        "snippet": "- **Client vs Server**: Use `\"use client\"` directive at the top for components requiring state (`use"
      },
      {
        "id": "external_commands:SKILL.md:17:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 17,
        "line_end": 17,
        "snippet": "- **Location**: `app/layout.tsx` (Root), `app/[route]/layout.tsx` (Nested)."
      },
      {
        "id": "external_commands:SKILL.md:21:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 21,
        "line_end": 21,
        "snippet": "- Use `Link` from `next/link` for internal navigation."
      },
      {
        "id": "external_commands:SKILL.md:22:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 22,
        "line_end": 22,
        "snippet": "- Use `useRouter` from `next/navigation` for programmatic navigation (inside Client Components)."
      },
      {
        "id": "external_commands:SKILL.md:24:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 24,
        "line_end": 34,
        "snippet": "```tsx"
      },
      {
        "id": "external_commands:SKILL.md:34:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 34,
        "line_end": 37,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:37:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 37,
        "line_end": 38,
        "snippet": "- **Server Components**: Fetch directly using `await fetch()` or DB calls."
      },
      {
        "id": "external_commands:SKILL.md:38:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 38,
        "line_end": 38,
        "snippet": "- **Client Components**: Use `useEffect` or SWR/TanStack Query (if added later). Currently using sta"
      },
      {
        "id": "external_commands:SKILL.md:41:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 41,
        "line_end": 41,
        "snippet": "- We use `next/font/google` (e.g., Poppins) in `app/layout.tsx`."
      },
      {
        "id": "external_commands:SKILL.md:42:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 42,
        "line_end": 45,
        "snippet": "- Variable fonts are passed to `body` className."
      },
      {
        "id": "external_commands:SKILL.md:45:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 45,
        "line_end": 45,
        "snippet": "- Define `export const metadata: Metadata = { ... }` in `page.tsx` or `layout.tsx` for SEO."
      },
      {
        "id": "network:SKILL.md:37:fetch-api-call",
        "category": "network",
        "severity": "low",
        "pattern": "Fetch API call",
        "file": "SKILL.md",
        "line_start": 37,
        "line_end": 37,
        "snippet": "- **Server Components**: Fetch directly using `await fetch()` or DB calls."
      }
    ],
    "finding_verdicts": [
      {
        "id": "external_commands:SKILL.md:9:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks mark the App Router directory in Markdown. This is prose and does not execute a shell command."
      },
      {
        "id": "external_commands:SKILL.md:12:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks format a Next.js page path as inline code. No command is invoked."
      },
      {
        "id": "external_commands:SKILL.md:14:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "This line documents React directives and hooks using Markdown code formatting. It contains no shell execution."
      },
      {
        "id": "external_commands:SKILL.md:17:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks identify layout file paths in documentation. They are not executable command substitutions."
      },
      {
        "id": "external_commands:SKILL.md:21:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The line names a Next.js component and module using inline code. It does not run an external command."
      },
      {
        "id": "external_commands:SKILL.md:22:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The line documents a Next.js navigation hook and module. It contains no executable shell syntax."
      },
      {
        "id": "external_commands:SKILL.md:24:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "This is the opening fence of a TypeScript example. Markdown fences do not execute commands."
      },
      {
        "id": "external_commands:SKILL.md:34:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "This is the closing fence of a TypeScript example. It has no execution behavior."
      },
      {
        "id": "external_commands:SKILL.md:37:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.98,
        "reason": "The line recommends standard Next.js data fetching in prose. Inline code formatting is not shell execution."
      },
      {
        "id": "external_commands:SKILL.md:38:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The line names client-side React data-fetching approaches in documentation. No command execution is present."
      },
      {
        "id": "external_commands:SKILL.md:41:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks format a Next.js font module and file path. The prose does not execute either item."
      },
      {
        "id": "external_commands:SKILL.md:42:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks format a CSS class name in documentation. There is no shell command."
      },
      {
        "id": "external_commands:SKILL.md:45:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The line documents a Next.js metadata declaration using inline code. It contains no command invocation."
      },
      {
        "id": "network:SKILL.md:37:fetch-api-call",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The skill only recommends normal application fetch calls and database access. It specifies no destination, secret, payload, or unauthorized transfer."
      }
    ],
    "semantic_findings": [],
    "critical_findings": [],
    "high_findings": [],
    "medium_findings": [],
    "low_findings": [],
    "dangerous_patterns": [],
    "files_scanned": 1,
    "total_lines": 46,
    "audit_model": "claude",
    "audited_at": "2026-07-18T09:50:13.099Z",
    "agent_auto_install_policy": "allowed",
    "manual_install_policy": "allowed"
  },
  "content": {
    "user_title": "Build with Next.js App Router Patterns",
    "value_statement": "Next.js projects can become inconsistent when routes, client components, and data fetching follow different conventions. This skill provides concise project-focused guidance for App Router structure, navigation, fetching, fonts, and metadata.",
    "seo_keywords": [
      "Claude",
      "Codex",
      "Claude Code",
      "Next.js patterns",
      "Next.js App Router",
      "React Server Components",
      "Next.js routing",
      "Server Actions",
      "Next.js metadata"
    ],
    "actual_capabilities": [
      "Explains App Router page and layout file locations.",
      "Guides when to use Client Components or Server Components.",
      "Recommends Link and useRouter for navigation.",
      "Describes server-side and client-side data-fetching approaches.",
      "Covers next/font usage and metadata placement."
    ],
    "limitations": [
      "It provides guidance only and does not modify project files.",
      "It does not cover Pages Router migration details.",
      "It does not provide authentication, caching, or database implementation patterns.",
      "Its recommendations reflect the documented project conventions."
    ],
    "use_cases": [
      {
        "title": "Create a route page",
        "description": "Choose the correct App Router file location and component type for a new page.",
        "target_user": "Next.js developer"
      },
      {
        "title": "Review component boundaries",
        "description": "Decide whether a component needs client-side state or can remain a Server Component.",
        "target_user": "Code reviewer"
      },
      {
        "title": "Standardize project conventions",
        "description": "Apply consistent navigation, font, and metadata practices across a Next.js codebase.",
        "target_user": "Technical lead"
      }
    ],
    "prompt_templates": [
      {
        "title": "Start a page",
        "scenario": "Beginner",
        "prompt": "Use the Next.js Patterns guidance to explain where I should create a dashboard page and whether it should be a Server Component."
      },
      {
        "title": "Choose navigation",
        "scenario": "Intermediate",
        "prompt": "Review this navigation requirement and recommend whether I should use Link or useRouter, with a short explanation."
      },
      {
        "title": "Plan data fetching",
        "scenario": "Intermediate",
        "prompt": "Using these patterns, recommend a data-fetching approach for a Server Component and identify when client-side fetching is appropriate."
      },
      {
        "title": "Review an App Router feature",
        "scenario": "Advanced",
        "prompt": "Assess my proposed App Router feature against the documented patterns for routes, layouts, client boundaries, navigation, fonts, and metadata."
      }
    ],
    "output_examples": [
      {
        "input": "Where should I add a profile route?",
        "output": [
          "Create the page under app/profile/page.tsx.",
          "Use a Server Component unless the page needs browser APIs or interactive state."
        ]
      },
      {
        "input": "How should users navigate to the settings page?",
        "output": [
          "Use Link for a normal internal navigation element.",
          "Use useRouter only when navigation must occur after an interaction or condition."
        ]
      },
      {
        "input": "Where should page metadata be defined?",
        "output": "Define metadata in the relevant page.tsx or layout.tsx file for the route."
      }
    ],
    "best_practices": [
      "Default to Server Components and add use client only when browser features or state are required.",
      "Use Link for standard internal navigation and reserve useRouter for programmatic navigation.",
      "Define route metadata close to the relevant page or layout."
    ],
    "anti_patterns": [
      "Do not mark every component as a Client Component without a browser-specific need.",
      "Do not use useRouter when a regular Link provides the required navigation.",
      "Do not place unrelated route metadata in a distant file."
    ],
    "faq": [
      {
        "question": "What routing system does this skill cover?",
        "answer": "It covers the Next.js App Router and its app directory conventions."
      },
      {
        "question": "When should I use use client?",
        "answer": "Use it when a component needs state, effects, event-driven browser APIs, or client-only hooks."
      },
      {
        "question": "When should I use Link?",
        "answer": "Use Link for standard navigation between internal application routes."
      },
      {
        "question": "When should I use useRouter?",
        "answer": "Use useRouter for programmatic navigation triggered by application logic or user actions."
      },
      {
        "question": "Can Server Components fetch data?",
        "answer": "Yes. The skill recommends fetching data directly in Server Components when appropriate."
      },
      {
        "question": "Does this skill implement the patterns?",
        "answer": "No. It supplies guidance and does not create, modify, or execute project code."
      }
    ]
  },
  "file_structure": [
    {
      "name": "SKILL.md",
      "type": "file",
      "path": "SKILL.md",
      "lines": 46
    }
  ]
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall