Skip to content

HigorAlves/orc / codex/orc/content/skills/next-best-practices

next-best-practices

Verified

Next.js best practices

FileKindSize
SKILL.mdskill md4.0 KB
async-patterns.mdmarkdown1.6 KB
bundling.mdmarkdown4.4 KB
data-patterns.mdmarkdown6.5 KB
debug-tricks.mdmarkdown2.9 KB
directives.mdmarkdown1.4 KB
error-handling.mdmarkdown4.6 KB
file-conventions.mdmarkdown3.4 KB
font.mdmarkdown5.1 KB
functions.mdmarkdown4.3 KB
hydration-error.mdmarkdown1.8 KB
image.mdmarkdown3.8 KB
metadata.mdmarkdown7.0 KB
parallel-routes.mdmarkdown7.0 KB
route-handlers.mdmarkdown3.2 KB
rsc-boundaries.mdmarkdown4.2 KB
runtime-selection.mdmarkdown985 B
scripts.mdmarkdown3.2 KB
self-hosting.mdmarkdown8.1 KB
suspense-boundaries.mdmarkdown1.3 KB

runtime-selection.md

View on GitHub
# Runtime Selection

## Use Node.js Runtime by Default

Use the default Node.js runtime for new routes and pages. Only use Edge runtime if the project already uses it or there's a specific requirement.

```tsx
// Good: Default - no runtime config needed (uses Node.js)
export default function Page() { ... }

// Caution: Only if already used in project or specifically required
export const runtime = 'edge'
```

## When to Use Each

### Node.js Runtime (Default)

- Full Node.js API support
- File system access (`fs`)
- Full `crypto` support
- Database connections
- Most npm packages work

### Edge Runtime

- Only for specific edge-location latency requirements
- Limited API (no `fs`, limited `crypto`)
- Smaller cold start
- Geographic distribution needs

## Detection

**Before adding `runtime = 'edge'`**, check:
1. Does the project already use Edge runtime?
2. Is there a specific latency requirement?
3. Are all dependencies Edge-compatible?

If unsure, use Node.js runtime.
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated 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: 196kUpdated Claude CodeCodexVerifiedInstall