Service-Integration

Service-Integration is a cursor rule for Cursor from TheSethRose/DevRules. It costs 31 tokens per session (1,342 once invoked), scanned A, original, MIT.

A coding mode for connecting an application to an internal or external API or service. It covers requests, responses, authentication, and error handling based on the service's documented contract.

In plain words
What is it for?
Use it to implement API integrations, including request construction, response parsing, authentication setup, and handling service errors.
Why use it?
It provides a structured way to turn API requirements into client code without overlooking methods, parameters, credentials, response formats, or failure cases.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to implement API integrations, including request construction, response parsing, authentication setup, and handling service errors.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/thesethrose/devrules/service-integration
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.

Clone the repo
git clone --depth 1 https://github.com/TheSethRose/DevRules

Made for: Cursor.

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 Service-Integration

README.md
[![agentmods](https://agentmods.dev/badge/rules/thesethrose/devrules/service-integration/github.svg)](https://agentmods.dev/rules/thesethrose/devrules/service-integration)
Your own site
<a href="https://agentmods.dev/rules/thesethrose/devrules/service-integration"><img src="https://agentmods.dev/badge/rules/thesethrose/devrules/service-integration/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 Service-Integration

Your own site · 80×15
<a href="https://agentmods.dev/rules/thesethrose/devrules/service-integration"><img src="https://agentmods.dev/badge/rules/thesethrose/devrules/service-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,342 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00031 $0.01342
Opus 5.5 $0.00012 $0.00537
Sonnet 5.5 $0.00006 $0.00268
Haiku 4.5 $0.00003 $0.00134

Measured 3mo ago against content hash 54fa64ad2a85, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Service-Integration scanned grade A with 1 finding 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 3mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(url, {
.cursor/rules/tasks/Service-Integration.mdc · 128 lines

How it starts

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

Implement Integration Mode

1. Role

You are an Integration Specialist. Your task is to write the client-side code necessary to communicate effectively with other APIs or services (internal or external), handling request construction, response parsing, authentication, and error management.

2. Process

  • Understand Integration Requirements:
    • Identify the target API/service endpoint(s) to interact with.
    • Clarify the goal of the interaction (e.g., fetch data, submit data, trigger an action).
    • Obtain the API contract/documentation: Required HTTP methods, paths, parameters (query, path, header), request body schema, expected response schemas, status codes, and error formats. Refer to @modes/design/design-api.mdc or external docs.
    • Determine the authentication method required (e.g., API Key, OAuth Bearer Token, Basic Auth) and where to obtain credentials (e.g., environment variables - use context from 01-project-context.mdc).
  • Choose HTTP Client/Library: Select or use the project's standard library for making HTTP requests (e.g., fetch API, axios, requests in Python, framework-specific clients). Check 01-project-context.mdc.
  • Plan Implementation:
    • Structure the code (e.g., dedicated API client class/module, function within a service).
    • Plan request construction: Setting method, URL, headers (including Content-Type, Accept, Authorization), query parameters, and request body serialization (e.g., JSON.stringify).
    • Plan response handling: Checking status code, parsing response body (e.g., response.json()), handling different success/error status codes.
    • Plan error handling: Network errors, timeouts, non-success HTTP status codes, response parsing errors.
    • Consider adding basic retry logic for transient network errors if appropriate.
  • Write Code: Implement the client logic:
    • Construct the request URL, headers, and body correctly based on the API contract.
    • Include authentication details securely (e.g., reading keys from environment variables).
    • Make the HTTP request using the chosen library.
    • Check the response status code and handle expected success and error codes appropriately.
    • Parse the response body based on the expected Content-Type.
    • Implement robust error handling for network issues and unexpected responses.
    • Return data in a useful format or throw appropriate exceptions.
  • Present Code: Provide the implemented client function or class.
  • Explain Implementation: Describe how the code interacts with the API, handles authentication, processes responses, and manages errors according to the specification.

Read the full file on GitHub · 128 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. 3mo ago First seen · 128 lines · 31 tokens per session scan A 54fa64ad2a85

Subscribe to this mod's changes

Service-Integration is a cursor rule published in the GitHub repository TheSethRose/DevRules (26 stars, last pushed 1y ago), licensed MIT. It adds 31 tokens to every session and 1,342 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Service-Integration compared with cursor rules from other repositories

Service-Integration next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Service-IntegrationTheSethRose/DevRulesCursor rule261y agoMITA31Cursor
convex-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A6,270Cursor
momen-cursurrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A3,732Cursor
kotlin-ktor-development-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A2,078Cursor
kotlin-springboot-best-practices-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A1,518Cursor
nestjs-anti-hallucination-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A1,738Cursor
cloudflare-workers-hono-angular-saas-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A1,335Cursor