anti-patterns

Detects common web app anti-patterns and lists fixes with priorities for your codebase or pull request.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/Hashzin-0/Curion --skill anti-patterns-hashzin-0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: anti-patterns
Source: https://github.com/Hashzin-0/Curion/tree/main/.opencode/skills/anti-patterns
Command: npx skills add https://github.com/Hashzin-0/Curion --skill anti-patterns-hashzin-0

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents long-term bugs, security vulnerabilities, and maintenance debt by identifying common coding anti-patterns early in the development lifecycle. It targets issues that slip into production when frontend data is trusted, validation is missing, business logic is mixed into UI, or secrets and unsafe types are introduced.

Core Features & Use Cases

  • Server-side validation enforcement: Emphasizes validating frontend inputs on the server to prevent privilege escalation and data corruption.
  • Separation of concerns: Encourages extracting logic from UI components into hooks and services to improve testability and reuse.
  • Type safety and duplication reduction: Recommends replacing any with explicit types or unknown+validation and extracting shared UI/code to avoid drift.
  • Secrets and deployment safety: Calls out hardcoded secrets and NEXT_PUBLIC exposure, and checks for functional placeholders shipped to users.
  • Use Case: Run this as part of PR reviews or before releases to produce a checklist of fixes (validation schemas, service layers, typed interfaces, and secrets audit).

Quick Start

Run the anti-patterns checklist on your codebase or pull request and list each violation with a suggested fix and the priority to address it.

Frequently Asked Questions about anti-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect code anti-patterns like trusting frontend data and unsafe typing during a pull request review?

To detect code anti-patterns during a pull request review, scan the codebase for trusted frontend data, unsafe typing, and UI-embedded business logic. Generate a prioritized checklist of violations with targeted fixes like server-side validation and explicit typing.

What are common code anti-patterns in TypeScript web applications that lead to security vulnerabilities?

Common TypeScript anti-patterns causing security vulnerabilities include trusting frontend inputs, using the any type, mixing business logic into UI components, and exposing secrets via NEXT_PUBLIC. These introduce privilege escalation risks and maintenance debt.

Why should server-side validation enforce frontend data inputs in web applications?

Server-side validation must enforce frontend data inputs to prevent privilege escalation and data corruption. Relying solely on client-side checks allows malicious actors to bypass restrictions and compromise application integrity.

Can I use this anti-patterns checklist to audit API routes and component architecture before a release?

Yes, you can use this anti-patterns checklist to audit API routes and component architecture before a release. It verifies network access is restricted to service layers, UI logic is separated from business logic, and database inputs are validated.

What is the best way to separate business logic from UI components to improve testability?

The best way to separate business logic from UI components is extracting logic into dedicated hooks and services. This separation of concerns enforces clear boundaries, reduces duplicated code, and significantly improves testability and reuse.