ワンクリックで
sqlmodel-todo-task-model
todo task sqlmodel, task database model, sqlmodel task schema with user_id, create todo model
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
todo task sqlmodel, task database model, sqlmodel task schema with user_id, create todo model
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Generate Helm 3+ chart structure for todo/task applications. Use for: creating Chart.yaml, values.yaml, and templates/ directory with Deployment and Service manifests. Triggers: "helm chart", "helm template", "helm values", "create helm chart", "helm install", "helm upgrade", "package as helm chart". NOT for: plain Kubernetes YAML (use kubernetes-yaml-best-practices), Kustomize, or kubectl commands. NOT for: CRDs, hooks, subcharts, or advanced Helm features unless explicitly requested.
Apply Kubernetes pod security hardening with securityContext, Pod Security Standards, and container isolation. Use for: adding runAsNonRoot, readOnlyRootFilesystem, dropping capabilities, seccomp profiles, and privilege escalation prevention. Triggers: "secure pod", "pod security", "non-root container", "security context", "k8s security", "harden deployment", "pod security standards", "restricted PSS". NOT for: NetworkPolicies, RBAC, Secrets management, or service mesh security. Use alongside kubernetes-yaml-best-practices for complete manifests.
Generate production-ready Kubernetes YAML manifests following best practices. Use when creating or reviewing: Deployments, Services, ConfigMaps, Secrets, Ingress, PersistentVolumeClaims, or any k8s resource YAML. Triggers: "kubernetes manifest", "deployment yaml", "service yaml", "write k8s resource", "create kubernetes", "k8s yaml", "pod spec", "container spec". NOT for Helm charts, Kustomize overlays, or kubectl commands.
Deploy and test applications on local Minikube Kubernetes cluster. Use for: loading local Docker images to Minikube, exposing services locally via port-forward or minikube service, debugging pods (logs, describe, exec), troubleshooting CrashLoopBackOff/ImagePullBackOff errors. Triggers: "deploy to minikube", "minikube image load", "port-forward", "minikube service", "debug pod", "why is pod crashing", "minikube dashboard", "local kubernetes testing". NOT for: minikube installation, minikube start/stop, cloud Kubernetes, Helm charts, or writing YAML manifests (use kubernetes-yaml-best-practices for YAML).
OCI & OKE specialist for the Todo app hackathon project. Provides infrastructure context, authentication patterns, and deployment guidance for Oracle Kubernetes Engine in me-dubai-1. Use when working with: OKE cluster operations, kubectl commands, oci CLI, Helm deploys to OKE, Dapr/Kafka on OKE, Ingress/LoadBalancer setup, Kubernetes secrets, cloud deployment, OCI networking, node pool management, or troubleshooting OKE auth errors. Triggers: "OKE", "oci", "kubectl", "deploy to cloud", "cluster", "OCI", "oracle kubernetes", "ingress on OKE", "secrets on OKE", "Dapr on OKE", "Kafka on OKE", "node pool", "DOKS alternative".
Dapr service invocation pattern for FastAPI Todo app. Use DaprClient.invoke_method to call other services with user_id propagated via metadata. Use when implementing service-to-service communication in FastAPI applications with user context propagation.
| name | sqlmodel-todo-task-model |
| description | todo task sqlmodel, task database model, sqlmodel task schema with user_id, create todo model |
This skill provides the standardized SQLModel Task class for Todo applications with proper user isolation. It enforces multi-user isolation via user_id and includes all required fields for a complete Todo task management system.
Use this exact SQLModel Task class unless explicitly overridden:
from sqlmodel import SQLModel, Field, Column
from datetime import datetime
from typing import Optional
from sqlalchemy import DateTime
class Task(SQLModel, table=True):
# Enforces multi-user isolation via user_id
id: Optional[int] = Field(default=None, primary_key=True)
user_id: str = Field(index=True) # Foreign key to user, indexed for performance
title: str = Field(max_length=200) # Required, max_length=200
description: Optional[str] = None
completed: bool = Field(default=False)
created_at: datetime = Field(default_factory=datetime.utcnow)
updated_at: datetime = Field(default_factory=datetime.utcnow, sa_column=Column(DateTime(timezone=True), onupdate=datetime.utcnow))
id: Optional[int] = Field(default=None, primary_key=True)user_id: str - Foreign key to user, indexed for performancetitle: str - Required field with max_length=200description: Optional[str] = Nonecompleted: bool = Field(default=False) - Tracks task completion statuscreated_at: datetime = Field(default_factory=datetime.utcnow) - Timestamp of creationupdated_at: datetime = Field(default_factory=datetime.utcnow, sa_column=Column(DateTime(timezone=True), onupdate=datetime.utcnow)) - Timestamp of last updateAlways include indexes for performance:
user_id for efficient multi-user filteringcompleted for status-based queriesWhen defining relationships with User model:
from sqlmodel import SQLModel, Field, Relationship
from datetime import datetime
from typing import Optional
from sqlalchemy import DateTime
class Task(SQLModel, table=True):
# Enforces multi-user isolation via user_id
id: Optional[int] = Field(default=None, primary_key=True)
user_id: str = Field(index=True, foreign_key="user.id")
title: str = Field(max_length=200)
description: Optional[str] = None
completed: bool = Field(default=False, index=True)
created_at: datetime = Field(default_factory=datetime.utcnow)
updated_at: datetime = Field(default_factory=datetime.utcnow, sa_column=Column(DateTime(timezone=True), onupdate=datetime.utcnow))
# Relationship to User if needed
# user: "User" = Relationship(back_populates="tasks")
⚠️ Critical: The user_id field is essential for enforcing multi-user isolation. Every database query must filter by user_id to prevent data leakage between users.
Example query pattern:
from sqlmodel import select
# Correct - includes user_id filter
user_tasks = session.exec(
select(Task)
.where(Task.user_id == current_user.id)
).all()
Before implementing the Task model: