Skip to content
Back to skills

Common Pitfalls

ASecurity

Apply when debugging errors, reviewing code for issues, or encountering unexpected behavior. Contains known mistakes with ChurchTools API, Vue components, TypeScript, Safari cookies, and form handling.

  • 666 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
developmenttypescriptreactvuedebuggingapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned February 10, 2026

npx -y skills add majiayu000/claude-skill-registry --skill common-pitfalls --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Common Pitfalls?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Common Pitfalls
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-common-pitfalls/badge)](https://www.skillsdirectory.com/skills/majiayu000-common-pitfalls)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: common-pitfalls
description: Apply when debugging errors, reviewing code for issues, or encountering unexpected behavior. Contains known mistakes with ChurchTools API, Vue components, TypeScript, Safari cookies, and form handling.
---

# Common Pitfalls

## ChurchTools API

| Pitfall | Wrong | Correct |
|---------|-------|---------|
| Nested params | `{ params: { key: 'val' } }` | `{ key: 'val' }` |
| Delete method | `churchtoolsClient.delete()` | `churchtoolsClient.deleteApi()` |
| Tags response | `response.data` | `response` (direct array) |
| Tag domains | `'appointment'` | `'person' \| 'song' \| 'group'` |

## Vue Components

| Pitfall | Wrong | Correct |
|---------|-------|---------|
| Button type | `<button>` | `<button type="button">` |
| BaseCard import | Absolute path | Relative: `../common/BaseCard.vue` |
| Reactivity | Plain objects | `ref()` or `reactive()` |

## TypeScript

- Check `src/ct-types.d.ts` for ChurchTools types
- Always define interfaces for API responses
- Use strict typing for all data

## Build Issues

- Verify import paths after moving components
- Check for missing dependencies in package.json
- Ensure all required fields in API requests

## Safari-specific

- Blocks `Secure; SameSite=None` cookies on `http://localhost`
- Blocks third-party cookies from different domains
- Solution: Use Vite proxy + HTTPS

## Form Submission

Buttons without `type="button"` will submit forms and cause page reloads:
```vue
<!-- Wrong - triggers form submission -->
<button @click="handleClick">Click</button>

<!-- Correct -->
<button type="button" @click="handleClick">Click</button>
```

## API Error Handling

Always wrap API calls in try-catch with loading states:
```typescript
try {
  loading.value = true
  // API call
} catch (err) {
  error.value = 'User-friendly message'
  console.error('Debug info:', err)
} finally {
  loading.value = false
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.