using-archipy-repositories

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

Coding rules for organizing ArchiPy data access in repositories, the code that reads and coordinates data for a business area.

In plain words
What is it for?
Use them when creating or reviewing domain repositories, adapters, repository data-transfer objects, and cross-domain reads in an ArchiPy application.
Why use it?
They keep each domain's data access separate and clarify where adapters, caching, data mapping, and error handling belong.

Cursor rule for Cursor

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

Good fit Use them when creating or reviewing domain repositories, adapters, repository data-transfer objects, and cross-domain reads in an ArchiPy application.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/syntaxarc/archipy-plugin/using-archipy-repositories"><img src="https://agentmods.dev/badge/rules/syntaxarc/archipy-plugin/using-archipy-repositories.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 432 This file is loaded in full into every session.
When invoked 432 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.00432 $0.00432
Opus 5.5 $0.00173 $0.00173
Sonnet 5.5 $0.00086 $0.00086
Haiku 4.5 $0.00043 $0.00043

Measured 1mo ago against content hash 55506df99229, 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-repositories 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.

rules/using-archipy-repositories.mdc · 42 lines

What it actually says

Using ArchiPy Repositories

Each domain owns its data access under repositories/{domain}/.

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

Layout

repositories/{domain}/
├── adapters/                    # Domain wrappers around ArchiPy / external clients
│   └── {domain}_{purpose}_adapter.py
└── {domain}_repository.py       # Orchestrate adapters; map to repository DTOs

Responsibilities

  • adapters/ — entity construction, query building, thin wrappers; prefer ArchiPy extras (uv add "archipy[redis]") before inventing clients.
  • {domain}_repository.py — orchestrates adapters, cache-aside patterns, maps results to repository DTOs (*CommandDTO / *QueryDTO / *ResponseDTO).
  • Repository methods take at most one argument besides self. With two or more parameters, wrap them in one *CommandDTO (writes) or *QueryDTO (reads) under models/dtos/{domain}/repository/, e.g. get_order(query: GetOrderQueryDTO), not get_order(order_id, user_id). Callers (logics) build the DTO.
  • Raw driver exceptions are mapped inside domain adapters. Repositories receive domain-facing errors and may wrap a specific error only to add domain context, preserving the cause with raise ... from e.

Domain Isolation

  • Never import or call a repository from a different domain.
  • Cross-domain reads go through the other domain’s logic class.

Do Not

  • Put business rules or @postgres_sqlalchemy_atomic here (that belongs in logics/).
  • Create a top-level app adapters/ package — domain adapters live under repositories.
  • Leak raw driver exceptions into logics/services.
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. 1mo ago Changed · -2 tokens per session 55506df99229
  2. 1mo ago Changed · +3 lines · +88 tokens per session c1c3f0795495
  3. 2mo ago Changed · +1 lines · +16 tokens per session 716f5f53be6e
  4. 3mo ago First seen · 38 lines · 330 tokens per session scan A b158c38208d3

Subscribe to this mod's changes

using-archipy-repositories is a cursor rule published in the GitHub repository SyntaxArc/archipy-plugin (3 stars, last pushed 23d ago), licensed MIT. It adds 432 tokens to every session, about $0.0017 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-repositories compared with cursor rules from other repositories

using-archipy-repositories next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
using-archipy-repositoriesSyntaxArc/archipy-pluginCursor rule323d agoMITA432Cursor
python-flask-json-guide-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A185Cursor
java-springboot-jpa-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A1,006Cursor
py-fast-apiPatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A720Cursor
python-django-best-practices-cursorrules-prompt-fiPatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A698Cursor
pythonPatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A734Cursor
python-fastapi-best-practices-cursorrules-prompt-fPatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A486Cursor