Skip to content
Skillv1.0.0

absorbed-from-phenotype-request-id

Zero-dep request-ID propagation (contextvars) for Python ASGI services, with optional FastAPI/Starlette middleware and structlog binder.

by KooshaPari(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from KooshaPari/phenotype-tooling (docs/absorbed-from-phenotype-request-id/AGENTS.md). Install upstream with npx skills add KooshaPari/phenotype-tooling --skill absorbed-from-phenotype-request-id. Copyright stays with the author.

phenotype-request-id

Zero-dep request-ID propagation (contextvars) for Python ASGI services, with optional FastAPI/Starlette middleware and structlog binder.

Layout

  • src/phenotype_request_id/context.pyContextVar store (zero deps)
  • src/phenotype_request_id/fastapi.py — ASGI middleware (lazy import of starlette)
  • src/phenotype_request_id/logging.py — structlog binder (lazy import)
  • tests/test_context.py — stdlib-only tests
  • tests/test_middleware.py — auto-skips when fastapi/httpx absent

Conventions

  • Core must remain zero-dep. All optional integrations via lazy import.
  • No class larger than 50 lines.
  • Use contextvars (stdlib), not threading.local.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/kooshapari-phenotype-tooling-absorbed-from-phenotype-request-id/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

kooshapari-phenotype-tooling-absorbed-from-phenotype-request-id.ocm.jsonjson
{
  "ocm": "1",
  "id": "kooshapari-phenotype-tooling-absorbed-from-phenotype-request-id",
  "kind": "skill",
  "name": "absorbed-from-phenotype-request-id",
  "description": "Zero-dep request-ID propagation (contextvars) for Python ASGI services, with optional FastAPI/Starlette middleware and structlog binder.",
  "publisher": "KooshaPari",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "github-agents"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Zero-dep request-ID propagation (contextvars) for Python ASGI services, with optional FastAPI/Starlette middleware and structlog binder."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github-agents",
      "repository": "https://github.com/KooshaPari/phenotype-tooling",
      "path": "docs/absorbed-from-phenotype-request-id/AGENTS.md",
      "ref": "97c7b5e7fcecc8c9018fd8b7ceeee0fa410913ad",
      "url": "https://github.com/KooshaPari/phenotype-tooling/blob/97c7b5e7fcecc8c9018fd8b7ceeee0fa410913ad/docs/absorbed-from-phenotype-request-id/AGENTS.md",
      "key": "KooshaPari/phenotype-tooling/docs/absorbed-from-phenotype-request-id/AGENTS.md"
    }
  },
  "instructions": "# phenotype-request-id\n\nZero-dep request-ID propagation (contextvars) for Python ASGI services,\nwith optional FastAPI/Starlette middleware and structlog binder.\n\n## Layout\n- `src/phenotype_request_id/context.py` — `ContextVar` store (zero deps)\n- `src/phenotype_request_id/fastapi.py` — ASGI middleware (lazy import of starlette)\n- `src/phenotype_request_id/logging.py` — structlog binder (lazy import)\n- `tests/test_context.py` — stdlib-only tests\n- `tests/test_middleware.py` — auto-skips when fastapi/httpx absent\n\n## Conventions\n- Core must remain zero-dep. All optional integrations via lazy imp",
  "cost": {
    "context_tokens": 172
  }
}

Fetch it by URL: GET /api/v1/registry/kooshapari-phenotype-tooling-absorbed-from-phenotype-request-id/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.