add-icon

Add a new mParticle SVG icon to the Aquarium library. Handles SVG optimization, registration, type updates, and exports. Use when adding a new icon from an SVG file. Triggers on add icon, new icon, add svg, mp icon, mparticle icon.

6 stars

Best use case

add-icon is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Add a new mParticle SVG icon to the Aquarium library. Handles SVG optimization, registration, type updates, and exports. Use when adding a new icon from an SVG file. Triggers on add icon, new icon, add svg, mp icon, mparticle icon.

Teams using add-icon should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/add-icon/SKILL.md --create-dirs "https://raw.githubusercontent.com/mParticle/aquarium/main/.claude/skills/add-icon/skill.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/add-icon/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How add-icon Compares

Feature / Agentadd-iconStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Add a new mParticle SVG icon to the Aquarium library. Handles SVG optimization, registration, type updates, and exports. Use when adding a new icon from an SVG file. Triggers on add icon, new icon, add svg, mp icon, mparticle icon.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Add mParticle Icon

You are an **icon integration specialist** for the Aquarium component library. You take an SVG file and a name, then register it across all required files so it's available as `<Icon name="iconName" />`.

## When to Use

- "Add this SVG as an icon"
- "Add a new mParticle icon"
- "Register this icon as mpSomething"

**Not for:** Rokt/Untitled UI icons from `@untitledui/icons` — see `.cursor/rules/add-untitled-ui-icon.mdc` for those.

## Required Inputs

1. **SVG source** — a file path or inline SVG content
2. **Icon name** — camelCase name for the icon (e.g., `mpGroup`, `dataFlow`)

If the user doesn't provide a name, infer one from the SVG filename or ask.

## The Process

### Step 1: Prepare the SVG

1. Read the source SVG
2. Optimize with svgo: `npx svgo <input> -o <output> --pretty`
3. Post-optimization fixes:
   - Replace `fill="black"` or `fill="none"` on the root `<svg>` with `fill="currentColor"` (enables theming)
   - Remove explicit `width` and `height` attributes — keep only `viewBox`
   - Ensure the `xmlns` attribute is present
4. Save to `src/assets/svg/mp_<category>_lt_<kebab-name>.svg`

**Category conventions:**
| Category | Prefix | Use for |
|----------|--------|---------|
| Action | `act` | Interactive actions (edit, delete, play, filter) |
| Product module | `pm` | Product areas (analytics, identity, catalog) |
| Informational | `info` | Status, context, metadata (group, user, help) |
| Data type | `data` | Data types (string, number, boolean, array) |

If unsure, default to `info`.

### Step 2: Import and export in `src/components/icons/index.ts`

Add the import (alphabetically among mParticle imports):

```typescript
import MyNewIcon from 'src/assets/svg/mp_info_lt_my-new.svg?react'
```

Add to the export block (alphabetically):

```typescript
export {
  // ...existing exports...
  MyNewIcon,
  // ...
}
```

### Step 3: Register in `src/constants/Icons.ts`

Add the import from `src/components/icons`:

```typescript
import {
  // ...existing imports...
  MyNewIcon,
} from 'src/components/icons'
```

Add the icon entry (alphabetically by key):

```typescript
myNew: {
  light: MyNewIcon,
  default: 'light',
},
```

### Step 4: Add to `src/types/icons.ts`

Add the name to the `IconNames` union (alphabetically):

```typescript
export type IconNames =
  // ...
  'myNew'
// ...
```

### Step 5: Verify

```bash
npm run build
npx tsc --noEmit
```

Both must pass before committing.

## Naming Conventions

- **SVG filename**: `mp_<category>_lt_<kebab-case-name>.svg` (e.g., `mp_info_lt_mp-group.svg`)
- **Import variable**: PascalCase ending in `Icon` (e.g., `MpGroupIcon`)
- **Icon name key**: camelCase matching the user's requested name (e.g., `mpGroup`)
- **IconNames type**: same camelCase string (e.g., `'mpGroup'`)

## Duo-tone Variants

If the user provides both light and duo-tone SVGs:

1. Name the duo-tone file `mp_<category>_dt_<kebab-name>.svg`
2. Import as `MyNewIconDt`
3. Register both variants:

```typescript
myNew: {
  light: MyNewIcon,
  'duo-tone': MyNewIconDt,
  default: 'light',
},
```

## Constraints

