.cursor/skills/nazim-toast/SKILL.md
Toast notifications for Nazim. Use when showing success/error/info messages. ALWAYS use showToast from @/lib/toast with translation keys; never toast from sonner directly. RTL positioning is automatic.
npx skillsauth add AHMADJAN-New/nazim-web nazim-toastInstall 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.
Use the showToast utility from @/lib/toast. Never call toast from sonner directly. Toasts are translated and RTL-aware.
import { showToast } from '@/lib/toast';
import { useLanguage } from '@/hooks/useLanguage';
const { t } = useLanguage();
// Success / error (use translation keys)
showToast.success(t('toast.yourResourceCreated'));
showToast.error(error.message || t('toast.yourResourceCreateFailed'));
// Info / warning
showToast.info(t('toast.resourceUpdated'));
showToast.warning(t('toast.resourceInUse'));
// Loading (returns id for dismiss)
const id = showToast.loading(t('toast.processing'));
// ... work ...
showToast.dismiss(id);
toast.* for generic messages; use resource-specific keys (e.g. academic.subjects.subjectCreated) when they existTranslationKeys in types.ts and to all four language files: en.ts, ps.ts, fa.ts, ar.tsshowToast.success('toast.subjectsAssigned', { count: 5, skipped: 2 })All mutation hooks should use showToast in onSuccess/onError:
onSuccess: () => {
showToast.success(t('toast.yourResourceCreated'));
void queryClient.invalidateQueries({ queryKey: ['your-resources'] });
},
onError: (error: Error) => {
showToast.error(error.message || t('toast.yourResourceCreateFailed'));
},
toast from sonner)t('key') or resource-specific keyerror.message || t('toast.key')tools
Enforces status badge patterns for Nazim UI. Use when displaying status in tables, cards, or dialogs. Covers Badge variants, semantic colors, statusBadgeVariant, statusOptions with color.
development
Enforces mobile-first responsive patterns for Nazim UI. Use when building pages, tables, forms, charts, or buttons. Covers page container, FilterPanel, tabs, grids, tables, charts, cards, buttons.
development
PDF and Excel report generation for Nazim. Use when adding or changing reports. Backend uses ReportService and ReportConfig; frontend uses useServerReport. Covers branding, DateConversionService, RTL, acceptance criteria.
development
Enforces patterns for creating and maintaining platform admin pages in Nazim. Use when adding new platform management pages, routes, or API endpoints. Covers 5-step checklist, platformApi, usePlatformAdminPermissions, no organization_id.