frontend-maintenance
Frontend codebase maintenance - dead code detection, linting, dependency updates, and cleanup for TypeScript/React code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Frontend codebase maintenance - dead code detection, linting, dependency updates, and cleanup for TypeScript/React code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Add a new analytics card to the session summary panel. Covers backend analyzer, database migration, API response, and frontend component with Storybook stories.
Cut a new semver release — tag, write release notes with rigorous DB migration and API change verification, and publish via gh.
Backend codebase maintenance - dead code detection, linting, dependency updates, and cleanup for Go code.
Fix bugs using Test-Driven Development. Use for bug fixes from Linear tickets or user reports. Emphasizes writing tests FIRST before any implementation.
基于 SOC 职业分类
| name | frontend-maintenance |
| description | Frontend codebase maintenance - dead code detection, linting, dependency updates, and cleanup for TypeScript/React code. |
Periodic evaluation and cleanup for the frontend codebase.
Track with TodoWrite:
# Knip: finds unused files, exports, and dependencies
cd frontend && npm run knip
# ESLint for general linting
cd frontend && npm run lint
IMPORTANT: The knip report should be clean (no output = no issues).
Do NOT ask for permission - just fix and report what was cleaned up.
cd frontend && npm outdated
cd frontend && npm audit
Update strategy:
# Use --run to avoid watch mode
cd frontend && npm test -- --coverage --run
Track with TodoWrite:
dangerouslySetInnerHTML uses DOMPurifyUse Grep to find these patterns:
# Empty catch blocks
Pattern: "catch.*\{\s*\}"
# Console.log left in code
Pattern: "console\.log"
# Any type usage
Pattern: ": any"
# Disabled ESLint rules
Pattern: "eslint-disable"
Actively search for opportunities to reduce duplication and simplify logic:
Duplicated patterns to look for:
How to search:
Logic simplification to look for:
Action: Report findings with specific file locations and a brief description of the simplification. For low-risk improvements (extracting a shared component, simplifying a conditional), fix directly. For larger refactors, note in the findings table.
cd frontend && npm run build
Watch for chunks exceeding 500 KB - consider code-splitting.
Largest/most complex:
schemas/claudeTranscript.ts (~545 lines) - Validationpages/ShareLinksPage.tsx (~347 lines) - Complex UIpages/APIKeysPage.tsx (~316 lines) - Complex UIAfter fixing issues in Phases 1-2, run the code-simplifier agent to simplify and refine any modified frontend code:
Use the Task tool with subagent_type="code-simplifier" and prompt:
"Simplify and refine recently modified TypeScript/React code in the frontend/src/ directory.
Focus on clarity, consistency, and maintainability while preserving all functionality."
This catches additional simplification opportunities (verbose patterns, unnecessary complexity, inconsistent style) that automated tools miss.
Create a summary with:
| Category | Severity | Issue | Location | Action |
|---|---|---|---|---|
| Security | High/Med/Low | Description | file:line | Fix/Ticket/Ignore |
| Dead Code | ... | ... | ... | ... |
| Duplication | ... | ... | ... | ... |
| Simplification | ... | ... | ... | ... |
| Code Smell | ... | ... | ... | ... |
| Bundle | ... | ... | ... | ... |