Agent Skill
2/7/2026

python-fastapi-stack

Use this skill when working with Python FastAPI projects. Covers: FastAPI, Pydantic v2, SQLAlchemy 2.0, async patterns, UV package manager.

E
e
1GitHub Stars
2Views
npx skills add e-m-albright/dotfiles

SKILL.md

Namepython-fastapi-stack
DescriptionUse this skill when working with Python FastAPI projects. Covers: FastAPI, Pydantic v2, SQLAlchemy 2.0, async patterns, UV package manager.

Dotfiles

Opinionated Mac setup + project scaffolding for fast, maintainable development.

Two things happen here:

  1. Machine setup — Run install.sh and get a fully configured dev environment
  2. Project scaffolding — Seed new or existing projects with cross-vendor AI rules

Quick Start

Fresh Mac Setup

# 1. Install Xcode CLI tools
xcode-select --install

# 2. Clone and run
git clone https://github.com/<your-username>/dotfiles ~/dotfiles
~/dotfiles/install.sh

# 3. Re-run anytime (idempotent)
dotfiles install

What you get:

  • Shell: Zsh + Oh My Zsh + custom theme
  • Runtimes: Go, Rust, Bun, Node.js (fnm), Python (uv)
  • Editor: Cursor (AI-native, shared MCP servers)
  • Terminal: Ghostty (GPU-accelerated, desktop notifications)
  • CLI: Git, gh, just, jq, delta, hyperfine, and more
  • AI: Claude Code (with plugins, hooks, MCP servers), Claude Desktop

The installer is idempotent — safe to re-run anytime.


Project Scaffolding

Seed new or existing projects with cross-vendor AI rules that work with Claude Code, Cursor, and Gemini CLI.

Usage

# Create new projects
dotfiles scaffold typescript my-app           # SvelteKit (default)
dotfiles scaffold typescript astro my-blog    # Astro
dotfiles scaffold python my-api               # FastAPI (default)
dotfiles scaffold python cli my-tool          # Typer CLI
dotfiles scaffold golang my-service           # Chi (default)
dotfiles scaffold rust my-tool                # Axum (default)

# Seed existing projects (use . for current directory)
dotfiles scaffold typescript .
dotfiles scaffold python ~/code/my-api

# Force-update rules in an existing project
dotfiles scaffold --force python .

# Add extra tool support (default: claude + cursor)
dotfiles scaffold python my-api --tools copilot,gemini
dotfiles scaffold --tools all python my-api

Safe to run multiple times — only adds missing pieces. AGENTS.md is generated once, then project-owned (use --force to regenerate).

This adds cross-vendor AI rules — lightweight scaffolding that guides AI agents:

