Skip to content
Back to skills

Component Change Diff

ASecurity

Both charts are dumb — they just render whatever `data` they're handed. The single choke point is one hook call in the dashboard page. **Component tree:** ``` Dashboard (src/pages/Dashboard.tsx) ├── Header ├── RevenueChart ← props: any, just renders data={revenue} ├── SignupsChart ← props: any, just renders data={signups} └── RecentOrders ``` **Where the 30-day lock-in lives today** — `src/pages/Dashboard.tsx:8`: ```tsx const { revenue, signups } = useMetrics({ days: 30 }); ``` `useMetric...

  • 18 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 25, 2026
developmentgo

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 25, 2026

npx -y skills add bendrucker/claude --skill component-change-diff --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Component Change Diff?

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

Security grade badge for Component Change Diff
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bendrucker-component-change-diff/badge)](https://www.skillsdirectory.com/skills/bendrucker-component-change-diff)

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
Both charts are dumb — they just render whatever `data` they're handed. The single choke point is one hook call in the dashboard page.

**Component tree:**
```
Dashboard (src/pages/Dashboard.tsx)
├── Header
├── RevenueChart   ← props: any, just renders data={revenue}
├── SignupsChart   ← props: any, just renders data={signups}
└── RecentOrders
```

**Where the 30-day lock-in lives today** — `src/pages/Dashboard.tsx:8`:
```tsx
const { revenue, signups } = useMetrics({ days: 30 });
```
`useMetrics({ days })` (`src/hooks/useMetrics.ts:1`) is the only place a date range exists in the codebase — there's no context, URL param, or store carrying it anywhere else.

**Diff — where the picker goes:**
```diff
 Dashboard (src/pages/Dashboard.tsx)
+  const [range, setRange] = useState({ days: 30 })
+  <DateRangePicker value={range} onChange={setRange} />
   <Header />
-  const { revenue, signups } = useMetrics({ days: 30 });
+  const { revenue, signups } = useMetrics(range);
   <RevenueChart data={revenue} />
   <SignupsChart data={signups} />
   <RecentOrders />
```

Because both charts only ever receive already-filtered `data` props, adding the picker's state at the `Dashboard` level and feeding it into the existing `useMetrics(range)` call is the only wiring needed — no changes to `RevenueChart`/`SignupsChart` themselves, and no context/store to introduce.

Files in this skill

  • sonnet-plain.md1.8 KB
  • sonnet-skill.md1.4 KB

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.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.