
Angular Performance
If you're working on Angular apps and tired of sluggish image loading, this skill pushes NgOptimizedImage as the standard approach. It covers the essentials: priority loading for LCP images, automatic lazy loading for everything else, and fill mode for backgrounds. The "REQUIRED for images" in the title is opinionated but not wrong. Angular's built-in image directive genuinely handles most of the performance work you'd otherwise do manually with srcset and loading attributes. This is a solid reference if you're trying to hit Core Web Vitals targets or just want your Angular app to feel snappier without wrestling with image optimization yourself.
- skills.sh installs
- 353
- GitHub stars
- 665
- last updated
- Aug 21, 2026
Install
$ npx -y skills add gentleman-programming/gentleman-skills --skill angular-performance --agent claude-codeInstalls into .claude/skills of the current project.
Files
NgOptimizedImage (REQUIRED for images)
import { NgOptimizedImage } from '@angular/common';
@Component({
imports: [NgOptimizedImage],
template: `
<!-- LCP image: add priority -->
<img ngSrc="hero.jpg" width="800" height="400" priority>
<!-- Regular: lazy loaded by default -->
<img ngSrc="thumb.jpg" width="200" height="200">
<!-- Fill mode (parent needs position: relative) -->
<img ngSrc="bg.jpg" fill>
<!-- With placeholder -->
<img ngSrc="photo.jpg" width="400" height="300" placeholder>
`
})
Rules
- ALWAYS set
widthandheight(orfill) - Add
priorityto LCP (Largest Contentful Paint) image - Use
ngSrcnotsrc - Parent of
fillimage must haveposition: relative/fixed/absolute
@defer - Lazy Components
@defer (on viewport) {
<heavy-component />
} @placeholder {
<p>Placeholder shown immediately</p>
} @loading (minimum 200ms) {
<spinner />
} @error {
<p>Failed to load</p>
}
Triggers
Sponsors
Promote your product hereReach 125k+ visitors monthlyPromote your product hereReach 125k+ visitors monthly
Agent CaffeineSponsoredClose your lid, come back to finished work
SnugSponsoredThe clipboard manager for the AI eraPromote your product hereReach 125k+ visitors monthly
WaxSponsoredBlock anything with supervision, without erasing your iPhonePromote your product hereReach 125k+ visitors monthly
knobsSponsoredSee your site on any phone, any day, in any language
Details
- Repository
- github.com/gentleman-programming/gentleman-skills
- Categories
- Frontend Development, Debugging
- First seen
- Jun 3, 2026
More from gentleman-programming/gentleman-skills
All 13Recommended
More Frontend Development1
frontend-js-best-practicessergiodxa/agent-skillsJavaScript performance optimization guidelines. Use when writing, reviewing, or refactoring JavaScript/TypeScript code to ensure optimal performance patterns. T336skills.sh installs
2
nextjs-advanced-routingwsimmonds/claude-nextjs-skillsGuide for advanced Next.js App Router patterns including Route Handlers, Parallel Routes, Intercepting Routes, Server Actions, error boundaries, draft mode, and336skills.sh installs
3
bun-nuxtsecondsky/claude-skillsUse when running Nuxt 3 with Bun runtime, building Vue/Nuxt apps with Bun, or configuring Nuxt projects to use Bun for development and production.323skills.sh installs
4
tailwind-gradient-builderpatricio0312rev/skillsCreates modern CSS gradients using Tailwind CSS including linear, radial, conic, mesh gradients, animated gradients, glassmorphism, and gradient text effects. U318skills.sh installs
5
frontend-refactor-plannerpatricio0312rev/skillsCreates safe refactor plans for messy UI code including component splitting strategies, state simplification, performance optimizations, and accessibility impro317skills.sh installs
6
tailwind-refactorpproenca/dot-skillsTailwind CSS code refactoring patterns for v4 migration and anti-pattern cleanup. This skill should be used when refactoring Tailwind utility classes, migrating314skills.sh installs