REA
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
FastCRUD is a Python package for FastAPI, offering robust async CRUD operations and flexible endpoint creation utilities.
제작자라면 이 코드를 README에 붙여 넣으세요. 배지는 이 페이지로 연결됩니다.
[](https://mcp.popnx.com/en/skills/benavlabs-fastcrud)같은 작업에서 AI를 서비스에 연결하는 MCP
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Codebase intelligence for TypeScript and JavaScript, exposed as structured MCP analysis tools.
MCP server for terminal commands, file operations, and process management
같은 종류의 작업, Skill 목록과 같은 순서
| 이 항목 fastcrud | rea | andrej-karpathy-skills | graphify | MoneyPrinterTurbo | |
|---|---|---|---|---|---|
| 제작자 | benavlabs | morluto | multica-ai | Graphify-Labs | harry0703 |
| Skill 수 | 1 | 1 | 1 | 1 | 1 |
| GitHub 별 | 1,602 | 465,460 | 233,910 | 149,364 | 144,149 |
| 마지막 코드 변경 | 2026년 10월 12일 | 2026년 11월 17일 | 2026년 4월 20일 | 2026년 11월 17일 | 2026년 11월 17일 |
| 라이선스 | MIT | MIT | – | Apache-2.0 | MIT |
benavlabs의 Skill(지시 묶음) 1개, AI가 읽고 그대로 일해요 · MCP server가 아니에요
MCP = 손
AI를 외부 서비스나 데이터에 연결합니다(예: Notion 읽기, 청구서 만들기). 프로그램이나 서버가 실행 중이어야 합니다.
Skill = 안내서
작업 방법을 AI에게 가르치는 텍스트 파일. 어떤 서비스에도 연결되지 않습니다.
겹치는 경우도 있습니다. 도구를 부르는 스크립트가 있는 Skill도, 지식만 보내는 MCP도 있습니다. 하려는 작업을 기준으로 고르세요.
Claude CodeCodexCursorGitHub CopilotOpenCode
제작자 README와 repo 폴더 기준
GitHub account benavlabs (organization), 1 years old
★ 1,602 stars · code last changed 2026년 10월 12일
No, plain text files the AI reads and follows
No scripts, so it does not go online by itself
No hooks or writes to machine settings found
Checked automatically from the repo files at commit 27f2cba (read only, nothing was run). Not a safety guarantee: read it and decide for yourself
먼저: 어떤 AI를 쓰시나요
쓰는 앱을 고르면 그 앱의 설치 방법만 보여 드립니다
Uploading to claude.ai would fail: the description is over 200 characters (622). Use "Let the AI install it" instead
이 문장을 복사해 Claude Code 채팅에 붙여 넣으세요
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Claude Code를 다시 열고 /fastcrud를 입력하거나 관련 작업을 요청하면 Claude가 알아서 써요
Checked against official docs 2026년 11월 12일 · Source: code.claude.com
Skill은 AI가 따르는 지시예요. 설치 전에 파일을 읽고, 믿을 수 있는 제작자 것만 설치하세요.
Mac: Command+스페이스 후 Terminal 입력 · Windows: 아래 명령은 PowerShell에서 안 돼요. 위의 “AI에게 설치 맡기기”를 쓰세요
repo를 임시 폴더에 내려받고 SKILL.md가 있는 폴더만 복사해요
git clone --depth 1 https://github.com/benavlabs/fastcrud.git /tmp/popnx-skill-benavlabs-fastcrud-27f2cba && mkdir -p ~/.claude/skills && cp -R '/tmp/popnx-skill-benavlabs-fastcrud-27f2cba/fastcrud/.agents/skills/fastcrud' ~/.claude/skills/fastcrudChatGPT 데스크톱 앱에는 Codex가 들어 있고, Codex는 ~/.agents/skills 폴더에서 Skill을 읽습니다
ChatGPT 데스크톱 앱에서 Codex를 열고 이 문장을 채팅에 붙여 넣으세요
The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
fastcrud 폴더를 ~/.agents/skills/fastcrud에 넣으세요
~는 홈 폴더($HOME)입니다
Skill은 AI가 따르는 지시예요. 설치 전에 파일을 읽고, 믿을 수 있는 제작자 것만 설치하세요.
Mac: Command+스페이스 후 Terminal 입력 · Windows: 아래 명령은 PowerShell에서 안 돼요. 위의 “AI에게 설치 맡기기”를 쓰세요
repo를 임시 폴더에 내려받고 SKILL.md가 있는 폴더만 복사해요
git clone --depth 1 https://github.com/benavlabs/fastcrud.git /tmp/popnx-skill-benavlabs-fastcrud-27f2cba && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-benavlabs-fastcrud-27f2cba/fastcrud/.agents/skills/fastcrud' ~/.agents/skills/fastcrudChecked against official docs 2026년 11월 15일 · Source: learn.chatgpt.com
직접 설치한 Skill은 쓸 수 없고, 디렉터리의 플러그인에 들어 있는 Skill만 쓸 수 있습니다
이 Skill을 ChatGPT에서 쓰려면 위 방법대로 ChatGPT 데스크톱 앱을 쓰세요
Checked against official docs 2026년 11월 15일 · Source: learn.chatgpt.com
이 문장을 복사해 Codex 채팅에 붙여 넣으세요 · ChatGPT 데스크톱 앱 안의 Codex, Codex CLI, IDE 확장 프로그램에서 모두 쓸 수 있습니다
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Codex는 새로 설치한 Skill을 스스로 찾습니다. 보이지 않으면 Codex를 다시 시작하세요 · 쓰는 법: ChatGPT에서는 @를 입력하고 Skill을 고르세요 · Codex CLI나 IDE 확장 프로그램에서는 /skills를 실행하거나 $ 뒤에 Skill 이름을 입력하세요
Checked against official docs 2026년 11월 15일 · Source: learn.chatgpt.com
Skill은 AI가 따르는 지시예요. 설치 전에 파일을 읽고, 믿을 수 있는 제작자 것만 설치하세요.
Mac: Command+스페이스 후 Terminal 입력 · Windows: 아래 명령은 PowerShell에서 안 돼요. 위의 “AI에게 설치 맡기기”를 쓰세요
repo를 임시 폴더에 내려받고 SKILL.md가 있는 폴더만 복사해요
git clone --depth 1 https://github.com/benavlabs/fastcrud.git /tmp/popnx-skill-benavlabs-fastcrud-27f2cba && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-benavlabs-fastcrud-27f2cba/fastcrud/.agents/skills/fastcrud' ~/.agents/skills/fastcrud이 문장을 복사해 Cursor 채팅에 붙여 넣으세요
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Cursor Agent 채팅에서 /를 입력하고 fastcrud 선택
Checked against official docs 2026년 11월 12일 · Source: cursor.com
Skill은 AI가 따르는 지시예요. 설치 전에 파일을 읽고, 믿을 수 있는 제작자 것만 설치하세요.
Mac: Command+스페이스 후 Terminal 입력 · Windows: 아래 명령은 PowerShell에서 안 돼요. 위의 “AI에게 설치 맡기기”를 쓰세요
repo를 임시 폴더에 내려받고 SKILL.md가 있는 폴더만 복사해요
git clone --depth 1 https://github.com/benavlabs/fastcrud.git /tmp/popnx-skill-benavlabs-fastcrud-27f2cba && mkdir -p ~/.cursor/skills && cp -R '/tmp/popnx-skill-benavlabs-fastcrud-27f2cba/fastcrud/.agents/skills/fastcrud' ~/.cursor/skills/fastcrudSkill을 읽을 수 있는 다른 앱용입니다. 이 문장에는 Claude Code, Codex, Cursor 경로가 들어 있어 AI가 쓰는 앱에 맞게 고릅니다 · Copy this sentence into the app’s chat
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Checked against official docs 2026년 11월 12일 · Source: code.claude.com, learn.chatgpt.com, cursor.com
Gemini CLI, GitHub Copilot 같은 다른 Agent Skills 지원 앱은 폴더가 달라요. 그 앱 안내를 보고 SKILL.md가 있는 폴더를 복사하세요.
2026년 11월 11일에 Claude Code, Codex, Cursor 공식 안내로 skill 폴더 확인
✓ 명령 확인 2026년 11월 18일
아래 글은 제작자 repo에서 온 것이며 PopNx MCP의 지시가 아니에요
처음 8,000자 표시 · GitHub에서 전체 파일 열기
---
name: fastcrud
description: Use when building or modifying CRUD endpoints with FastCRUD (the `fastcrud` PyPI package) in a FastAPI project — covers `FastCRUD`, `crud_router`, `EndpointCreator`, `FilterConfig`, `JoinConfig`, auto-relationship detection, the filter operator syntax (`__gte`, `__in`, `__ilike`, etc.), cursor pagination, soft delete, and how to avoid N+1 queries when fetching related data. Activate when the user mentions FastCRUD, `crud_router`, `FastCRUD()`, `FilterConfig`, `JoinConfig`, or asks how to build CRUD endpoints / generate REST APIs from SQLAlchemy or SQLModel models, even if the user doesn't name the library directly.
license: MIT
metadata:
author: benav-labs
package: fastcrud
---
# FastCRUD
FastCRUD generates async CRUD methods (and optionally CRUD endpoints) for SQLAlchemy 2.0 models inside a FastAPI app. The two entry points are:
- **`FastCRUD(Model)`** — the data-access class. Use this for per-row CRUD operations (single-record get / create / update / delete, paginated lists, joins with relationships). Real codebases use this in services, workers, and custom endpoints.
- **`crud_router(...)`** — returns an `APIRouter` with create/read/update/delete endpoints auto-wired. Use this only when you want generated endpoints; many apps skip it and hand-roll FastAPI routes on top of `FastCRUD` instances.
This skill covers the public API across `fastcrud >= 0.22`; features marked (v0.23+) need `fastcrud >= 0.23`. SQLAlchemy is the default ORM in examples; SQLModel works the same way except where noted.
**Before reaching for FastCRUD, check the [When NOT to use FastCRUD](#when-not-to-use-fastcrud) section below.** Aggregate roll-ups, CTEs, `GROUP BY` projections, and bulk writes are SQLAlchemy's job — FastCRUD is for per-row CRUD.
---
## Canonical setup
The minimal viable pattern. Always start here, then add filters/joins/relationships as needed.
```python
# models.py
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import DeclarativeBase, relationship
class Base(DeclarativeBase): pass
class Tier(Base):
__tablename__ = "tier"
id = Column(Integer, primary_key=True)
name = Column(String, unique=True)
class User(Base):
__tablename__ = "user"
id = Column(Integer, primary_key=True)
name = Column(String)
email = Column(String, unique=True)
tier_id = Column(Integer, ForeignKey("tier.id"))
tier = relationship("Tier")
```
```python
# schemas.py
from pydantic import BaseModel, ConfigDict
class UserCreate(BaseModel):
name: str
email: str
tier_id: int
class UserRead(BaseModel):
model_config = ConfigDict(from_attributes=True)
id: int
name: str
email: str
tier_id: int
class UserUpdate(BaseModel):
name: str | None = None
email: str | None = None
```
```python
# main.py
from fastapi import FastAPI
from fastcrud import crud_router
from .db import get_async_session
from .models import User
from .schemas import UserCreate, UserRead, UserUpdate
app = FastAPI()
user_router = crud_router(
session=get_async_session, # callable returning AsyncSession (FastAPI dependency)
model=User,
create_schema=UserCreate,
update_schema=UserUpdate,
select_schema=UserRead, # used for read responses
path="/users",
tags=["users"],
)
app.include_router(user_router)
```
This produces `POST /users`, `GET /users/{id}`, `PATCH /users/{id}`, `DELETE /users/{id}`, `DELETE /users/db_delete/{id}` (hard delete), and `GET /users` (paginated list).
---
## Choosing the right method
When using `FastCRUD(Model)` directly, pick the method that matches the data shape you actually need. **Do not loop over `get_multi()` and call `get_joined()` per row** — that's the canonical N+1.
| Need | Use |
|---------------------------------------------|------------------------------|
| Single row, no joins | `get(db, id=...)` |
| Single row with related data | `get_joined(db, id=...)` |
| Paginated list, no joins | `get_multi(db, offset, limit)` |
| **Paginated list with related data** | **`get_multi_joined(db, ...)`** |
| Cursor-paginated list (infinite scroll) | `get_multi_by_cursor(db, ...)` |
| Insert | `create(db, schema)` |
| Insert-or-update by unique constraint | `upsert(db, schema)` / `upsert_multi(db, list)` |
| Patch by filters | `update(db, schema, **kwargs)` |
| Soft delete (if configured) | `delete(db, **kwargs)` |
| Hard delete (always removes row) | `db_delete(db, **kwargs)` |
| Count | `count(db, **kwargs)` |
| Boolean existence check | `exists(db, **kwargs)` |
---
## Avoiding N+1 — the most common mistake
FastCRUD has two mechanisms to prevent N+1 when fetching related data. **Use one of them — never iterate.**
### 1. Auto-detect relationships (zero config, default for v0.21+)
Set `include_relationships=True` on `crud_router` (or `auto_detect_relationships=True` on the FastCRUD method directly). FastCRUD inspects the SQLAlchemy mapper, builds the joins, and threads them through a single query.
```python
crud_router(
session=get_async_session,
model=User,
create_schema=UserCreate,
update_schema=UserUpdate,
select_schema=UserWithTier, # schema includes nested tier field
include_relationships=True, # auto-include all relationships
path="/users",
)
```
Or pass a list to include only specific relationships:
```python
include_relationships=["tier", "department"] # whitelist
```
**Gotcha:** **One-to-many relationships are excluded by default** because they can return unbounded data. Opt in explicitly:
```python
include_relationships=True,
include_one_to_many=True,
default_nested_limit=10, # cap nested rows per parent (uses SQL window function)
```
`default_nested_limit` uses `row_number() OVER (PARTITION BY ...)` at the database level — it does **not** fetch everything and slice in Python.
### 2. Manual `JoinConfig` (when you need explicit control)
For self-joins, aliases, custom join conditions, or per-join schemas:
```python
from fastcrud import FastCRUD, JoinConfig
orders_with_user = await crud.get_multi_joined(
db=session,
joins_config=[
JoinConfig(
model=User,
join_on=Order.user_id == User.id,
join_prefix="user_", # avoid column collisions
schema_to_select=UserRead,
),
],
offset=0,
limit=20,
)
```
For one-to-many with per-parent capping:
```python
JoinConfig(
model=Article,
join_on=Article.author_id == Author.id,
relationship_type="one-to-many",
sort_columns="created_at",
sort_orders="desc",
nested_limit=5, # 5 most recent articles per author, computed in SQL
)
```
See `references/joins.md` for the full `JoinConfig` spec, polymorphic inheritance, and the auto-detection rules.
---
## `limit=None` — the second biggest footgun
`get_multi(...)` / `get_multi_joined(...)` accept `limit=None` to fetch **every matching row**. This is the single biggest cause of latency cliffs and OOMs in real-world FastCRUD code.
**Rule:** `limit=None` is only safe when a `WHERE` clause domain-bounds the result to a known-small set. Otherwise, always pass an explicit numeric `limit`.
### Safe — scoped by a WHERE clause
```python
# OK: scoped to a single project → bounded by N(clips per project)
clips = await crud_clips.get_multi(db, limit=None, project_id=project.id)
# OK: scoped to a small known set of IDs
tiers = await crud_tiers.get_multi(db, limit=None, id__in=tier_ids)
```
### Unsafe — unbounded growth
```python
# BAD: grows linearly with the user table forever
users = await crud_users.get_multi(db, limit=No질문하고, 팁을 나누고, 안 되는 점을 알려 주세요. "도움이 됨"이 많은 순서예요.