python-service-architecture

python-service-architecture is a skill for Claude Code, Codex from ccoalm/ccl-skills. It costs 152 tokens per session (6,084 once invoked), scanned A, original, Apache-2.0.

A guide for designing Python backend services and deciding how their parts should be separated. It covers FastAPI projects, Celery workers, microservices, message queues, data ownership, APIs, reliability and scaling.

In plain words
What is it for?
Use it to plan or review Python backend architecture, service boundaries, API contracts, asynchronous jobs, storage ownership, worker design and release readiness.
Why use it?
It helps choose an appropriate structure before splitting a system into services, workers, scripts or packages. It also clarifies boundaries for data, jobs, runtime environments, releases and recovery.

Skill for Claude CodeCodex

Part of the ccl-skills plugin — 33 skills, 4 commands, 7 hooks 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/ccoalm/ccl-skills/python-service-architecture
Any agent
npx skills add ccoalm/ccl-skills --skill python-service-architecture
Clone the repo
git clone --depth 1 https://github.com/ccoalm/ccl-skills

Made for: Claude Code, Codex.

Or install ccl-skills, the plugin that ships this one along with the rest of its 33 skills, 4 commands, 7 hooks.

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 python-service-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccoalm/ccl-skills/python-service-architecture.svg)](https://agentmods.dev/skills/ccoalm/ccl-skills/python-service-architecture)
Your own site
<a href="https://agentmods.dev/skills/ccoalm/ccl-skills/python-service-architecture"><img src="https://agentmods.dev/badge/skills/ccoalm/ccl-skills/python-service-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 152 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,084 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.1 $0.00152 $0.06084
Opus 5 $0.00076 $0.03042
Sonnet 5 $0.00030 $0.01217
Haiku 4.5 $0.00015 $0.00608

Measured 5d ago against content hash c4bf4b3a18c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

python-service-architecture 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/python-service-architecture/SKILL.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Service Architecture

Use this for new product/server architecture work in Python. For new backend products, decide the service boundary from ownership, data source of truth, runtime isolation, scaling, release cadence, and rollback needs before choosing microservice, modular monolith, worker, script, or package shape. This skill distills proven Python backend, AI-service hosting, worker, package, and data-access patterns, but must not assume any existing repository, product domain, package path, service identifier, database, or legacy service layout.

Skill Routing

  • Use this skill for Python architecture decisions, microservice decomposition, service decomposition, API contract shape, storage ownership, async execution, worker/job design, observability, reliability, release readiness, and platform boundaries.
  • Use python-service-dev when the user asks to implement, modify, scaffold, generate Python code, or apply a diagnosis/test strategy in Python code. A localized refactor (某文件/某类) also belongs to python-service-dev; only service-wide layering/boundary redesign stays here, and a multi-stage refactor delivery must re-enter product-rd-workflow. For root-cause debugging use defect-diagnosis first; for test-layer choice use testing-strategy first.
  • Use product-rd-workflow first when the request spans product shaping, architecture, implementation, review, release, and learning loops.
  • Use defect-diagnosis first when the task is to reproduce, isolate, instrument, fix, verify, or root-cause a backend defect, regression, repeated failure, review finding, or failing test.
  • Use testing-strategy when the main question is which unit, integration, contract, or E2E layer should prove behavior; then return here for Python architecture impact.
  • Use llm-inference-integration for inference, RAG, prompt, model-routing, evaluation, replay, token-cost, and batch-inference design. This skill only owns the Python service boundary that hosts or calls those capabilities.
  • Use go-microservice-architecture for Go services. Do not load Go skill rules for Python work unless the task is explicitly cross-language contract design.
  • Use platform-observability for logs/metrics/traces/log-id propagation/dashboards/alerts/SLI-SLO design. This skill owns only the service-side observability surface (what fields the handler emits, what middleware the framework attaches, what health endpoints exist); the cross-cutting evidence stack belongs there.
  • Use platform-service-connectivity for service mesh, service discovery, mTLS, multi-environment lane routing, retry/timeout/circuit-breaker policy, and framework client/server middleware for cross-service hops. This skill defines what the service exposes (health endpoints, ctx propagation, error-code conformance); routing/policy lives there.
  • Use platform-release-engineering for environment/lane matrix, canary/blue-green, promotion gates, rollback playbook, secret distribution, dynamic-config (config-center) vs static-config split, image build pipeline. This skill owns the service-side contracts (what the service consumes from the secret store and config center); release flow lives there.
  • Use codebase-specific skills only when the task is explicitly about an existing repository.
  • When changing an architecture rule that implementation must obey, name the downstream execution owner before landing: python-service-dev for code mechanics, testing-strategy for proof layer, platform skills for runtime contracts, and product-rd-workflow for cross-stage gates. If the rule also applies outside Python, route through skill-extraction-workflow and mirror or explicitly skip sibling architecture/dev skills.
  • For money, billing, quota, permission, tenant/user data isolation, privacy, high-impact AI, repeated writes, async finality, or incident-explanation risk, start from product-rd-workflow and its high-risk resilience gate before choosing Python service boundaries or fallback behavior.

Read the full file on GitHub · 162 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 · 162 lines · 152 tokens per session scan A c4bf4b3a18c7

Subscribe to this mod's changes

python-service-architecture is a skill published in the GitHub repository ccoalm/ccl-skills (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 152 tokens to every session and 6,084 once invoked, about $0.0008 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

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

pennylane

Hardware-agnostic quantum ML framework with automatic differentiation. Use when training quantum circuits via gradients, building hybrid quantum-classical models, or needing device portability across IBM/Google/Rigetti/IonQ. Best for variational algorithms (VQE, QAOA), quantum neural networks, and integration with…

K-Dense-AI/scientific-agent-skills · 98 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

rocm-kernels

Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…

huggingface/kernels · 93 tokens

holoscan-install-wheel

Install Holoscan SDK Python wheel via pip into a venv. Use for Python installs; not for native C++/apt or Conda installs.

NVIDIA/skills · 37 tokens

typing-exclusion-worker

Python typing exclusion worker: remove assigned mypy exclusion modules in small scoped batches, fix typing issues, run validation, and produce a structured completion summary. Use when running parallel typing-debt workers or when asked to remove modules from pyproject mypy exclusion overrides.

getsentry/skills · 57 tokens