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.
npx agentmods add rules/syntaxarc/archipy-plugin/using-archipy-adaptersgit clone --depth 1 https://github.com/SyntaxArc/archipy-pluginWhat 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 | $0.00000 | $0.00548 |
| Opus 5 | $0.00000 | $0.00274 |
| Sonnet 5 | $0.00000 | $0.00110 |
| Haiku 4.5 | $0.00000 | $0.00055 |
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 yesterday.
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 — 80 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. Optional in-memory mock only if BDD needs it (Redis ships RedisMock).
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 mocks must satisfy the same port.
Boundary Errors
Catch specific client/driver errors and map to domain errors with raise ... from e. Never bare
except Exception unless the client exposes no typed root error:
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.
Sync vs Async
- Sync and async are separate classes — do not mix
async definto a sync adapter class. - Prefer the ArchiPy async extra when the app is async end-to-end.
Config
Adapters should read settings from BaseConfig.global_config() (or injected config), not from scattered env reads inside methods.
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.
- yesterday 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 (2 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 548 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
lians-memory
Current Lians task, control policy, and bounded context.
no-cursor-attribution
Git commits must not include Cursor co-author attribution.
python
Cursor rule "python" from jhl-labs/vibe-project, covering python rules, style guide, naming, imports and order: stdlib → third-party → local.
typescript
TypeScript/JavaScript specific rules.
architecture
Clean Architecture rules.
cursorrules
Cursor rule "cursorrules" from jhl-labs/vibe-project, covering cursor ai rules, ⚠️ deprecation notice, this .cursorrules file format is deprecated, please migrate to the new project rules system and 📁 .cursor/rules/.mdc.