using-archipy-services

using-archipy-services is a cursor rule for Cursor from SyntaxArc/archipy-plugin. It costs 1,551 tokens per session, scanned A, original, MIT.

A coding rule for building ArchiPy web and gRPC services. It keeps transport code focused on validating requests, calling application logic, and converting results into responses.

In plain words
What is it for?
Use it when creating or organizing ArchiPy service endpoints, including versioned APIs and FastAPI or gRPC startup code.
Why use it?
It prevents business rules from being mixed with HTTP or gRPC details. It also avoids duplicating shared setup such as error handling and middleware.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when creating or organizing ArchiPy service endpoints, including versioned APIs and FastAPI or gRPC startup code.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/syntaxarc/archipy-plugin/using-archipy-services
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/SyntaxArc/archipy-plugin

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 using-archipy-services

README.md
[![agentmods](https://agentmods.dev/badge/rules/syntaxarc/archipy-plugin/using-archipy-services/github.svg)](https://agentmods.dev/rules/syntaxarc/archipy-plugin/using-archipy-services)
Your own site
<a href="https://agentmods.dev/rules/syntaxarc/archipy-plugin/using-archipy-services"><img src="https://agentmods.dev/badge/rules/syntaxarc/archipy-plugin/using-archipy-services/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 using-archipy-services

Your own site · 80×15
<a href="https://agentmods.dev/rules/syntaxarc/archipy-plugin/using-archipy-services"><img src="https://agentmods.dev/badge/rules/syntaxarc/archipy-plugin/using-archipy-services.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,551 This file is loaded in full into every session.
When invoked 1,551 The same file — it is already loaded in full.
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.01551 $0.01551
Opus 5.5 $0.00620 $0.00620
Sonnet 5.5 $0.00310 $0.00310
Haiku 4.5 $0.00155 $0.00155

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

Security

Grade A, and why

using-archipy-services 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 4d 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.

rules/using-archipy-services.mdc · 113 lines

How it starts

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

Using ArchiPy Services

Services are thin transport adapters (HTTP routers / gRPC servicers). Bootstrap often lives in manage.py — follow this rule there too.

Live: https://syntaxarc.github.io/ArchiPy/getting-started/project_structure/

Responsibilities

  • Validate and translate HTTP/gRPC requests into domain *InputDTO.
  • Call the appropriate logic class; return domain *OutputDTO.
  • Let AppUtils exception handlers/interceptors map ArchiPy BaseError status metadata. Add transport-specific mapping only when the domain error has no suitable mapping; never expose internal exception text.
  • Version in path: services/{domain}/v{n}/ — not in business logic.

REST resource paths (FastAPI)

Paths are hierarchical resources: /api/v{n}/<collection>/{<resource>_uuid}/<child-collection>/{<child>_uuid}/...

/api/v1/users/{user_uuid}/campaigns/{campaign_uuid}/ad-groups/{ad_group_uuid}/ad-items/{ad_item_uuid}
  • kebab-case for every literal segment (ad-groups, ad-items) — never snake_case, camelCase, or PascalCase.
  • Plural nouns for collections; the HTTP method is the verb, so no /get-user or /createCampaign. Use a sub-resource or a kebab-case action segment only when no CRUD verb fits (POST .../campaigns/{campaign_uuid}/pause).
  • Nesting expresses ownership: a child id is only meaningful under its parent, and the logic must verify the parent owns the child instead of trusting the URL.
  • Path parameters are snake_case Python names typed UUID (user_uuid: UUID), so FastAPI validates them; keep the placeholder name identical at every level ({campaign_uuid}, not {id}).
  • Version prefix /api/v{n} comes from the router (APIRouter(prefix="/api/v1")), one version per services/{domain}/v{n}/. Do not repeat the version in child routes.
  • Collection root has no trailing slash (/api/v1/users); do not mix trailing-slash styles.

Actor identity and audit columns (JWT auth)

With any JWT-based auth (fastapi_auth / grpc_auth from archipy.adapters.keycloak.auth, JWTUtils, or another issuer) the acting principal comes from the verified access token, never from a path parameter. With the Keycloak guards it is an AuthenticatedUserDTO, also readable anywhere below the endpoint through AuthContextManager (do not read request.state.user_info and friends; they warn and go away in 6.0.0); for other JWTs read the claims the same way: actor = act.sub (RFC 8693 delegation/impersonation) when present, else sub.

Read the full file on GitHub · 113 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. 4d ago Changed · -5 lines · +37 tokens per session 2614a1549908
  2. 19d ago Changed · +44 tokens per session 7ce5532ec6cb
  3. 1mo ago Changed · +26 lines · +470 tokens per session ddc8e6966896
  4. 1mo ago Changed · +20 lines · +348 tokens per session b5610d350fa7
  5. 1mo ago Changed · +4 lines · +74 tokens per session b633aaea608b
  6. 1mo ago Changed · +3 tokens per session 5e518ef7f2a2
  7. 2mo ago Changed · +2 lines · +49 tokens per session a3f382f32153
  8. 2mo ago First seen · 66 lines · 526 tokens per session scan A 340f10e8a74d

Subscribe to this mod's changes

using-archipy-services is a cursor rule published in the GitHub repository SyntaxArc/archipy-plugin (3 stars, last pushed 5d ago), licensed MIT. It adds 1,551 tokens to every session, about $0.0062 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

using-archipy-services compared with cursor rules from other repositories

using-archipy-services next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
using-archipy-servicesSyntaxArc/archipy-pluginCursor rule35d agoMITA1,551Cursor
python-flask-json-guide-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A185Cursor
py-fast-apiPatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A720Cursor
python-django-best-practices-cursorrules-prompt-fiPatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A698Cursor
pythonPatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A734Cursor
python-fastapi-best-practices-cursorrules-prompt-fPatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A486Cursor
fastapiPatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A427Cursor