my-project/
├── AGENTS.md                  # Universal entry point (project-owned)
├── .ai/
│   ├── rules/*.mdc            # Recipe-specific rules (copied from dotfiles)
│   └── artifacts/             # Working files (gitignored)
│       ├── plans/
│       ├── research/
│       ├── decisions/         # ADRs (versioned)
│       └── sessions/
└── .cursor/rules/             # Cursor symlinks → .ai/rules/ (default)
    # Plus --tools extras: .github/instructions/, .gemini/rules/, GEMINI.md→, CODEX.md→ (symlinks to AGENTS.md)

How rules are deployed:

  • Universal rules (process, safety, style) are deployed at the user level by dotfiles agent-setup / dotfiles install — symlinked to dotfiles so they're always current
  • Recipe rules (language, framework, stack) are copied into projects — project can customize
  • Tool symlinks are auto-generated from a registry (agents/shared/tool-targets.json)
  • Default tools: claude + cursor. Use --tools copilot,gemini or --tools all for more.

Multi-tool rule discovery.ai/rules/ is the single source of truth. scaffold.sh creates tool-specific symlinks so each AI tool discovers the same rules in its native directory:

ToolDiscoveryDirectory
Claude CodeCLAUDE.md → AGENTS.md(direct)
CursorSymlinks.cursor/rules/
GitHub CopilotSymlinks.github/instructions/
Gemini CLIGEMINI.md → AGENTS.md + symlinks.gemini/rules/
CodexCODEX.md → AGENTS.md(direct)

Available Recipes

RecipeApp TypeStackUse Case
typescriptsvelte (default)Bun + SvelteKit 2 + Svelte 5Full-stack apps
typescriptastroBun + AstroContent sites, blogs
pythonfastapi (default)UV + FastAPI + SQLAlchemyAPIs, AI services
pythoncliUV + Typer + RichCLI tools, scripts
golangchi (default)Go 1.25+ Chi router + sqlcAPIs, services
rustaxum (default)Tokio + Axum + SQLxAPIs, services
rusttauriTauri 2 + SvelteKitDesktop apps

What's Installed

Shell & Terminal

  • Zsh + Oh My Zsh: Custom two-line prompt with git status, venv indicator, error-aware prompt character
  • Ghostty: GPU-accelerated terminal with desktop notifications
  • Rectangle: Window management
  • Shell aliases: cc (Claude Code with profiles), ccr (AI code review), cca (address PR feedback)

Runtimes

RuntimeManagerNotes
Node.jsfnmLTS version, auto-switches per project
BundirectPreferred JS runtime (faster than Node)
PythonuvPython 3.14, fast package management
GobrewWith gopls, delve, air, sqlc, goose, templ, staticcheck
RustrustupVia official installer (not Homebrew)

Editors

  • Cursor: Primary editor (AI-native, VS Code compatible, shared MCP servers, hooks, skills, agents)

  • Obsidian: Knowledge base — vault configs + community plugins managed via symlinks

    PluginPurpose
    Spaced RepetitionFlashcards in notes (question::answer), SM-2 scheduling
    DataviewQuery notes like a database (inline JS/DQL)
    TemplaterAdvanced templates with JS expressions
    CalendarVisual calendar sidebar linked to daily notes
    Natural Language DatesType @tomorrow → date link
    LinterAuto-format markdown on save

CLI Tools

CategoryTools
Coregit, git-lfs, delta (diffs), gh (GitHub CLI), jq, yq, wget
Systemhtop, iftop, nmap, dockutil, terminal-notifier
Devjust (task runner), lefthook (git hooks), shellcheck (shell linting), hyperfine (benchmarks), atlas (migrations), duckdb, infisical (secrets)

AI Tools

ToolPurpose
Claude CodeAgentic coding assistant (CLI) with plugins, hooks, MCP servers
Claude DesktopClaude macOS app
CursorAI-native editor with shared MCP servers, hooks, skills, agents

External Connections

Services we integrate with, and how. Prefer CLIs (simplest) > MCPs (cross-tool) > plugins (tool-specific).

ServiceMethodClaude CodeCursorNotes
GitHubCLI (gh) + MCPyesyesCLI + MCP server (gh mcp-server)
LinearMCP (mcp-remote)yesyesIssue tracking
Context7MCP (@upstash/context7-mcp)pluginyesUp-to-date library docs
NeonMCP (https://mcp.neon.tech/mcp)yesyesNeon Postgres projects, branches, SQL workflows
GranolaMCP (granola-mcp via uvx)yesMeeting notes (reads local cache, no API key)
NotionPluginyesClaude Code / Claude Desktop only
Gmailclaude.ai cloud MCPyesClaude Code only (not reproducible in config)
Google Calendarclaude.ai cloud MCPyesClaude Code only (not reproducible in config)

Considered (not yet enabled — add to agents/shared/mcp-servers.json when needed):

ServiceMethodWhy considerStatus
SlackMCP (mcp-remote)Team comms — search channels, post messages, triage threadsEvaluate
DatadogMCP / CLI (datadog-ci)APM, logs, dashboards, incident contextEvaluate
SentryMCP / CLI (sentry-cli)Error tracking, issue triage, release managementEvaluate
DagsterPlugin / MCPData pipeline orchestration & observabilityEvaluate

MCP config: agents/shared/mcp-servers.json (shared source), deployed to Claude Code and Cursor by their respective setup scripts.

Claude Code

Setup is automated via dotfiles agent-setup (also runs during install):

  • Global instructions: ~/.claude/CLAUDE.md installed from agents/claude/global-claude.md (process guardrails, command style, project file discovery)
  • Universal rules: ~/.claude/rules/*.mdc symlinked from .ai/rules/process/ (always current with dotfiles)
  • Plugins: 19 plugins (LSP, workflows, tooling, quality, integrations)
  • Hooks: Format-on-save (biome/ruff/rustfmt/gofmt/shellcheck), sensitive file guard, terminal notifications on completion
  • Skills: scaffold-project, dotfiles-doctor
  • Agents: shellcheck-reviewer
  • MCP servers: From shared source (agents/shared/mcp-servers.json) — GitHub, Linear, Granola, Notion (standalone); Context7, Playwright (via plugins)
  • Cloud MCPs: Gmail, Google Calendar (configured via claude.ai, not in dotfiles)
  • Preferences: Voice mode, terminal bell, acceptEdits mode
  • Desktop: MCP servers + preferences (cowork, sidebar, web search)

Shell workflow aliases (in .zshrc):

AliasUsageDescription
cccc [-w] [-a|-p|-e] [--chrome]Launch Claude Code with worktree + permission profile
cccccc -wa, ccc --yoloClaude Code in Chrome — shorthand for cc --chrome
ccrccr, ccr 2277, ccr <url>AI code review — local uses /review-pr (6 agents), PR uses /code-review (5 agents + GitHub comments)
ccacca [-c] [-p] [PR]Address PR feedback — -c replies to comments, -p pushes

See agents/claude/ for all configuration files.

Cursor

Setup is automated via agents/cursor/setup.sh (also runs during install):

  • MCP servers: From shared source (agents/shared/mcp-servers.json)
  • Editor config: editors/cursor/settings.json + editors/cursor/keybindings.json symlinked into Cursor User config
  • Universal rules: Symlinked from .ai/rules/process/ (always current with dotfiles)
  • Hooks: Shared hook definitions deployed from agents/cursor/hooks/
  • Skills: Deployed from agents/cursor/skills/
  • Agents: Deployed from agents/cursor/agents/
  • Rules: Shared rules from agents/shared/rules.md
  • Marketplace stack: See agents/cursor/PLUGINS.md for core/work plugin recommendations and install commands (/add-plugin ...)

Note: Cursor Marketplace plugin installs and OAuth flows are manual by design (run in Cursor chat/UI). The setup scripts print an explicit checklist so these steps are hard to miss.

See agents/cursor/ for all configuration files.


Configuration

Homebrew

Edit macos/brew.sh to customize packages. Organized by category with opt-in toggles:

AI=1 PRODUCTIVITY=1 SOCIAL=0 dotfiles brew

The dotfiles Command

dotfiles help                # Show available commands
dotfiles install             # Re-run full setup (install.sh)
dotfiles doctor              # Check all tools are installed (--fix to repair config)
dotfiles update              # Update OS, Homebrew, runtimes, and dev tools
dotfiles clean               # Clear Homebrew caches
dotfiles brew                # Re-run Homebrew setup
dotfiles dock                # Reset Dock layout
dotfiles scaffold            # Scaffold a project with AI rules
dotfiles stale               # Find disabled packages still installed
dotfiles test                # Run scaffold eval framework (--quick for fast)
dotfiles profile-shell       # Profile shell startup time
dotfiles cursor-plugins      # Print Cursor Marketplace plugin install checklist
dotfiles agents              # Show active agentic setup (Claude Code + Cursor)
dotfiles agent-setup        # Configure Claude + Cursor (--work/--personal, optional --reset-mcp)
dotfiles completions         # Output shell completions

Enable tab completion:

# Add to ~/.zshrc
eval "$(dotfiles completions)"

Git

  • .gitconfig: Modern defaults (delta, push.autoSetupRemote, rebase on pull)
  • .gitconfig.local: Your name/email (created on first install, not committed)
  • .gitignore_global: Common ignores

Directory Structure

dotfiles/
├── install.sh              # Main installer (run this)
├── bin/                    # CLI tools (dotfiles command)
├── shell/                  # Zsh config + theme
├── git/                    # Git config + global ignores
├── editors/                # Cursor settings + Obsidian vault configs
├── terminal/               # Ghostty config
├── agents/                 # Agentic tool setup
│   ├── shared/             # Shared config (MCP servers, tool registry, rules, ignore patterns)
│   ├── claude/             # Claude Code setup (plugins, hooks, skills, universal rules)
│   └── cursor/             # Cursor plugin (hooks, skills, universal rules)
├── macos/                  # Homebrew, Dock, SSH, print utilities
├── .ai/rules/              # Cross-vendor AI rules (canonical source)
│   ├── process/            # Universal: safety, style, workflow
│   ├── languages/          # Language ergonomics: TS, Python, Go, Rust
│   ├── frameworks/         # Framework patterns: SvelteKit, Astro, FastAPI, etc.
│   └── tooling/            # Stack decisions: Pick/Avoid tables, services
└── prompts/                # Project scaffolding
    ├── scaffold.sh         # Deploy rules + templates to projects
    ├── guides/             # Reference docs (not deployed to projects)
    │   └── developer-workflow.md  # How all the tools work together
    └── */templates/        # Starter files per recipe (.gitignore, justfile, etc.)

TODO

  • Evaluate Raycast — Could replace both Rectangle (window management) and Flycut (clipboard manager) with a single tool. Already commented out in macos/brew.sh. Prioritize trying this.

Philosophy

Machine setup:

  • Idempotent — run anytime, get the same result
  • Opinionated but removable — edit brew.sh to customize
  • Fast — parallel installs, skip what's already there

Project scaffolding:

  • One pick per category — no "it depends"
  • Agent-first — all configs work with Claude, Cursor, Gemini
  • Start minimal — add tools when you need them, not before
Skills Info
Original Name:python-fastapi-stackAuthor:e