Skills nextjs-app-router-patterns
📦

nextjs-app-router-patterns

Content revision r1 Safe ⚙️ External commands🌐 Network access🔑 Env variables

建置更好的 Next.js App Router 應用程式

當路由、串流、快取和 Server Components 互相作用時,Next.js App Router 專案可能很難規劃結構。這項技能為 Claude、Codex 和 Claude Code 提供現代 Next.js 應用程式架構的實用模式。

Supports: Claude Codex Code(CC)
Maintain this Skill? Claim it 🥉 77 Bronze

Install with my Agent

Copy this request to your Agent. It includes the canonical Skill page and manifest.

Agent request
Review the Skillstore skill "nextjs-app-router-patterns" from https://skillstore.io/skills/wshobson-nextjs-app-router-patterns.md and its manifest at https://skillstore.io/api/skills/wshobson-nextjs-app-router-patterns/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.

Your Agent should still show its plan and request any confirmation required by the security policy.

Test it

Using "nextjs-app-router-patterns". 產品列表頁需要篩選、分頁和快速首次繪製。

Expected outcome:

  • 建議:將頁面保留為 Server Component,並在接近列表的位置擷取篩選後的產品。
  • 在產品列表周圍使用 Suspense,讓篩選器和周邊 layout 能先完成渲染。
  • 對產品資料使用 tag-based revalidation,並在存取資料庫前驗證 query parameters。

Using "nextjs-app-router-patterns". 儀表板需要獨立的 analytics 和 team panels。

Expected outcome:

  • 建議:對可獨立載入的 panels 使用 parallel routes。
  • 為每個 panel 提供自己的載入狀態,讓較慢的 analytics 不會阻塞 team data。
  • 將共享導覽和 layout state 保留在父層 dashboard layout 中。

Using "nextjs-app-router-patterns". API route 接收產品建立請求。

Expected outcome:

  • 建議:解析 request,使用 schema 驗證、授權呼叫者,並對欄位使用 allowlist。
  • 針對驗證錯誤和缺少的記錄回傳清楚的狀態碼。
  • 避免將原始 request body 直接傳入 persistence calls。

Security Audit

Safe
v7 • 7/8/2026 Open versioned report

All static findings were false positives caused by Markdown code fences, TypeScript examples, documentation links, and placeholder data-fetching snippets. No evidence found of command execution, credential exfiltration, prompt injection, environment file access, or system reconnaissance in SKILL.md.

1
Files scanned
545
Lines analyzed
0
Review items
0
False positives ignored
No confirmed security findings were detected by the latest completed static and semantic audit. This does not prove the skill has no side effects.
Audited by: codex View Audit History →
Share & cite this report

Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.

Open versioned report
Security Assessment

Copy report link

https://skillstore.io/skills/wshobson-nextjs-app-router-patterns/audits/7?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown badge

