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.
npx agentmods add skills/anoopsg/agent_rules/create-infrastructurenpx skills add anoopsg/agent_rules --skill create-infrastructuregit clone --depth 1 https://github.com/anoopsg/agent_rulesWhat 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 | $0.00052 | $0.00995 |
| Opus 5 | $0.00026 | $0.00498 |
| Sonnet 5 | $0.00010 | $0.00199 |
| Haiku 4.5 | $0.00005 | $0.00100 |
Grade A, and why
create-infrastructure 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 2d 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 — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Infrastructure Creation Skill
This skill defines the process for creating a new domain in the
infrastructure/ layer, covering models, networking, and repositories.
1. Directory Structure
Infrastructure is organized by domain in lib/src/infrastructure/:
lib/src/infrastructure/my_domain/
├── models/ # DTOs and Domain Models
│ └── user_model.dart # Uses dart_mappable
├── services/ # Remote API definitions (Chopper)
│ └── my_service.dart
├── my_repository.dart # Business logic interface
└── my_domain.dart # Barrel file
2. Data Modeling (dart_mappable)
Always use @MappableClass() for models to get built-in JSON conversion
and equality. Models must be immutable.
@MappableClass()
class UserProfile with UserProfileMappable {
const UserProfile({
required this.id,
required this.email,
});
final String id;
final String email;
}
3. Networking (Chopper)
Define API services as abstract classes extending ChopperService. Use
apiClient to consume them.
3.1 Define the Service
@ChopperApi()
abstract class MyService extends ChopperService {
static MyService create([ChopperClient? client]) => _$MyService(client);
@GET(path: '/profile')
Future<Response<UserProfile>> getProfile();
}
3.2 Register the Service
Add the service to apiClient in lib/src/infrastructure/_clients/api_client.dart:
@Riverpod(keepAlive: true)
ApiClient apiClient(Ref ref) {
return ApiClient(
services: [
MyService.create(), // Register here
],
);
}
4. Repositories
Repositories bridge the gap between clients (API, Storage) and the Features.
- Rule: NEVER import from
src/features/intosrc/infrastructure/. - Pattern: Return
Result<T, Failure>for operations that can fail.
4.1 Define Error Codes & Failures
Errors are centralized. You must define a technical code and its translation.
- Register the Code in
lib/src/infrastructure/error_codes.dart:
enum AppErrorCode implements ErrorCode {
myFeature404('myFeature404'), // Key in i18n
// ...
}
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.
- 2d ago First seen · 158 lines · 52 tokens per session scan A baeab004203f
create-infrastructure is a skill published in the GitHub repository anoopsg/agent_rules (2 stars, last pushed 1mo ago), licensed MIT. It adds 52 tokens to every session and 995 once invoked, about $0.0003 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.
Other skills, from other repositories
technical-debt
Technical debt inventory, prioritization, and audit for PHP/Laravel (MySQL) and Node/TypeScript/React projects. Use when assessing code health, identifying refactoring candidates, planning debt paydown, or auditing a codebase for accumulated debt. Triggers on "audit technical debt", "find tech debt", "debt inventory"…
code-slop
Detect AI-generated code patterns ("slop") in PHP/Laravel and TypeScript/React source — comment narration, generic naming, premature interfaces, defensive overdose, mock-everything tests, and the absence of human "scars". Use when reviewing AI-assisted PRs, auditing code for taste/quality (not metrics — that's…
git-workflow
Git best practices, branching strategies, commit conventions, and PR workflows. Use when reviewing git history, writing commits, setting up branching strategy, or improving git practices. Triggers on "git best practices", "commit message", "branching strategy", or "PR workflow".
laravel-inertia-react
Laravel + Inertia.js + React integration patterns. Use when building Inertia page components, handling forms with useForm, managing shared data, or implementing persistent layouts. Triggers on tasks involving Inertia.js, page props, form handling, or Laravel React integration.
laravel-owasp-security
OWASP Top 10 security audit and secure coding guidelines for Laravel + React/Inertia.js applications. Use when auditing for vulnerabilities ("run OWASP audit", "security review", "check my app security") or writing secure Laravel code involving auth, payments, file uploads, or API design. Triggers on security-related…
project-docs
Project documentation lifecycle for PHP/Laravel and Node/TypeScript/React projects — bootstrapping essential docs, naming and folder conventions, freshness, and cleanup of AI-generated junk and stale files. Use when starting a new project, setting up docs/ structure, auditing markdown files, cleaning up the docs…