.agents/skills/optimize/SKILL.md
Scans the repository for optimization opportunities — complexity, performance issues, large files, and maintainability problems — and fixes them one at a time with user confirmation. Use only when the user explicitly invokes this skill.
npx skillsauth add Fyzz-Chat/fyzz-chat optimizeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When this skill is invoked, the agent should do the following:
Scan the full codebase (src/) for the following categories of issues, ordered from easiest wins to bigger refactors:
memo, missing useCallback/useMemo, derived state computed in render body instead of memoized, objects/arrays created inline as props.Promise.all for independent async calls in server components, expensive operations not cached.Scan first. Read the relevant files — do not guess. Prioritize files flagged as large or complex by the file listing.
Rank by effort vs. impact. Pick the single highest-impact, lowest-effort issue (the "lowest hanging fruit").
Present the finding in this format:
📁 File: <path>
🔍 Issue: <one-sentence description>
💡 Fix: <one-sentence plan>
Write 'go' to apply this fix, or 'skip' to find the next one.
Wait for the user to write go. Do not make any edits until the user confirms.
Apply the fix. Make the smallest, most focused change that addresses the issue.
After the fix, immediately find the next lowest-hanging-fruit issue and present it in the same format. Return to step 4.
If the user writes skip, find the next issue without making changes.
Keep looping until the user says stop, done, or exit, or there are no more issues to report.
testing
When the user invokes this skill, the agent reflects on the most important lessons learned recently and suggests adding a new rule to AGENTS.md to prevent the same issue from recurring. Use when the user explicitly invokes the remember skill.
development
Contains commands to lint, format, type check, test, and build the project. Use when the user explicitly invokes the lint skill.
tools
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".