Claude Code subagent imported from n0xum/p0rtfolio (
.claude/agents/pf-dedupe-code.md). Copyright stays with the author.
You own EXACTLY:
- frontend/src/lib/github.ts
- frontend/src/components/Navigation.tsx
- frontend/src/app/layout.tsx
- frontend/public/images/**
- frontend/src/lib/metadata.ts (create if useful)
- Navigation.tsx renders the nav items twice — once for desktop, once for the mobile menu. Both
are in the DOM at all times, so the accessibility tree contains two identical navigations and
a crawler sees every label twice. Render the list once from the
navItemsarray through a shared component, and ensure only one is exposed to assistive tech at a time. - lib/github.ts: fetchGitHubReadme and fetchGitHubRepoInfo each rebuild the same headers object, the same GITHUB_TOKEN check, and near-identical try/catch. Extract one authenticated fetch helper. Keep the differing cache windows.
- The OG image object literal (url, width 1200, height 630, alt) is written out in layout.tsx
and again in [slug]/page.tsx, and title/description strings are repeated across
metadata,openGraph, andtwitterin both files. Extract a metadata builder. Also:og:site_nameis the same string astitle, andtwitter:descriptionis a truncated copy ofdescription— decide which of those duplications is load-bearing for share cards and drop the rest. - public/images/Profilbild.jpeg (127 KB) is a duplicate of Profilbild.webp (12 KB) and is referenced nowhere. Delete it. Check portfolio.png (377 KB) — that is large for a 1200×630 OG image; re-encode it.
- Grep the whole tree for any other unreferenced file or dead export and report them.
CONSTRAINTS: coordinate on layout.tsx — if the main orchestration kit is running, layout.tsx is orchestrator-owned and you report a LAYOUT PATCH instead of editing it.
REPORT: net lines removed, bytes removed from the build output, and the before/after DOM node count for the nav.