Skip to content
Back to skills

Scaffold Analytics Ids

ASecurity

Creates or extends a Flutter feature-level `*_ids.dart` file with LeanCode analytics IDs for pages and clickable elements. Use when adding a new feature, page, or tracked action.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 25, 2026
ai-agentsrails

Works with

  • cli

Security analysis

A100/100

Scanned September 25, 2026

npx -y skills add leancodepl/ai-plugins --skill scaffold-analytics-ids --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Scaffold Analytics Ids?

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

Security grade badge for Scaffold Analytics Ids
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leancodepl-scaffold-analytics-ids/badge)](https://www.skillsdirectory.com/skills/leancodepl-scaffold-analytics-ids)

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: scaffold-analytics-ids
description: Creates or extends a Flutter feature-level `*_ids.dart` file with LeanCode analytics IDs for pages and clickable elements. Use when adding a new feature, page, or tracked action.
argument-hint: "<feature-name> [--page <page-name>] [--action <action-name>]"
---

# Scaffold Analytics IDs

Create or extend a feature-level `<feature_name>_ids.dart` file.

## Inputs to confirm

1. Feature name in `snake_case`.
2. Single-page or multi-page feature.
3. Page names that need IDs.
4. Clickable actions that need `AnalyticsId` entries.

## Workflow

1. Locate or create `lib/features/<feature_name>/<feature_name>_ids.dart`.
2. Name the class `<FeatureName>AnalyticsId`.
3. Add page IDs as `static const String` fields first.
4. Add clickable IDs below them as `AnalyticsId` fields or factory methods.
5. If one action exists on multiple pages, use a factory method that accepts the page ID.

## Templates

Single-page feature:

```dart
class BookingAnalyticsId {
  static const page = 'BookingPage';

  static final confirmButton = AnalyticsId('ConfirmButton', page);
}
```

Multi-page feature:

```dart
class BookingAnalyticsId {
  static const listPage = 'BookingListPage';
  static const detailsPage = 'BookingDetailsPage';

  static AnalyticsId submitButton(String page) =>
      AnalyticsId('SubmitButton', page);
}
```

## Guardrails

- Keep analytics strings only in the IDs file.
- If the project has no `AnalyticsId` class yet, set it up first as described in `../flutter-analytics-usage/references/analytics-wiring.md`.
- Do not duplicate the same action as separate string literals across pages.
- Prefer stable action names like `ConfirmButton`, `AddButton`, `RetryButton`.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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