Skip to content
Skill

Backend repo architecture

Gives agents a canonical Python/FastAPI backend layout and service conventions

Backend repo architecture is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
13
Last commit
License
MIT
Listing updated

Similar skills

About Backend repo architecture

This skill documents a reference architecture for Python FastAPI backends drawn from several production services. It covers how the application factory is assembled, how routers are aggregated and versioned, how a shared connection manager hands out per-request database and Redis handles, and how a base data-access class handles pagination and soft deletes. It also describes a MODE-based entrypoint that switches between server, worker, consumer and cron processes.

The guidance is organized as a set of patterns the agent can follow when laying out a new service or reorganizing an existing one. It compares a flat domain layout with a versioned one and a monorepo variant with apps and packages, and it lists anti-patterns such as committing inside DAO methods, using non-async database calls in async routes, and wildcard CORS origins in production. Configuration follows pydantic-settings conventions, with separate patterns for a single settings module and a loaded-config singleton.

The skill ships as Markdown only, with no scripts. Supporting reference files cover directory trees, deployment and Kubernetes patterns, and troubleshooting. The agent is expected to work in a Python codebase using FastAPI, with SQLAlchemy for the database layer.

When your agent uses it

Canonical backend repository structure for Python/FastAPI — multi-mode entrypoint, app factory, ConnectionManager, BaseDao, flat vs versioned layout. Use when scaffolding or reorganizing a FastAPI service.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 6 files (67 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the claude-kit plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ajyadav013/claude-kit
/plugin install claude-kit@claude-kit

Or copy only this skill to ~/.claude/skills/backend-repo-architecture:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/backend-repo-architecture &&
cp -R "$tmp/providers/codex/claude-kit/skills/backend-repo-architecture" ~/.claude/skills/backend-repo-architecture &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/backend-repo-architecture inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/backend-repo-architecture to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/backend-repo-architecture &&
cp -R "$tmp/providers/codex/claude-kit/skills/backend-repo-architecture" ~/.agents/skills/backend-repo-architecture &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/backend-repo-architecture inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/backend-repo-architecture to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/backend-repo-architecture &&
cp -R "$tmp/providers/codex/claude-kit/skills/backend-repo-architecture" ~/.cursor/skills/backend-repo-architecture &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/backend-repo-architecture inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ajyadav013/claude-kit.git --path providers/codex/claude-kit/skills/backend-repo-architecture

Or copy the folder to ~/.gemini/skills/backend-repo-architecture yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/backend-repo-architecture:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/backend-repo-architecture &&
cp -R "$tmp/providers/codex/claude-kit/skills/backend-repo-architecture" ~/.copilot/skills/backend-repo-architecture &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/backend-repo-architecture inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ajyadav013/claude-kit.git

Then copy claude-kit/providers/codex/claude-kit/skills/backend-repo-architecture into your agent's skills folder as backend-repo-architecture. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Application factory pattern
Describes how to construct the FastAPI app with lifespan, CORS, response class and router inclusion.
MODE-based entrypoint
Explains dispatching server, consumer, worker and cron processes from one entrypoint file.
Connection management
Covers a singleton connection manager and per-request handlers with lazy session and Redis access.
Base DAO conventions
Outlines shared CRUD, pagination, soft-delete handling and transaction boundaries for data access.
Flat and versioned layouts
Compares domain module layouts and the monorepo variant for organizing a service.
Configuration patterns
Shows typed environment settings with pydantic-settings and optional YAML and env merging.

Good for

  • Scaffold a new FastAPI backend service with a standard structure
  • Reorganize an existing FastAPI codebase into flat or versioned domain folders
  • Add a MODE dispatcher so one image can run server and worker processes
  • Set up a shared database session and Redis connection handling for FastAPI routes
  • Review a FastAPI project for common async and transaction anti-patterns

Backend repo architecture FAQ

What does Backend repo architecture need to run?

It is a Markdown skill with no scripts. It assumes a Python codebase using FastAPI, and its examples use SQLAlchemy and pydantic-settings.

When does the agent load Backend repo architecture?

It loads when a task involves scaffolding or reorganizing a FastAPI service, as described in the skill's frontmatter.

Does Backend repo architecture include executable tooling?

No. It contains no scripts, only instructions and reference files on structure, deployment and troubleshooting.

Which layout should I choose?

The skill says to pick one layout per service, either flat or versioned, and not mix them.

How do I install Backend repo architecture in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/backend-repo-architecture to use it in all your projects, or to .claude/skills/backend-repo-architecture in one project. Or install the claude-kit plugin, which includes it: /plugin marketplace add ajyadav013/claude-kit, then /plugin install claude-kit@claude-kit.

Does Backend repo architecture run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Backend repo architecture?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Backend repo architecture?

The closest alternatives to Backend repo architecture are Python backend, Fastapi router py, Async python patterns, Backend patterns and Backend patterns.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ajyadav013/claude-kit

  1. Guides an agent through pytest, async fixtures and security-regression tests for FastAPI

    • Open source
    • 13 GitHub stars
    • Developer tools
  2. Lets your agent inspect and debug live browser pages via Chrome DevTools MCP

    • Open source
    • 13 GitHub stars
    • Browser automation
  3. Runs concurrent load and stress tests against API endpoints to find latency and throughput

    • Open source
    • 13 GitHub stars
    • Developer tools
  4. Lets an agent click through a feature in a real browser and check how it behaves

    • Open source
    • 13 GitHub stars
    • Developer tools
  5. Runs quick health checks on backend, frontend and login to catch obvious breakage

    • Open source
    • 13 GitHub stars
    • Developer tools
  6. Guides an agent through red-green-refactor, bug reproduction tests and test pyramid

    • Open source
    • 13 GitHub stars
    • Developer tools