Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/CharLEE-X/effect-cursor-rulesnpx agentmods add rules/charlee-x/effect-cursor-rules/api-client-patternsWrote 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/charlee-x/effect-cursor-rules/api-client-patterns)<a href="https://agentmods.dev/rules/charlee-x/effect-cursor-rules/api-client-patterns"><img src="https://agentmods.dev/badge/rules/charlee-x/effect-cursor-rules/api-client-patterns/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/charlee-x/effect-cursor-rules/api-client-patterns"><img src="https://agentmods.dev/badge/rules/charlee-x/effect-cursor-rules/api-client-patterns.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.00000 | $0.02387 |
| Opus 5.5 | $0.00000 | $0.00955 |
| Sonnet 5.5 | $0.00000 | $0.00477 |
| Haiku 4.5 | $0.00000 | $0.00239 |
Grade A, and why
api-client-patterns 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 1mo 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 — 368 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Client Patterns
Guidelines for creating and maintaining API clients that communicate with backend services in the T6C project.
Client Organization Principles
One Client Per API Service
- ALWAYS create a dedicated client package for each API service
- Client naming convention:
{service-name}-api-client(e.g.,blog-api-client,user-api-client) - Service class naming:
{ServiceName}Service(e.g.,BlogPostService,UserService)
// ✅ CORRECT - Dedicated client for blog API
export class BlogPostService extends E.Service<BlogPostService>()(
'@web/BlogPostService',
{
dependencies: [FetchHttpClient.layer],
effect: E.gen(function* () {
const client = yield* createHttpClient({
url: envVars.BLOG_SERVICE_URL,
apiKey: envVars.BLOG_SERVICE_API_KEY,
})
return {
// ... methods
}
}),
},
) {}
Import Patterns
Standard Imports
- Always use relative paths for internal imports
- Import types with
typekeyword when used only for typing - Import schemas without
typewhen used for encoding/decoding
// ✅ CORRECT - Import patterns
import {
FetchHttpClient,
HttpClientRequest,
HttpClientResponse,
} from '@effect/platform'
import {
BlogPost,
BlogPostCategory,
type BlogPostPatches,
CreateBlogPostInput,
GetBlogPageInput,
} from '@t6c/blog-domain'
import {
type BlogPostId,
PaginationSchema,
type SearchParamsSchema,
type UserId,
} from '@t6c/domain-common'
import { NotFoundError, createHttpClient } from '@t6c/lib-api'
import { Data, Effect as E, Layer, Schema as S } from 'effect'
import { envVars } from '../config.js'
Method Implementation Patterns
HTTP Method Mapping
- GET requests for data retrieval
- POST requests for resource creation
- PUT requests for resource updates
- DELETE requests for resource deletion
// ✅ CORRECT - HTTP method usage
createDraft: ({ authorId }: { authorId: UserId }) =>
HttpClientRequest.post('/v1/blog').pipe(
HttpClientRequest.bodyJson(CreateBlogPostInput.make({ authorId })),
// ...
),
updateAttributes: (blogPostId: string, patches: BlogPostPatches) =>
HttpClientRequest.put(`/v1/blog/${blogPostId}`).pipe(
HttpClientRequest.bodyJson(patches),
// ...
),
delete: (id: string) =>
HttpClientRequest.del(`/v1/blog/${id}`).pipe(
// ...
),
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.
- 1mo ago First seen · 368 lines · 2,387 tokens per session scan A 835ce53b913c
api-client-patterns is a cursor rule published in the GitHub repository CharLEE-X/effect-cursor-rules (6 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,387 tokens. 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.
server-state
USE WHEN: Fetching and caching server data with TanStack Query 5: queryOptions, hooks, mutations, invalidation.
selectools-providers
Rules for working with LLM provider adapters in selectools.