[![Skillstore security assessment](https://skillstore.io/badges/skills/wshobson-nextjs-app-router-patterns/security.svg)](https://skillstore.io/skills/wshobson-nextjs-app-router-patterns?utm_source=security_passport_badge)

HTML badge

<a href="https://skillstore.io/skills/wshobson-nextjs-app-router-patterns?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/wshobson-nextjs-app-router-patterns/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Embed card

<iframe src="https://skillstore.io/embed/skills/wshobson-nextjs-app-router-patterns.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Academic citations (APA · BibTeX · CFF)

APA citation

wshobson. (2026). nextjs-app-router-patterns security audit report (audit version 7) [Author version unspecified]. Skillstore. https://skillstore.io/skills/wshobson-nextjs-app-router-patterns/audits/7

BibTeX citation

@techreport{wshobson-wshobson-nextjs-app-router-patterns-2026, author = {wshobson}, title = {nextjs-app-router-patterns security audit report (audit version 7)}, institution = {Skillstore}, year = {2026}, number = {7}, url = {https://skillstore.io/skills/wshobson-nextjs-app-router-patterns/audits/7}, note = {Author version unspecified} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "nextjs-app-router-patterns security audit report (audit version 7)" version: "unspecified" type: report authors: - name: "wshobson" date-released: "2026-07-08" url: "https://skillstore.io/skills/wshobson-nextjs-app-router-patterns/audits/7" identifiers: - type: other value: "skillstore:wshobson-nextjs-app-router-patterns:audit:7" description: "Skillstore immutable audit report identifier"

Compare variants

2 installable variants

Each author remains a separate installable skill. The recommended variant is ranked by Skillstore evidence.

Why this variant is first

Highest Skillstore Score
wshobson Recommended Current

wshobson-nextjs-app-router-patterns

Skillstore Score 77
Evidence Confidence High
Skillstore usage 17
Updated

2026-09-09

sickn33-nextjs-app-router-patterns

Skillstore Score 38
Evidence Confidence Medium
Skillstore usage 14
Updated

2026-09-09

Skillstore Score

Why this score Evidence Confidence: High
55
Architecture
85
Maintainability
87
Content
71
Community
78
Spec Compliance

What You Can Build

規劃新的 App Router 專案

在開始實作前,選擇檔案慣例、rendering modes、載入狀態和 route boundaries。

現代化既有 Next.js Routes

將 Pages Router 習慣轉換為使用 Server Components、layouts 和 route handlers 的 App Router 模式。

審查架構模式

檢查功能是否以可維護的方式使用 caching、Suspense、metadata 和 Server Actions。

Try These Prompts

選擇 Rendering Pattern
使用 Next.js App Router patterns skill,為此頁面建議 rendering modes。包含 Server Component、Client Component、static、dynamic 和 streaming 的取捨。
設計 Route Structure
使用此技能為這項功能設計 App Router 資料夾結構。在適當情況下包含 layout、page、loading、error、route handler 和 default 檔案。
改善 Data Fetching
使用此技能審查這個 data fetching 流程。針對 Next.js App Router 實作建議 caching、revalidation、tag invalidation 和 Suspense boundaries。
稽核進階 Routing
使用此技能評估這個包含 parallel routes、intercepting routes、Server Actions 和 metadata generation 的 App Router 設計。指出安全性和驗證缺口。

Best Practices

  • 從 Server Components 開始,只有在需要 browser APIs、hooks 或直接互動時才加入 Client Components。
  • 在緩慢資料區域周圍放置 Suspense boundaries,讓頁面其餘部分能快速串流。
  • 在將 request bodies、form data、route params 和 search params 用於資料庫操作前先進行驗證。

Avoid

  • 在沒有明確互動需求的情況下,於大型 route trees 頂端放置 use client。
  • 將原始 request bodies 直接傳入 database writes 或 Server Actions。
  • 對可安全快取、預先建置或重新驗證的內容使用 dynamic rendering。

Frequently Asked Questions

這項技能會產生完整的 Next.js 應用程式嗎?
不會。它提供架構指引和程式碼模式,讓 agent 能套用在既有專案中。
它以哪些 Next.js 版本為目標?
它目標是使用 App Router 模型的 Next.js 14 及更新版本。
它能協助處理 Server Components 嗎?
可以。它說明何時使用 Server Components,以及何時需要 Client Component。
它有涵蓋 caching 嗎?
可以。它描述 fetch caching、revalidation、tags 和 path invalidation 模式。
這項技能發布安全嗎?
可以,但附帶中等風險註記。此技能僅提供指引,但其中一個 API 範例應在使用者複製前改善。
Claude、Codex 和 Claude Code 可以使用它嗎?
可以。metadata 列出對 Claude、Codex 和 Claude Code 的支援。

Developer Details

Author

wshobson

License

MIT

Skillstore revision

r1

Version notice

The author did not declare a version.

Ref

64ca8af0f54a325752f08bd54e52151061ea659a

Maintenance freshness

7/21/2026

Usage

9 downloads · 263 views

File structure

📄 SKILL.md