nextjs-image-usage-skill

nextjs-image-usage-skill is a skill for Claude Code, Codex from darellchua2/opencode-config-template. It costs 32 tokens per session (843 once invoked), scanned A, original, Apache-2.0.

A set of rules for using the Next.js 16 Image component, which handles image sizing, loading, and optimization in Next.js applications. It covers both local images and images from approved remote domains.

In plain words
What is it for?
Use it to replace plain image tags, configure remote image sources, set responsive sizes and loading priority, and add placeholders or blur previews.
Why use it?
Incorrect image usage can hurt performance, fail with remote sources, or break when upgrading between Next.js versions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it to replace plain image tags, configure remote image sources, set responsive sizes and loading priority, and add placeholders or blur previews.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/nextjs-image-usage-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add darellchua2/opencode-config-template --skill nextjs-image-usage-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nextjs-image-usage-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/nextjs-image-usage-skill/github.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/nextjs-image-usage-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/nextjs-image-usage-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/nextjs-image-usage-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nextjs-image-usage-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/nextjs-image-usage-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/nextjs-image-usage-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 843 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.00843
Opus 5.5 $0.00013 $0.00337
Sonnet 5.5 $0.00006 $0.00169
Haiku 4.5 $0.00003 $0.00084

Measured 2mo ago against content hash 038c47554920, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nextjs-image-usage-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/nextjs-image-usage-skill/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

What this skill does

  • Enforces the house rule: every image in Next.js 16 code uses <Image />, never <img>
  • Configures remote image sources via remotePatterns in next.config.ts
  • Migrates ≤15 image code across the Next.js 16 breaking changes

When to use

  • Any <img> tag appears in (or is proposed for) Next.js 16 code
  • Remote images fail to load / console errors about next/image configuration
  • Migrating a codebase from Next.js 13/14/15 to 16
  • Setting up external image domains or responsive image layouts

House rule: auto-convert <img> → <Image />

When an <img> tag is proposed in Next.js 16 code, convert it automatically:

  • import Image from 'next/image'
  • String attributes become JS props: width="800" → width={800}; class → className
  • Required: src, alt, and either explicit width+height or fill
  • Background / cover layouts: fill inside a positioned parent (relative/absolute), styling via className="object-cover" — not absolute-positioned <img>
  • Remote src → a matching remotePatterns entry must exist before the image works
  • Above the fold → add priority; below the fold stays lazy (default)

Next.js 16 breaking changes (vs ≤15)

Feature Next.js ≤15 Next.js 16
layout prop 'fill'/'fixed'/'intrinsic'/'responsive' REMOVED — fill boolean or explicit width/height
objectFit / objectPosition props supported REMOVED — style={{ objectFit, objectPosition }}
unoptimized prop supported REMOVED — custom loader (({ src }) => src)
images.domains supported DEPRECATED — use remotePatterns
remotePatterns basic ENHANCED — wildcard subdomains (**.example.com), port, pathname globs

Remote configuration (next.config.ts)

import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
  images: {
    remotePatterns: [
      { protocol: 'https', hostname: 'cdn.trusted.com', pathname: '/images/**' },
      { protocol: 'https', hostname: '**.cloudinary.com' },
    ],
  },
}
export default nextConfig

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · -1,217 lines 038c47554920
  2. 3mo ago First seen · 1,288 lines · 32 tokens per session scan A 8bd18c9fdb5a

Subscribe to this mod's changes

nextjs-image-usage-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 843 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

nextjs-image-usage-skill compared with skills from other repositories

nextjs-image-usage-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nextjs-image-usage-skilldarellchua2/opencode-config-templateSkill62mo agoApache-2.0A32Claude Code, Codex
build-ghost-appTryGhost/GhostSkill56ktodayMITA44Claude Code, Codex
material-ui-tailwindmui/material-uiSkill99ktodayMITA67Claude Code, Codex
fuzzy-rankingTanStack/tableSkill29kyesterdayMITA62Claude Code, Codex
r3f-best-practiceszebbern/claude-code-guideSkill4.7ktodayMITA74Claude Code, Codex
git-safetytamagui/tamaguiSkill14ktodayMITA42Claude Code
onchainkitalsk1992/CloddsBotSkill3.2k22d agoMITA24Claude Code, Codex