add-feature-template

add-feature-template is a cursor rule for Cursor from abhinav503/flutter-agentic. It costs 15 tokens per session (1,752 once invoked), scanned A, original, MIT.

A scaffold for adding a new feature to a Flutter application. Scaffolding creates the expected folders and file structure without implementing the feature’s business logic.

In plain words
What is it for?
It is for creating feature folders, running code generation and static analysis, and applying the project’s rules when starting a feature.
Why use it?
It gives new features a consistent project structure and prevents common mistakes with names, imports, dependency registration, and generated code.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/abhinav503/flutter-agentic/add-feature-template
Clone the repo
git clone --depth 1 https://github.com/abhinav503/flutter-agentic

Made for: Cursor.

Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,752 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.01752
Opus 5 $0.00008 $0.00876
Sonnet 5 $0.00003 $0.00350
Haiku 4.5 $0.00002 $0.00175

Measured 3d ago against content hash 85310b94ea14, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-feature-template scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/add-feature-template.mdc · 220 lines

How it starts

The opening of the file, as written. The whole thing — 220 lines — stays where its author put it; the contents beside it link to each section on GitHub.

If the feature name was not provided, ask: "What is the feature name? (e.g. products, auth, settings)"

{Feature} = PascalCase · {feature} = snake_case · {Action} = PascalCase verb · {action} = snake_case verb (e.g. GetProducts / get_products)

Scaffold only — do NOT create entity, model, or use case files. BLoCs are never registered in GetIt. Imports: core types -> package:core/core/...; app-level di/constants -> package:{app}/...; same-feature files -> relative. Never the old single-app package:flutter_agentic/.... Run make gen and make analyze at the end before reporting done.


1. Folder tree

mkdir -p apps/{app}/lib/feature/{feature}/data/data_source
mkdir -p apps/{app}/lib/feature/{feature}/data/models
mkdir -p apps/{app}/lib/feature/{feature}/data/repository_impl
mkdir -p apps/{app}/lib/feature/{feature}/domain/entities
mkdir -p apps/{app}/lib/feature/{feature}/domain/repository
mkdir -p apps/{app}/lib/feature/{feature}/domain/usecase
mkdir -p apps/{app}/lib/feature/{feature}/presentation/bloc
mkdir -p apps/{app}/lib/feature/{feature}/presentation/view
mkdir -p apps/{app}/lib/feature/{feature}/presentation/widgets

2. Domain — repository interface

apps/{app}/lib/feature/{feature}/domain/repository/{feature}_repository.dart

abstract interface class {Feature}Repository {}

3. Data — remote data source

{feature}_remote_data_source.dart

abstract interface class {Feature}RemoteDataSource {}

{feature}_remote_data_source_impl.dart

import '{feature}_remote_data_source.dart';

// const no-arg; reaches the network via HttpService.instance (from core),
// e.g. HttpService.instance.get<Map<String, dynamic>>(ApiConstants.someUrl).
class {Feature}RemoteDataSourceImpl implements {Feature}RemoteDataSource {
  const {Feature}RemoteDataSourceImpl();
}

4. Data — repository impl

apps/{app}/lib/feature/{feature}/data/repository_impl/{feature}_repository_impl.dart

import 'package:core/core/base/base_repository.dart';
import '../../domain/repository/{feature}_repository.dart';
import '../data_source/{feature}_remote_data_source.dart';

class {Feature}RepositoryImpl with BaseRepository implements {Feature}Repository {
  final {Feature}RemoteDataSource _dataSource;
  const {Feature}RepositoryImpl(this._dataSource);
}

Read the full file on GitHub · 220 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 220 lines · 15 tokens per session scan A 85310b94ea14

Subscribe to this mod's changes

add-feature-template is a cursor rule published in the GitHub repository abhinav503/flutter-agentic (10 stars, last pushed 10d ago), licensed MIT. It adds 15 tokens to every session and 1,752 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.