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-interceptors)<a href="https://agentmods.dev/rules/syntaxarc/archipy-plugin/using-archipy-interceptors"><img src="https://agentmods.dev/badge/rules/syntaxarc/archipy-plugin/using-archipy-interceptors/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-interceptors"><img src="https://agentmods.dev/badge/rules/syntaxarc/archipy-plugin/using-archipy-interceptors.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.00496 | $0.00496 |
| Opus 5.5 | $0.00198 | $0.00198 |
| Sonnet 5.5 | $0.00099 | $0.00099 |
| Haiku 4.5 | $0.00050 | $0.00050 |
Grade A, and why
using-archipy-interceptors 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 — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Using ArchiPy Interceptors
Helpers stay pure: no database/network I/O, no constructing adapters, no domain business rules.
Role
Interceptors are cross-cutting request/RPC/middleware hooks (metrics, auth context, logging enrichment). They are not repositories and not use-cases.
Prefer ArchiPy / AppUtils
Use ArchiPy interceptors under archipy.helpers.interceptors (FastAPI / gRPC) before inventing new ones.
Prefer AppUtils auto-registration for stock interceptors/middleware:
- FastAPI:
AppUtils.create_fastapi_appwires middleware/exception handlers and instruments througharchipy[otel,fastapi]whenOTEL.IS_ENABLED. - gRPC:
create_grpc_app/create_async_grpc_appappend exception, optional OTel traces (contrib), ArchiPy metrics (rpc.server.call.durationwhenOTEL.METRICS_ENABLED), and gRPC rate-limit interceptors. Do not hand-roll those stock hooks; metrics install is independent of traces. - FastAPI rate limiting is not shipped by ArchiPy 5.x; use
fastapi-redis-sdkwhen required.
Do not manually re-wire stock ArchiPy interceptors unless customizing beyond config flags.
Live: https://syntaxarc.github.io/ArchiPy/tutorials/helpers/interceptors/
Custom Interceptors
- Live under
helpers/interceptors/. - Keep them framework-aware but business-logic-free.
- Wire via DI container, framework registration, or
customized_interceptors=on gRPC AppUtils — do not have adapters import interceptors at module level to register themselves. - Sync and async variants stay separate when both exist.
- Raise/map through
archipy.models.errors; do not invent ad-hoc exception classes or leak framework/driver errors.
Do Not
- Embed use-case logic inside interceptors.
- Call databases or downstream services directly; inject context already resolved at the appropriate boundary.
- Perform multi-step domain writes here (that belongs in
logics/with atomic boundaries). - Leak infrastructure exceptions — map to domain/HTTP/gRPC errors at the appropriate boundary.
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 · +2 tokens per session d58556f32008
- 2mo ago Changed · +6 lines · +116 tokens per session 14a0a5cbfdc6
- 3mo ago First seen · 40 lines · 378 tokens per session scan A a71ca4c92076
using-archipy-interceptors is a cursor rule published in the GitHub repository SyntaxArc/archipy-plugin (3 stars, last pushed 23d ago), licensed MIT. It adds 496 tokens to every session, about $0.0020 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-interceptors compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| using-archipy-interceptorsSyntaxArc/archipy-plugin | Cursor rule | 3 | 23d ago | MIT | A | 496 | Cursor |
| python-flask-json-guide-cursorrules-prompt-filePatrickJS/awesome-cursorrules | Cursor rule | 41k | 6mo ago | CC0-1.0 | A | 185 | 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 |
| fastapiPatrickJS/awesome-cursorrules | Cursor rule | 41k | 6mo ago | CC0-1.0 | A | 427 | Cursor |