create-client

A project guide for wrapping third-party plugins and system APIs in small application-owned clients. The wrapper hides plugin-specific details behind methods used by the rest of the app.

In plain words
What is it for?
Use it to add or change a client for services such as local storage, networking, or device information, and register it for shared use.
Why use it?
It keeps external libraries and their error handling out of the rest of the codebase, making integrations more consistent to use.

Skill for Claude CodeCodex

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 skills/anoopsg/agent_rules/create-client
Any agent
npx skills add anoopsg/agent_rules --skill create-client
Clone the repo
git clone --depth 1 https://github.com/anoopsg/agent_rules

Made for: Claude Code, Codex.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 572 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.00050 $0.00572
Opus 5 $0.00025 $0.00286
Sonnet 5 $0.00010 $0.00114
Haiku 4.5 $0.00005 $0.00057

Measured yesterday against content hash 945fa382985d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-client 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 yesterday.

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-client/SKILL.md · 91 lines

How it starts

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

Client Creation Skill

This skill defines the process for creating a new low-level client in the infrastructure/_clients/ directory.

1. Overview

Clients are high-level wrappers around third-party plugins or system APIs (e.g., shared_preferences, dio, package_info). They encapsulate the configuration and complexity of these tools, providing a clean interface for the rest of the infrastructure layer.

2. Directory Structure

Clients are stored in lib/src/infrastructure/_clients/:

lib/src/infrastructure/_clients/
├── _clients.dart        # Barrel file
├── my_plugin_client.dart # The client implementation
└── ...

3. Implementation Pattern

Follow these rules when creating a client:

  • Naming: Use PascalCase + Client (e.g., LocationClient).
  • DI: Provide the client via a Riverpod provider with keepAlive: true.
  • Encapsulation: Hide plugin-specific types behind your own methods where possible.
  • Error Handling: Use try/catch blocks and log errors using dart:developer.

3.1 Example Implementation

import 'dart:developer' as developer;
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:my_plugin/my_plugin.dart';

part 'my_plugin_client.g.dart';

@Riverpod(keepAlive: true)
MyPluginClient myPluginClient(Ref ref) => MyPluginClient();

class MyPluginClient {
  final _plugin = MyPlugin();

  Future<bool> doSomething() async {
    try {
      await _plugin.execute();
      return true;
    } on Object catch (e, st) {
      developer.log(
        'MyPluginClient.doSomething failed',
        name: 'MyPluginClient',
        error: e,
        stackTrace: st,
      );
      return false;
    }
  }
}

4. Barrel File

Always export your new client in lib/src/infrastructure/_clients/_clients.dart:

export 'my_plugin_client.dart';

5. Usage in Repositories

Clients are injected into repositories via their constructors. Repositories then use the client's clean methods to perform data operations.

Read the full file on GitHub · 91 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. yesterday First seen · 91 lines · 50 tokens per session scan A 945fa382985d

Subscribe to this mod's changes

create-client is a skill published in the GitHub repository anoopsg/agent_rules (2 stars, last pushed 1mo ago), licensed MIT. It adds 50 tokens to every session and 572 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.

Related

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"…

AsyrafHussin/agent-skills · 109 tokens

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…

AsyrafHussin/agent-skills · 110 tokens

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

AsyrafHussin/agent-skills · 59 tokens

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.

AsyrafHussin/agent-skills · 59 tokens

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…

AsyrafHussin/agent-skills · 87 tokens

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…

AsyrafHussin/agent-skills · 115 tokens