component-update-icon

component-update-icon is a cursor rule for Cursor from oakensoul/nextjs-cursor-prompts. It costs 0 tokens per session (5,380 once invoked), scanned A, original, MIT.

A set of project rules for improving existing icon components, including their SVG output, accessibility, theming, sizing, loading, and caching.

In plain words
What is it for?
Use it when maintaining an existing icon system. It guides performance checks, ARIA improvements, design-system updates, dynamic loading, sprite use, and backward-compatible changes.
Why use it?
It helps find and fix issues such as unnecessarily large bundles, inefficient rendering, weak screen-reader support, and inconsistent visual treatment without breaking existing use.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when maintaining an existing icon system. It guides performance checks, ARIA improvements, design-system updates, dynamic loading, sprite use, and backward-compatible changes.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/oakensoul/nextjs-cursor-prompts/component-update-icon
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.

Clone the repo
git clone --depth 1 https://github.com/oakensoul/nextjs-cursor-prompts

Made for: Cursor.

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 component-update-icon

README.md
[![agentmods](https://agentmods.dev/badge/rules/oakensoul/nextjs-cursor-prompts/component-update-icon.svg)](https://agentmods.dev/rules/oakensoul/nextjs-cursor-prompts/component-update-icon)
Your own site
<a href="https://agentmods.dev/rules/oakensoul/nextjs-cursor-prompts/component-update-icon"><img src="https://agentmods.dev/badge/rules/oakensoul/nextjs-cursor-prompts/component-update-icon.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 5,380 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.
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.00000 $0.05380
Opus 5 $0.00000 $0.02690
Sonnet 5 $0.00000 $0.01076
Haiku 4.5 $0.00000 $0.00538

Measured 7d ago against content hash f2a4b389ce56, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

component-update-icon 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 7d 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.

.cursor/prompts/component/component-update-icon.mdc · 807 lines

How it starts

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

Icon Component Update Request

Please enhance the existing icon component with performance optimizations, accessibility improvements, design system integration, and advanced icon management features.

🎯 ICON UPDATE OBJECTIVES:

  1. OPTIMIZE performance with improved SVG optimization, bundle efficiency, and rendering performance
  2. ENHANCE accessibility with better ARIA support, semantic usage, and screen reader compatibility
  3. INTEGRATE design system improvements with consistent theming, sizing, and visual harmony
  4. ADD advanced features like dynamic icon loading, sprite optimization, and caching strategies
  5. MAINTAIN backward compatibility while implementing modern icon management patterns

📋 ICON ENHANCEMENT METHODOLOGY:

STEP 1: Current Icon System Assessment

Performance Analysis:
  • Bundle size impact: Analyze current icon library usage and bundle contribution
  • Runtime performance: Review icon rendering efficiency and memory usage
  • SVG optimization: Audit current SVG optimization levels and opportunities
  • Loading strategy: Evaluate current icon loading patterns and caching
Accessibility Audit:
  • ARIA compliance: Verify proper ARIA attribute usage and semantic structure
  • Screen reader testing: Test icon announcements and navigation patterns
  • Keyboard interaction: Review keyboard accessibility for interactive icons
  • Color contrast: Ensure sufficient contrast across theme variations
Design System Review:
  • Size consistency: Audit icon sizing across components and themes
  • Visual alignment: Review icon alignment with text and other elements
  • Theme compatibility: Test icons across light/dark themes and variants
  • Brand consistency: Ensure icon style consistency with brand guidelines

STEP 2: Advanced SVG Optimization

Enhanced SVG Processing:
// Advanced SVG optimization with modern techniques
export class AdvancedSVGOptimizer {
  private optimizationCache = new Map()
  private performanceMetrics = new Map()

  async optimizeSVG(svgContent: string, options?: OptimizationOptions): Promise<OptimizedSVG> {
    const cacheKey = this.generateCacheKey(svgContent, options)
    
    if (this.optimizationCache.has(cacheKey)) {
      return this.optimizationCache.get(cacheKey)
    }

    const startTime = performance.now()
    
    const optimized = await this.performOptimization(svgContent, {
      removeComments: true,
      removeMetadata: true,
      removeEmptyElements: true,
      convertPathData: true,
      mergePaths: true,
      removeUselessStrokeAndFill: true,
      removeHiddenElements: true,
      ...options
    })

    const optimizationTime = performance.now() - startTime
    this.performanceMetrics.set(cacheKey, {
      originalSize: svgContent.length,
      optimizedSize: optimized.content.length,
      compressionRatio: optimized.content.length / svgContent.length,
      optimizationTime
    })

    this.optimizationCache.set(cacheKey, optimized)
    return optimized
  }

  private async performOptimization(svg: string, options: OptimizationOptions) {
    // Multi-pass optimization for maximum compression
    let content = svg

    // Pass 1: Remove unnecessary elements
    content = this.removeUnnecessaryElements(content)
    
    // Pass 2: Optimize paths and shapes
    content = this.optimizePaths(content)
    
    // Pass 3: Minify and clean up
    content = this.minifySVG(content)

    return {
      content,
      viewBox: this.extractViewBox(content),
      paths: this.extractPaths(content),
      metadata: this.extractMetadata(content)
    }
  }

  getPerformanceMetrics(cacheKey: string) {
    return this.performanceMetrics.get(cacheKey)
  }
}

Read the full file on GitHub · 807 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. 7d ago First seen · 807 lines · 0 tokens per session scan A f2a4b389ce56

Subscribe to this mod's changes

component-update-icon is a cursor rule published in the GitHub repository oakensoul/nextjs-cursor-prompts (4 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 5,380 tokens. 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-08-31.