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.
git clone --depth 1 https://github.com/SyntaxArc/archipy-pluginWrote 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/syntaxarc/archipy-plugin/using-archipy-adapters)<a href="https://agentmods.dev/rules/syntaxarc/archipy-plugin/using-archipy-adapters"><img src="https://agentmods.dev/badge/rules/syntaxarc/archipy-plugin/using-archipy-adapters/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/syntaxarc/archipy-plugin/using-archipy-adapters"><img src="https://agentmods.dev/badge/rules/syntaxarc/archipy-plugin/using-archipy-adapters.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.01181 | $0.01181 |
| Opus 5.5 | $0.00472 | $0.00472 |
| Sonnet 5.5 | $0.00236 | $0.00236 |
| Haiku 4.5 | $0.00118 | $0.00118 |
Grade A, and why
using-archipy-adapters 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 — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Using ArchiPy Adapters
Live: https://syntaxarc.github.io/ArchiPy/tutorials/adapters/
Prefer ArchiPy First
Install the matching extra and use the shipped adapter:
uv add "archipy[redis]"
# examples: postgres, sqlalchemy, sqlalchemy-async, kafka, scylladb, minio, keycloak, ...
from archipy.adapters.redis.adapters import RedisAdapter
redis = RedisAdapter() # reads BaseConfig.global_config().REDIS
Inject *Port abstractions into logics/repositories — not concrete adapters when DI is used.
Domain Adapter Shape
Domain adapters live under the domain repository — not a top-level adapters/ package:
repositories/<domain>/
├── adapters/
│ └── <domain>_<purpose>_adapter.py # e.g. user_db_adapter.py
└── <domain>_repository.py
Thin wrappers around ArchiPy adapters (or external clients). Own entity construction and query building. Depend on ArchiPy ports when wrapping library adapters; add a local ABC only when the domain needs a custom contract. BDD runs adapters against real testcontainers; write a port-conforming fake only for a third-party API with no container.
Ports
from abc import ABC, abstractmethod
class CachePort(ABC):
@abstractmethod
def get(self, key: str) -> str | None: ...
@abstractmethod
def set(self, key: str, value: str, ttl: int | None = None) -> None: ...
Implementations and fakes must satisfy the same port.
Boundary Errors
Catch specific client/driver errors and map to domain errors with raise ... from e. A broad except Exception
is allowed only at the outermost infrastructure boundary when the client exposes no typed root error; add a narrow
# noqa: BLE001 reason. Never use bare except::
try:
await self._client.produce(topic, message)
except KafkaError as e:
raise KafkaProduceError("Failed to produce message") from e
Never leak raw driver exceptions into logics/services.
Partial Indexes and Bound Parameters
asyncpg runs every query as a server-side prepared statement (psycopg 3 does once a query has run more than its
prepare_threshold times, 5 by default). Postgres plans the first five executions of a prepared statement with the
actual values, then may switch to a generic plan, which sees $1 instead of the value (plan_cache_mode = auto; see the
PostgreSQL docs). With asyncpg
this happens from about the sixth execution on a connection; with psycopg 3 it starts later, after the statement is
prepared. A partial index (CREATE INDEX ... WHERE status = 'PENDING') is usable only
when the planner can prove its predicate, so a filter that binds the predicate's column (field == value,
field.in_(values), or SQLAlchemyFilterMixin._apply_filter) stops matching the index once the plan goes generic. The
query falls back to a broader index or a full scan. Nothing errors, and a small development database rarely shows it.
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 Changed · +43 lines · +536 tokens per session 6bf7c3685511
- 2mo ago Changed · +1 lines · +11 tokens per session b741cb45d77b
- 2mo ago Changed · +7 lines · +86 tokens per session a154ec1073f6
- 3mo ago First seen · 80 lines · 548 tokens per session scan A 525e241b02c3
using-archipy-adapters is a cursor rule published in the GitHub repository SyntaxArc/archipy-plugin (3 stars, last pushed 23d ago), licensed MIT. It adds 1,181 tokens to every session, about $0.0047 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.
using-archipy-adapters compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| using-archipy-adaptersSyntaxArc/archipy-plugin | Cursor rule | 3 | 23d ago | MIT | A | 1,181 | Cursor |
| performance-optimizationholtwood/awesome-cursorrules-zh | Cursor rule | 244 | 1mo ago | MIT | A | 152 | Cursor |
| fastapi-performance-optimizationpaulpham157/paul-s-cursor-rules | Cursor rule | 27 | 1y ago | MIT | A | 0 | Cursor |
| py-fast-apiPatrickJS/awesome-cursorrules | Cursor rule | 41k | 6mo ago | CC0-1.0 | A | 720 | Cursor |
| python-django-best-practices-cursorrules-prompt-fiPatrickJS/awesome-cursorrules | Cursor rule | 41k | 6mo ago | CC0-1.0 | A | 698 | Cursor |
| pythonPatrickJS/awesome-cursorrules | Cursor rule | 41k | 6mo ago | CC0-1.0 | A | 734 | Cursor |
| python-fastapi-best-practices-cursorrules-prompt-fPatrickJS/awesome-cursorrules | Cursor rule | 41k | 6mo ago | CC0-1.0 | A | 486 | Cursor |