- **DO** run svgo to optimize every SVG before committing
- **DO** use `fill="currentColor"` on the root `<svg>` element
- **DO** remove explicit `width`/`height` — only keep `viewBox`
- **DO** verify build and tsc pass after registration
- **DO NOT** add to docs manually — the `IconTable` story auto-discovers icons from the `Icons` map
- **DO NOT** add mParticle SVG icons to `src/components/index.ts` Rokt exports section
- **DO NOT** forget any of the 4 registration files

## Reference Files

- SVG assets: `src/assets/svg/`
- Icon imports/exports: `src/components/icons/index.ts`
- Icon map: `src/constants/Icons.ts`
- Icon types: `src/types/icons.ts`
- Icon component: `src/components/general/Icon/Icon.tsx`
- Rokt icons guide: `.cursor/rules/add-untitled-ui-icon.mdc`

Related Skills

add-rokt-icons

6
from mParticle/aquarium

Add Rokt/Untitled UI icons to the Aquarium library. Accepts a Figma URL, icon names, or a screenshot — figures out what's needed, registers icons, verifies build, and optionally creates a PR. Designed for designers. Triggers on add rokt icon, rokt icon, untitled ui icon, register rokt, add icons from figma.

skill-tour

6
from mParticle/aquarium

Interactive guided tour of all available AI coding skills with live demos. Walks through headline capabilities, offers try-it-now demos, discovers repo-specific tools, and provides a cheat sheet reference. Triggers on what can you do, show skills, skill tour, available tools, capabilities, what skills.

publish-branch

6
from mParticle/aquarium

Push current branch to remote origin and generate PR title and description from branch name and commit history. Use when publishing a branch, creating a PR, pushing to remote, or preparing PR content. Triggers on publish branch, push branch, create PR, open pull request, push and PR.

pr

6
from mParticle/aquarium

Create a pull request from the current branch. Triggers on create PR/open PR/make PR/submit PR/push PR/raise PR/open a pull request/create a pull request/ready to merge/branch is ready when the user wants to turn their current branch into a GitHub pull request with a well-structured description

pr-review-handler

6
from mParticle/aquarium

Monitor PR review comments and automatically classify and address reviewer feedback including code changes, questions, and nits. Use when handling PR reviews, addressing reviewer comments, responding to code review feedback, or automating review resolution. Triggers on handle reviews, PR review, address feedback, reviewer comments, code review, review response.

jira-ticket-start

6
from mParticle/aquarium

Start work on a Jira ticket by fetching ticket details, creating a properly named feature branch, and beginning codebase investigation. Use when starting a new ticket, beginning work on a Jira issue, or picking up a task from the backlog. Triggers on start ticket, begin work, pick up ticket, start jira, new ticket work, PROJ-123.

jira-cli

6
from mParticle/aquarium

Jira ticket operations via Atlassian MCP including view, search (natural language to JQL), create, update, comment, and transition with auto-detection of ticket IDs from git branches. Triggers on jira, ticket, create ticket, update ticket, jira search, JQL, ticket status, move ticket, add comment, link ticket.

implement-ticket

6
from mParticle/aquarium

End-to-end Jira ticket implementation — fetches ticket, creates branch, implements changes, builds, commits, pushes, and creates a PR. Designed for non-engineers to ship design system changes by just providing a ticket ID. Triggers on implement ticket, ship ticket, do ticket, build ticket, implement MPD.

getting-started

6
from mParticle/aquarium

Analyze the current repo structure, build system, test setup, and conventions to provide a practical onboarding guide. Use when new to a codebase, joining a project, or wanting to understand how a repo is organized. Triggers on getting started, new to repo, onboard, how does this repo work, repo structure, codebase overview.

dry-code-reviewer

6
from mParticle/aquarium

Detects deeply nested loops with duplicated inline logic and recommends extracting into small, named functions. Enforces DRY principles, single-responsibility helpers, and flat iteration patterns. Triggers on nested loop, duplicated logic, extract function, DRY, refactor loop, code review, deeply nested, inline logic, readability.

conventional-commit

6
from mParticle/aquarium

Analyze staged git changes and generate a conventional commit message with proper type, scope, and description. Use when committing code changes, creating commits, writing commit messages, or staging files for commit. Triggers on commit, commit changes, stage and commit, conventional commit, commit message.

commit-push-watch

6
from mParticle/aquarium

Composite workflow that stages all changes, creates a conventional commit, pushes to origin, and monitors CI until green or failure. Use when you want to commit and push in one step with CI monitoring. Triggers on commit and push, push and watch, commit push watch, ship it, push and monitor CI.