Skip to content
Back to skills

Cache Property Access In Loops

ASecurity

reduces lookups

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
developmentjavascripttypescriptjava

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill cache-property-access-in-loops --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cache Property Access In Loops?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cache Property Access In Loops
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-cache-property-access-in-loops/badge)](https://www.skillsdirectory.com/skills/david-li0406-cache-property-access-in-loops)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Cache Property Access in Loops
impact: LOW-MEDIUM
description: reduces lookups
tags: javascript, loops, optimization, caching
---

## Cache Property Access in Loops

Cache object property lookups in hot paths.

**Incorrect (3 lookups × N iterations):**

```typescript
for (let i = 0; i < arr.length; i++) {
  process(obj.config.settings.value)
}
```

**Correct (1 lookup total):**

```typescript
const value = obj.config.settings.value
const len = arr.length
for (let i = 0; i < len; i++) {
  process(value)
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…