create-infrastructure

create-infrastructure is a skill for Claude Code, Codex from anoopsg/agent_rules. It costs 57 tokens per session (1,244 once invoked), scanned A, original, MIT.

A project guide for adding data and network code for a business area. It covers data models, API services, and repositories—the app code that fetches, stores, and exposes data.

In plain words
What is it for?
Use it to create a repository, API service, immutable data model, or complete infrastructure domain using the project's Dart libraries.
Why use it?
It gives new backend-facing code a consistent structure and standard ways to convert data, call APIs, and provide repositories to the app.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create a repository, API service, immutable data model, or complete infrastructure domain using the project's Dart libraries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anoopsg/agent_rules/create-infrastructure
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.

Any agent
npx skills add anoopsg/agent_rules --skill create-infrastructure
Clone the repo
git clone --depth 1 https://github.com/anoopsg/agent_rules

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for create-infrastructure

README.md
[![agentmods](https://agentmods.dev/badge/skills/anoopsg/agent_rules/create-infrastructure/github.svg)](https://agentmods.dev/skills/anoopsg/agent_rules/create-infrastructure)
Your own site
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/create-infrastructure"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/create-infrastructure/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.

agentmods 80×15 button for create-infrastructure

Your own site · 80×15
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/create-infrastructure"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/create-infrastructure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,244 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00057 $0.01244
Opus 5.5 $0.00023 $0.00498
Sonnet 5.5 $0.00011 $0.00249
Haiku 4.5 $0.00006 $0.00124

Measured 22d ago against content hash 5684ad369a25, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 22d 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.

src/exclusive/skills/create-infrastructure/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 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 feature's data layer, covering models, repositories, and persistence. Backend calls go through the shared ApiClient (see the add-api-endpoint skill). Shared low-level clients live in lib/src/infrastructure/ (see the create-client skill).

1. Directory Structure

Each feature owns its data layer inside lib/src/features/. A flat feature (e.g. settings) uses data/; a feature group with sub-features (e.g. auth) uses _self/data/:

lib/src/features/my_domain/data/   # or my_domain/_self/data/ for a group
├── models/             # Domain Models, shaped for the app
│   └── user_profile.dart # Uses dart_mappable (no `_model` suffix)
├── my_repository.dart  # Business logic interface
└── data.dart           # Barrel file

Export data.dart from the feature barrel (e.g. my_domain.dart).

A feature has no services/, DTOs or mocks/. Chopper services, DTOs and mock fixtures live in the API adapter under lib/src/infrastructure/api/adapters/openapi/ and are added with the add-api-endpoint skill. Small helpers the repository needs may sit next to it (e.g. session_storage.dart in auth/_self/data/).

2. Data Modeling (dart_mappable)

Always use @MappableClass() for models to get built-in JSON conversion and equality. Models must be immutable.

@MappableClass()
class const UserProfile({
  required final String id,
  required final String email,
}) with UserProfileMappable;
  • Shape models for the app, not the wire. JSON keys and API shapes belong to the adapter's DTOs, which map to your model with toModel().
  • Mappers register automatically. lib/src/_bootstrap/mappers.dart initializes every mapper of the package after melos run generate; never register them by hand.

3. Backend Calls (ApiClient)

The app has one ApiClient in lib/src/infrastructure/api/api_client.dart. Each method is named after an operationId in contracts/openapi.json and returns your feature model as a Result; the openapi adapter maps its DTOs and errors to it. Repositories never touch Chopper, http, DTOs or mocks.

Read the full file on GitHub · 146 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. 22d ago Changed · -12 lines · -2 tokens per session 5684ad369a25
  2. 1mo ago Changed 46dd3e39dcaa
  3. 1mo ago Changed · +8 lines · +7 tokens per session d88b54bd404f
  4. 1mo ago Changed · -8 lines cc1707375289
  5. 3mo ago First seen · 158 lines · 52 tokens per session scan A baeab004203f

Subscribe to this mod's changes

create-infrastructure is a skill published in the GitHub repository anoopsg/agent_rules (2 stars, last pushed 23d ago), licensed MIT. It adds 57 tokens to every session and 1,244 once invoked, about $0.0002 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.

Related

create-infrastructure compared with skills from other repositories

create-infrastructure next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
create-infrastructureanoopsg/agent_rulesSkill223d agoMITA57Claude Code, Codex
laravel-inertia-reactAsyrafHussin/agent-skillsSkill111todayMITA59Claude Code, Codex
laravel-best-practicesAsyrafHussin/agent-skillsSkill111todayMITA54Claude Code, Codex
laravel-queuesAsyrafHussin/agent-skillsSkill111todayMITA105Claude Code, Codex
api-design-patternsAsyrafHussin/agent-skillsSkill111todayMITA59Claude Code, Codex
laravel-mcpAsyrafHussin/agent-skillsSkill111todayMITA51Claude Code, Codex
designing-data-intensive-applicationsciembor/agent-rules-booksSkill3.4k2mo agoMITA34Claude Code, Codex