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.
git clone --depth 1 https://github.com/JrPribs/SmarterStarterWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/jrpribs/smarterstarter/300-angular-services)<a href="https://agentmods.dev/rules/jrpribs/smarterstarter/300-angular-services"><img src="https://agentmods.dev/badge/rules/jrpribs/smarterstarter/300-angular-services/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/jrpribs/smarterstarter/300-angular-services"><img src="https://agentmods.dev/badge/rules/jrpribs/smarterstarter/300-angular-services.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00004 | $0.02299 |
| Opus 5.5 | $0.00002 | $0.00920 |
| Sonnet 5.5 | $0.00001 | $0.00460 |
| Haiku 4.5 | $0.00000 | $0.00230 |
Grade A, and why
300-angular-services 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 381 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Angular Services Best Practices
- Injectable Services: Always use the
@Injectable()decorator withprovidedIn: 'root'for singleton services.
@Injectable({
providedIn: 'root'
})
export class DataService {
// Service implementation
}
- State Management Role: Services should act as mediators between components and global state. They should contain business logic but not store state themselves.
@Injectable({
providedIn: 'root'
})
export class OrderService {
constructor(private orderStore: OrderStore, private http: HttpClient) {}
// Handle business logic and API communication before updating state
submitOrder(orderData: OrderData): Observable<Order> {
// Validate data
if (!this.validateOrder(orderData)) {
return throwError(() => new Error('Invalid order data'));
}
// Call API
return this.http.post<Order>('/api/orders', orderData).pipe(
tap(newOrder => {
// Update store on success
this.orderStore.addOrder(newOrder);
})
);
}
private validateOrder(order: OrderData): boolean {
// Business logic validation
return !!order.items.length && !!order.shippingAddress;
}
}
- Stateless Services: Services should be stateless and not maintain their own state - delegate state management to stores.
// ❌ AVOID: Service with internal state
@Injectable({ providedIn: 'root' })
export class BadCartService {
private items: CartItem[] = []; // Don't store state here
addItem(item: CartItem): void {
this.items.push(item); // State in service is bad
}
}
// ✅ GOOD: Stateless service that updates store
@Injectable({ providedIn: 'root' })
export class GoodCartService {
constructor(private cartStore: CartStore) {}
addItem(item: CartItem): void {
// Business logic, validation, etc.
if (!item.quantity) item.quantity = 1;
// Update state in store, not service
this.cartStore.addItem(item);
}
}
- Business Logic: Place all business logic in services, not in components or stores.
@Injectable({
providedIn: 'root'
})
export class PaymentService {
constructor(
private paymentStore: PaymentStore,
private http: HttpClient,
private authService: AuthService
) {}
processPayment(paymentInfo: PaymentInfo): Observable<PaymentResult> {
// Business logic
const enrichedPayment = this.enrichPaymentData(paymentInfo);
// Start processing - update UI state
this.paymentStore.setProcessing(true);
// Call API
return this.http.post<PaymentResult>('/api/payments', enrichedPayment).pipe(
tap(result => {
if (result.success) {
// Update multiple states based on business rules
this.paymentStore.addPayment(result);
} else {
this.paymentStore.setError(result.error);
}
}),
finalize(() => {
this.paymentStore.setProcessing(false);
})
);
}
private enrichPaymentData(paymentInfo: PaymentInfo): EnrichedPaymentInfo {
// Complex business logic
return {
...paymentInfo,
userId: this.authService.getCurrentUserId(),
timestamp: new Date().toISOString(),
// Add other derived properties
};
}
}
- Signal/Observable Interop: Use toSignal() and toObservable() for interop between RxJS observables and signals.
@Injectable({
providedIn: 'root'
})
export class ProductService {
constructor(
private http: HttpClient,
private productStore: ProductStore
) {}
// Load products and update store
loadProducts(): Observable<Product[]> {
return this.http.get<Product[]>('/api/products').pipe(
tap(products => {
this.productStore.setProducts(products);
})
);
}
// Perform business logic before updating store
addProduct(product: Product): Observable<Product> {
// Enrichment and validation
const enrichedProduct = this.prepareProductData(product);
return this.http.post<Product>('/api/products', enrichedProduct).pipe(
tap(newProduct => {
this.productStore.addProduct(newProduct);
})
);
}
private prepareProductData(product: Product): Product {
// Business logic to prepare data
return {
...product,
createdAt: new Date().toISOString(),
// Other transformations
};
}
}
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.
- 2mo ago First seen · 381 lines · 4 tokens per session scan A a3b9b1465e5b
300-angular-services is a cursor rule published in the GitHub repository JrPribs/SmarterStarter (2 stars, last pushed 1y ago), licensed MIT. It adds 4 tokens to every session and 2,299 once invoked, about $0.0000 per session on Opus 5.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.
Other cursor rules, from other repositories
api-property-optionality-hygiene
Fix ApiProperty/ApiPropertyOptional optionality mismatches in DTO files; use for scheduled batch fixes or DTO edits.
python
Python best practices and patterns for modern software development with Flask and SQLite.
cursor
You are working on the checkout service. Preserve transaction integrity and auditability.
django
Definitive guidelines for writing maintainable, performant, and secure Django applications, emphasizing modern best practices, clear code organization, and efficient patterns.
selectools-providers
Rules for working with LLM provider adapters in selectools.
ehs-ims-conventions
EHS IMS app — RBAC, data layer, tRPC, migrations, AI boundaries.