cachibot-api-route

Add bot-scoped CRUD REST endpoints to CachiBot's FastAPI backend.

18|2|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/jhd3197/CachiBot --skill cachibot-api-route
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cachibot-api-route
Source: https://github.com/jhd3197/CachiBot/tree/main/.claude/skills/cachibot-api-route
Command: npx skills add https://github.com/jhd3197/CachiBot --skill cachibot-api-route

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines adding new REST API endpoints to CachiBot's FastAPI backend by enforcing project conventions for routing, authentication, data models, and repository storage so contributors can implement features without breaking consistency.

Core Features & Use Cases

  • Consistent CRUD Patterns: Guidance for GET, POST, PUT, DELETE endpoints and batch/action routes following the project's URL patterns.
  • Auth and Scoping: Enforces JWT-based require_bot_access for bot-scoped endpoints and shows when to use require_user for global resources.
  • Pydantic & Storage Integration: Instructions to create request/response Pydantic models with camelCase responses via from_db conversion and to integrate repository-backed SQLAlchemy/Postgres storage.
  • Use Case: Create a bot-scoped CRUD API for bookmarks or reminders, with models in cachibot/models, routes in cachibot/api/routes, and router registration in server.py so the frontend receives consistent, camelCase responses.

Quick Start

Use the cachibot-api-route skill to create Pydantic request/response models, implement an APIRouter with require_bot_access-protected CRUD endpoints, and register the router in server.py.

Frequently Asked Questions about cachibot-api-route

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add secure REST API endpoints to a FastAPI backend with JWT authentication?

To add secure REST API endpoints to FastAPI, define Pydantic schemas and APIRouter instances, protect them with JWT-based require_bot_access, then register the router in server.py for bot-scoped CRUD resources.

What's the best way to structure Pydantic response models for SQLAlchemy CRUD operations?

Structure Pydantic response models for SQLAlchemy CRUD by using camelCase response fields with from_db conversion methods, ensuring repository-backed storage interactions follow consistent project conventions for data serialization.

When do I need require_bot_access versus require_user for FastAPI JWT authentication?

Use require_bot_access for JWT authentication on bot-scoped endpoints like bookmarks or reminders, and apply require_user when handling global resources, ensuring correct access scoping across FastAPI routes.

Can I use the repository pattern with FastAPI and SQLAlchemy for bot-scoped resources?

Yes, you can use the repository pattern with FastAPI and SQLAlchemy to handle bot-scoped resources, implementing data access through repository-backed interactions while maintaining Pydantic schema validation.

How do I register a new APIRouter in FastAPI server.py?

Register a new APIRouter in FastAPI server.py by importing the router module from cachibot/api/routes and including it in the application instance to expose the newly defined CRUD endpoints.