Skip to main content
ClaudeWave
Skill374 estrellas del repoactualizado 6mo ago

providing-feedback

Providing-feedback implements comprehensive feedback and notification systems including toasts, alerts, modals, progress indicators, and error states. Use this skill when communicating system state, displaying messages, confirming user actions, or handling errors within applications. It provides decision matrices and implementation patterns for selecting appropriate feedback mechanisms based on urgency and user interaction requirements.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/ancoleman/ai-design-components /tmp/providing-feedback && cp -r /tmp/providing-feedback/skills/providing-feedback ~/.claude/skills/providing-feedback
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Providing User Feedback and Notifications

This skill implements comprehensive feedback and notification systems that enhance all other component skills by providing consistent patterns for communicating system state, displaying messages, and handling user confirmations.

## When to Use This Skill

Activate this skill when:
- Implementing toast notifications or snackbars
- Displaying success, error, warning, or info messages
- Creating modal dialogs or confirmation dialogs
- Implementing progress indicators (spinners, progress bars, skeleton screens)
- Designing empty states or zero-result displays
- Adding tooltips or contextual help
- Determining notification timing, stacking, or positioning
- Implementing accessible feedback patterns with ARIA
- Communicating any system state to users

## Feedback Type Decision Matrix

Choose the appropriate feedback mechanism based on urgency and attention requirements:

```
Critical + Blocking       → Modal Dialog
Important + Non-blocking  → Alert Banner
Success/Info + Temporary  → Toast/Snackbar
Contextual Help          → Tooltip/Popover
In-progress              → Progress Indicator
No Data                  → Empty State
```

### Quick Reference by Urgency

| Urgency Level | Component | Duration | Blocks Interaction |
|---------------|-----------|----------|-------------------|
| **Critical** | Modal Dialog | Until action | Yes |
| **Important** | Alert Banner | Until dismissed | No |
| **Standard** | Toast | 3-7 seconds | No |
| **Contextual** | Inline Message | Persistent | No |
| **Help** | Tooltip | On hover | No |
| **Progress** | Spinner/Bar | During operation | Optional |

## Implementation Approach

### Step 1: Determine Feedback Type

Assess the situation using these criteria:
1. **Urgency**: How critical is the information?
2. **Duration**: How long should it persist?
3. **Action Required**: Does user need to respond?
4. **Context**: Is it related to specific UI element?

### Step 2: Choose Implementation Pattern

**For Toasts/Snackbars:**
- Position: Bottom-right (recommended)
- Duration: 3-4s (success), 5-7s (warning), 7-10s (error)
- Stack limit: 3-5 maximum
- See `references/toast-patterns.md` for detailed patterns

**For Modal Dialogs:**
- Focus management: Trap focus within modal
- Accessibility: ESC to close, proper ARIA labels
- Backdrop: Click outside to close (optional)
- See `references/modal-patterns.md` for implementation

**For Progress Indicators:**
- <100ms: No indicator needed
- 100ms-5s: Spinner with message
- 5s-30s: Progress bar (determinate if possible)
- >30s: Progress bar + time estimate + cancel
- See `references/progress-indicators.md` for patterns

**For Empty States:**
- Include: Illustration, headline, body text, CTA
- Types: First use, zero results, error, permission denied
- See `references/empty-states.md` for designs

### Step 3: Implement with Recommended Libraries

**Modern React Stack (Recommended):**
```bash
npm install sonner @radix-ui/react-dialog
```

**For Toasts - Use Sonner:**
```tsx
import { Toaster, toast } from 'sonner';

// In your app root
<Toaster position="bottom-right" />

// Trigger notifications
toast.success('Changes saved successfully');
toast.promise(saveData(), {
  loading: 'Saving...',
  success: 'Saved!',
  error: 'Failed to save'
});
```

**For Modals - Use Radix UI:**
```tsx
import * as Dialog from '@radix-ui/react-dialog';

<Dialog.Root>
  <Dialog.Trigger>Open</Dialog.Trigger>
  <Dialog.Portal>
    <Dialog.Overlay />
    <Dialog.Content>
      <Dialog.Title>Confirm Action</Dialog.Title>
      <Dialog.Description>Are you sure?</Dialog.Description>
      <Dialog.Close>Cancel</Dialog.Close>
    </Dialog.Content>
  </Dialog.Portal>
</Dialog.Root>
```

See `references/library-comparison.md` for alternative libraries and selection criteria.

### Step 4: Apply Accessibility Patterns

