- Home
- Skills
- Frontend & Web Apps
- ai frontend quality
ai frontend quality
Audits and fixes frontend stability, layout shifts, and asynchronous AI task states for high-quality Web/AI clients.
Free
Works with the AI Agents you already use
ai frontend quality
Example session with this skill installed
The chat interface flickers and jumps to the bottom every time a new token streams in, making it impossible to read earlier messages while the AI is still generating. Diagnose the issue and fix it in ChatBody.tsx without blocking the rest of the UI.
- Read your context and instructions
- Compiled the ai frontend quality
- Generated the UI component
I analyzed ChatBody.tsx and found that the auto-scroll logic was running on every state update, even when the user had intentionally scrolled up to read earlier messages. This caused flickering and repeatedly forced the view back to the bottom during streaming.
What I changed
- Added user-intent aware scroll anchoring
- Only auto-scroll when the user is already near the bottom
- Preserve manual reading position while new tokens stream in
- Avoid full re-renders or global loading states
- Keep the rest of the interface responsive during generation
Example fix
const isNearBottom = (el: HTMLDivElement, threshold = 80) => {
return el.scrollHeight - el.scrollTop - el.clientHeight < threshold;
};
useEffect(() => {
const el = scrollRef.current;
if (!el) return;
if (isNearBottom(el)) {
el.scrollTop = el.scrollHeight;
}
}, [messages]);
ChatBody.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop shipping interfaces that feel fragile when data is dynamic or tasks are slow. This skill audits and fixes Web/AI client stability, focusing on layout shifts, responsive failures, and broken asynchronous UX. It prevents common pitfalls like AI stream disconnects on component unmount and global loading states that lock the entire UI.
What it does
- Stability Audits identifies root causes for re-rendering loops, layout jumps, and scroll position hijacking during streaming.
- Asynchronous UX Design implements S/M/L tier strategies for task persistence, ensuring AI generations don't die when users switch tabs.
- Component Selection enforces semantic rigor when choosing between Modals, Drawers, and Toasts based on risk and content length.
- Visual Polish refines typography hierarchies, streaming fade-in effects, and border/radius consistency for desktop-class interfaces.
- Responsive Recovery fixes broken layouts at non-standard widths without resorting to unreadable font scaling.
How it works
- Context Mapping reads existing components and state logic to identify constraints before suggesting changes.
- Requirement Thresholding flags high-risk UI decisions and asks for specific user goals only when necessary.
- Complexity Tiering assigns S, M, or L implementation levels based on whether a task is local, router-managed, or server-persisted.
- Iterative Refinement applies surgical CSS or state fixes, prioritizing error boundaries over global overrides.
Frameworks & tools
Optimized for React, TanStack Query, and Tailwind CSS. Supports Electron and Tauri environments for desktop-specific interactions like resizable shells and window shadows.
Why this beats prompting it yourself
Generic prompts often suggest overflow: hidden or key={Date.now()} to "fix" UI bugs, which creates technical debt. This skill uses a structured diagnostic matrix to separate UI state from server state, ensuring interfaces remain interactive even during heavy background processing.
Use cases
- Prevent AI chat streams from canceling when a user navigates to a different page.
- Fix "jumpy" layouts where scrollbars appearing or text streaming causes elements to jitter.
- Implement "Undo" patterns for high-risk actions instead of disruptive confirmation dialogs.
- Optimize IME (input method editor) behavior to prevent accidental message sending during composition.
Known limitations
Does not perform pure backend refactoring or standalone algorithm optimization. Visual micro-interactions depend on existing project design system constraints.
Primarily focuses on frontend UI/UX and application stability. Includes guidance for backend SSE contracts and persistent AI tasks, but does not provide a complete backend implementation. Code examples are illustrative and must be adapted and tested within the host project.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 10 days ago
- Free with an Agensi account