secure-task-crud

Implement multi-tenant task CRUD REST endpoints with ownership checks.

Updated Jan 2, 2026
One-click install
npx skills add https://github.com/Sobansaud/Hackhathon---2 --skill secure-task-crud-sobansaud
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secure-task-crud
Source: https://github.com/Sobansaud/Hackhathon---2/tree/main/Phase%204/.claude/skills/secure-task-crud
Command: npx skills add https://github.com/Sobansaud/Hackhathon---2 --skill secure-task-crud-sobansaud

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a blueprint for building secure, high-performance REST API endpoints for task management in multi-tenant environments with asynchronous I/O.

Core Features & Use Cases

  • Strict Isolation: Automatically filters queries by current_user.id to enforce per-user data boundaries.
  • Ownership Validation: Ensures only the owner can modify or delete tasks.
  • RESTful Design: Provides standardized routes for list, create, get, update, delete, and status toggling.
  • Payload Validation: Supports request/response serialization with Pydantic/SQLModel models.
  • Async Execution: Leverages async database sessions for non-blocking I/O in high-load apps.

Use Case: In a SaaS task-tracking app, each tenant sees only their tasks and can perform full CRUD on their own items.

Quick Start

Integrate the provided router into your FastAPI app, ensure authentication and Task models are available, and wire up get_async_session.

Frequently Asked Questions about secure-task-crud

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

FAQPage Schema
How do I enforce multi-tenant isolation in a FastAPI task management API?

Multi-tenant task isolation is enforced by filtering all database queries against current_user.id. This ensures users only access their own tasks during list, retrieve, update, and delete operations.

How do I create async REST API endpoints for task management with Pydantic?

You can create async REST endpoints by integrating the router into your FastAPI app and using async database sessions. Pydantic or SQLModel handles payload validation for non-blocking CRUD operations.

Does this task management skill support ownership validation for update and delete routes?

Yes, ownership validation is strictly enforced for modifying or deleting tasks. The API ensures only the original owner can perform status toggling or CRUD actions on their specific items.

Can I use SQLModel for payload validation in an async multi-tenant SaaS application?

Yes, SQLModel supports request and response serialization for payload validation. It works with async database sessions to provide non-blocking I/O for high-load SaaS task-tracking applications.

What is the best way to toggle task status in a secure REST API?

The best way to toggle task status is through a dedicated RESTful route that validates the user payload and enforces ownership checks against current_user.id before updating the database.

Why does my async task CRUD endpoint return data from other tenants?

This happens when queries are not filtered by current_user.id. You must enforce strict multi-tenant isolation by applying ownership checks against the authenticated user's ID.