**ARIA Live Regions for Announcements:**
```html
<!-- For non-critical notifications -->
<div role="status" aria-live="polite">
  File uploaded successfully
</div>

<!-- For critical alerts -->
<div role="alert" aria-live="assertive">
  Error: Failed to save
</div>
```

**Focus Management for Modals:**
1. Save current focus before opening
2. Move focus to first interactive element in modal
3. Trap focus within modal (Tab cycles)
4. Restore focus to trigger on close

See `references/accessibility-feedback.md` for complete patterns.

### Step 5: Integrate Design Tokens

All feedback components use the design-tokens skill for consistent theming:

```css
/* Example token usage */
.toast {
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: var(--toast-padding);
  border-radius: var(--toast-border-radius);
  box-shadow: var(--toast-shadow);
  animation-duration: var(--toast-enter-duration);
}
```

Token categories used:
- **Colors**: Toast, alert, modal, tooltip backgrounds
- **Spacing**: Internal padding for all components
- **Typography**: Font sizes for titles and messages
- **Shadows**: Elevation for floating elements
- **Motion**: Animation durations and easing

## Notification Timing Guidelines

**Auto-dismiss durations:**
- Success: 3-4 seconds
- Info: 4-5 seconds
- Warning: 5-7 seconds
- Error: 7-10 seconds or manual dismiss
- With action button: 10+ seconds or no auto-dismiss

**Progress indicator thresholds:**
- <100ms: No indicator
- 100ms-5s: Spinner
- 5s-30s: Progress bar
- >30s: Progress bar + cancel option

## Resources

### Scripts (Token-Free Execution)
- `scripts/generate_toast_manager.js` - Generate toast configurations with timing and stacking
- `scripts/format_messages.py` - Format user-facing messages based on context
- `scripts/calculate_timing.js` - Calculate auto-dismiss timings

### References (Detailed Documentation)
- `references/toast-patterns.md` - Toast positioning, stacking, animations
- `references/alert-patterns.md` - Alert banner implementations
- `references/modal-patterns.md` - Modal dialogs with focus management
- `references/progress-indicators.md` - L
administering-linuxSkill

Manage Linux systems covering systemd services, process management, filesystems, networking, performance tuning, and troubleshooting. Use when deploying applications, optimizing server performance, diagnosing production issues, or managing users and security on Linux servers.

ai-data-engineeringSkill

Data pipelines, feature stores, and embedding generation for AI/ML systems. Use when building RAG pipelines, ML feature serving, or data transformations. Covers feature stores (Feast, Tecton), embedding pipelines, chunking strategies, orchestration (Dagster, Prefect, Airflow), dbt transformations, data versioning (LakeFS), and experiment tracking (MLflow, W&B).

architecting-dataSkill

Strategic guidance for designing modern data platforms, covering storage paradigms (data lake, warehouse, lakehouse), modeling approaches (dimensional, normalized, data vault, wide tables), data mesh principles, and medallion architecture patterns. Use when architecting data platforms, choosing between centralized vs decentralized patterns, selecting table formats (Iceberg, Delta Lake), or designing data governance frameworks.

architecting-networksSkill

Design cloud network architectures with VPC patterns, subnet strategies, zero trust principles, and hybrid connectivity. Use when planning VPC topology, implementing multi-cloud networking, or establishing secure network segmentation for cloud workloads.

architecting-securitySkill

Design comprehensive security architectures using defense-in-depth, zero trust principles, threat modeling (STRIDE, PASTA), and control frameworks (NIST CSF, CIS Controls, ISO 27001). Use when designing security for new systems, auditing existing architectures, or establishing security governance programs.

assembling-componentsSkill

Assembles component outputs from AI Design Components skills into unified, production-ready component systems with validated token integration, proper import chains, and framework-specific scaffolding. Use as the capstone skill after running theming, layout, dashboard, data-viz, or feedback skills to wire components into working React/Next.js, Python, or Rust projects.

building-ai-chatSkill

Builds AI chat interfaces and conversational UI with streaming responses, context management, and multi-modal support. Use when creating ChatGPT-style interfaces, AI assistants, code copilots, or conversational agents. Handles streaming text, token limits, regeneration, feedback loops, tool usage visualization, and AI-specific error patterns. Provides battle-tested components from leading AI products with accessibility and performance built in.

building-ci-pipelinesSkill

Constructs secure, efficient CI/CD pipelines with supply chain security (SLSA), monorepo optimization, caching strategies, and parallelization patterns for GitHub Actions, GitLab CI, and Argo Workflows. Use when setting up automated testing, building, or deployment workflows.