Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Convex Components Skill

ASecurity

Universal patterns for Convex components including installation, configuration, and usage. Use when working with Rate Limiter, Aggregate, Workpool, Workflow, or any Convex component from the ecosystem.

17 stars
0 votes
0 copies
0 views
Added 2/7/2026
developmenttypescriptbashtestingapidatabasebackend

Works with

api

Security Analysis

A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Scanned 2/12/2026

Install to Claude Code

$npx -y skills add PolarCoding85/convex-agent-skillz --skill convex-components-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Convex Components Skill?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Convex Components Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/polarcoding85-convex-components-skill/badge)](https://www.skillsdirectory.com/skills/polarcoding85-convex-components-skill)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: convex-components
description: 'Universal patterns for Convex components including installation, configuration, and usage. Use when working with Rate Limiter, Aggregate, Workpool, Workflow, or any Convex component from the ecosystem.'
---

# Convex Components

Components are sandboxed packages with their own database tables, functions, and isolated execution.

## Universal Installation Pattern

All components follow the same installation pattern:

```bash
npm install @convex-dev/<component-name>
```

```typescript
// convex/convex.config.ts
import { defineApp } from 'convex/server';
import componentName from '@convex-dev/<component-name>/convex.config';

const app = defineApp();
app.use(componentName);

// Multiple instances with different names
app.use(componentName, { name: 'instance2' });

export default app;
```

Run `npx convex dev` to generate code.

## Accessing Components

```typescript
import { components } from './_generated/api';

// Default instance
const instance = new ComponentClass(components.componentName, {
  /* config */
});

// Named instance
const instance2 = new ComponentClass(components.instance2, {
  /* config */
});
```

## Transaction Semantics

Component mutations participate in the parent transaction:

```typescript
export const doWork = mutation({
  handler: async (ctx) => {
    await ctx.db.insert('myTable', { data: 'value' });
    await component.doSomething(ctx); // Same transaction

    // If mutation throws, BOTH writes roll back
  }
});
```

Component exceptions can be caught:

```typescript
try {
  await rateLimiter.limit(ctx, 'myLimit', { throws: true });
} catch (e) {
  // Only component's writes roll back
  // Parent mutation can continue
}
```

## Available Components

### Durable Functions

- **[Workflow](references/WORKFLOW.md)** - Long-running, durable code flows with retries
- **[Workpool](references/WORKPOOL.md)** - Queue actions with parallelism limits
- **[Action Retrier](references/ACTION-RETRIER.md)** - Retry failed actions with backoff

### Backend Utilities

- **[Rate Limiter](references/RATE-LIMITER.md)** - Application-layer rate limiting
- **[Aggregate](references/AGGREGATE.md)** - Efficient COUNT, SUM, MAX operations
- **[Sharded Counter](references/SHARDED-COUNTER.md)** - High-throughput counting
- **[Presence](references/PRESENCE.md)** - Real-time user presence tracking
- **[Action Cache](references/ACTION-CACHE.md)** - Cache expensive action results
- **[Migrations](references/MIGRATIONS.md)** - Stateful online data migrations

### Payments

- **[Stripe](references/STRIPE.md)** - Payments, subscriptions, and billing

### Integrations

- **[ProseMirror Sync](references/PROSEMIRROR-SYNC.md)** - Collaborative text editing (Tiptap/BlockNote)
- **[Resend](references/RESEND.md)** - Transactional email with queuing and webhooks

### AI Components

- **[Agent](../convex-agent-skill/SKILL.md)** - AI agents with persistent threads (separate skill)

## Quick Reference

| Component        | Package                        | Primary Use                |
| ---------------- | ------------------------------ | -------------------------- |
| Rate Limiter     | `@convex-dev/rate-limiter`     | Control action frequency   |
| Aggregate        | `@convex-dev/aggregate`        | Fast count/sum queries     |
| Sharded Counter  | `@convex-dev/sharded-counter`  | High-throughput counting   |
| Presence         | `@convex-dev/presence`         | Real-time user tracking    |
| Action Cache     | `@convex-dev/action-cache`     | Cache expensive results    |
| Migrations       | `@convex-dev/migrations`       | Online data migrations     |
| Workpool         | `@convex-dev/workpool`         | Queue work with limits     |
| Workflow         | `@convex-dev/workflow`         | Durable multi-step flows   |
| Action Retrier   | `@convex-dev/action-retrier`   | Retry failed actions       |
| ProseMirror Sync | `@convex-dev/prosemirror-sync` | Collaborative text editing |
| Resend           | `@convex-dev/resend`           | Transactional email        |
| Stripe           | `@convex-dev/stripe`           | Payments & subscriptions   |
| Agent            | `@convex-dev/agent`            | AI chat with history       |

## Common Patterns

### Component + Triggers

Auto-sync components with table changes using `convex-helpers` triggers:

```typescript
import { Triggers } from 'convex-helpers/server/triggers';
import {
  customCtx,
  customMutation
} from 'convex-helpers/server/customFunctions';

const triggers = new Triggers<DataModel>();

// Register component trigger
triggers.register('myTable', aggregate.trigger());

// Wrap mutation to use triggers
const mutation = customMutation(mutationRaw, customCtx(triggers.wrapDB));
```

### Testing Components

```typescript
import componentTest from '@convex-dev/<component>/test';
import { convexTest } from 'convex-test';

function initTest() {
  const t = convexTest();
  componentTest.register(t);
  return t;
}

test('component test', async () => {
  const t = initTest();
  await t.run(async (ctx) => {
    // Test with component
  });
});
```

### Dashboard Access

View component data in dashboard via component dropdown. Each component has isolated tables.

## Best Practices

1. **Name instances descriptively** - `emailWorkpool`, `scrapeWorkpool` vs generic `workpool1`
2. **Configure once** - Set options when creating instance, not per-call
3. **Use triggers for sync** - Keep aggregates in sync automatically
4. **Handle component errors** - Catch and handle gracefully when appropriate
5. **Check limits** - Respect parallelism limits on free tier (20 concurrent functions)

Attribution

PolarCoding85PolarCoding85
View sourceMore from PolarCoding85 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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 (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284072 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2192 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →