scaffold-archipy-interceptor

scaffold-archipy-interceptor is a skill for Claude Code, Codex from SyntaxArc/archipy-plugin. It costs 43 tokens per session (543 once invoked), scanned A, original, MIT.

A code scaffold for adding interceptors to an ArchiPy application. An interceptor is code that runs around requests or service calls for shared concerns such as logging, metrics, or authentication context.

In plain words
What is it for?
Use it to add or connect FastAPI or gRPC interceptors, such as request IDs, logging, metrics, or authentication context handling.
Why use it?
It gives shared request behavior a proper place, keeping cross-cutting tasks separate from individual business operations and endpoints.

Skill for Claude CodeCodex

Part of the archipy plugin — 12 skills, 19 commands shipped together

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.

agentmods
npx agentmods add skills/syntaxarc/archipy-plugin/scaffold-archipy-interceptor
Any agent
npx skills add SyntaxArc/archipy-plugin --skill scaffold-archipy-interceptor
Clone the repo
git clone --depth 1 https://github.com/SyntaxArc/archipy-plugin

Made for: Claude Code, Codex.

Or install archipy, the plugin that ships this one along with the rest of its 12 skills, 19 commands.

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 scaffold-archipy-interceptor

README.md
[![agentmods](https://agentmods.dev/badge/skills/syntaxarc/archipy-plugin/scaffold-archipy-interceptor.svg)](https://agentmods.dev/skills/syntaxarc/archipy-plugin/scaffold-archipy-interceptor)
Your own site
<a href="https://agentmods.dev/skills/syntaxarc/archipy-plugin/scaffold-archipy-interceptor"><img src="https://agentmods.dev/badge/skills/syntaxarc/archipy-plugin/scaffold-archipy-interceptor.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 543 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00043 $0.00543
Opus 5 $0.00022 $0.00271
Sonnet 5 $0.00009 $0.00109
Haiku 4.5 $0.00004 $0.00054

Measured 5d ago against content hash 8728b08eeb89, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scaffold-archipy-interceptor 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 5d 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.

skills/scaffold-archipy-interceptor/SKILL.md · 80 lines

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.

Scaffold ArchiPy Interceptor

Scope

Only helpers/interceptors/. Do not create utils or decorators here.

Before writing files

Ask:

  1. Framework: FastAPI, gRPC, or other
  2. Sync or async
  3. Prefer ArchiPy built-in vs custom
  4. Cross-cutting concern (metrics, auth context, logging) — not a use-case

Prefer ArchiPy

Check archipy.helpers.interceptors (FastAPI / gRPC). Prefer AppUtils auto-registration for stock interceptors. Show registration via DI or framework APIs from docs / ../archipy-docs/reference.md (Interceptors).

Custom interceptor

Create under helpers/interceptors/ — FastAPI middleware sketch:

from __future__ import annotations

import logging
import time
import uuid
from collections.abc import Awaitable, Callable

from starlette.middleware.base import BaseHTTPMiddleware
from starlette.requests import Request
from starlette.responses import Response

logger = logging.getLogger(__name__)


class RequestIdMiddleware(BaseHTTPMiddleware):
    """Attach/propagate an X-Request-ID header — cross-cutting only."""

    async def dispatch(
        self,
        request: Request,
        call_next: Callable[[Request], Awaitable[Response]],
    ) -> Response:
        request_id = request.headers.get("x-request-id") or str(uuid.uuid4())
        started = time.perf_counter()
        response = await call_next(request)
        response.headers["X-Request-ID"] = request_id
        logger.debug(
            "request_id=%s method=%s path=%s status=%s duration_ms=%.2f",
            request_id,
            request.method,
            request.url.path,
            response.status_code,
            (time.perf_counter() - started) * 1000,
        )
        return response
  • No domain business writes
  • No adapter construction inside the interceptor module
  • Wire through configs/containers.py, AppUtils, or framework middleware registration
  • Map errors at the boundary; do not leak raw exceptions

Docs

Read the full file on GitHub · 80 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. 5d ago First seen · 80 lines · 43 tokens per session scan A 8728b08eeb89

Subscribe to this mod's changes

scaffold-archipy-interceptor is a skill published in the GitHub repository SyntaxArc/archipy-plugin (2 stars, last pushed 11d ago), licensed MIT. It adds 43 tokens to every session and 543 once invoked, about $0.0002 per session on Opus 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

Other skills, from other repositories

create-skraft-eval

Use when creating, refreshing, expanding, or reviewing a SKRAFT Vally skill evaluation at tests/skills/ /eval.yaml in the skraft-plugin repository. Covers behavior coverage, baseline-versus-isolated-treatment discrimination, natural prompts, outcome rubrics, non-activation cases, regression guards, fixtures, static…

SebastienDegodez/skraft-plugin · 119 tokens

genesis

Use this skill BEFORE drafting any agentic primitive module (skill, persona scoping file, scope-attached rule file, orchestrator workflow) or when refactoring an existing one. Activate whenever the task asks to design, restructure, or critique an agentic module across any agent harness (Claude Code, Copilot, Cursor…

SebastienDegodez/skraft-plugin · 169 tokens

architecture-patterns

Use when selecting architecture patterns for a new feature, performing Event Modeling, defining bounded contexts, choosing DDD tactical patterns, evaluating pattern fitness, or understanding how patterns compose. Covers Event Modeling methodology, DDD strategic design, DDD tactical patterns, Clean Architecture, CQRS…

SebastienDegodez/skraft-plugin · 64 tokens

outside-in-tdd

Use when an approved scenario, Gherkin example, worked example, or expected result has to become working software through outside-in / double-loop TDD -- start from an acceptance or application-boundary test, get a trustworthy RED before implementation, let domain logic emerge only from failing behavior, and drive one…

SebastienDegodez/skraft-plugin · 173 tokens

architecture-decisions

Use when documenting architecture decisions as ADRs, evaluating trade-offs between alternatives, or managing the lifecycle of existing decisions. Covers ADR template, status transitions, consequence analysis, and quality criteria.

SebastienDegodez/skraft-plugin · 41 tokens

issue-refinement

Use when transforming raw issues or feature requests into well-structured user stories with acceptance criteria. Covers user story format, INVEST criteria, acceptance criteria patterns, story splitting techniques, DoR 8-item gate, and 8 antipatterns to detect.

SebastienDegodez/skraft-plugin · 54 tokens