Skip to content
Back to skills

Prisma Active Date Range Query

ASecurity

Construct Prisma queries to fetch records where the current date falls within a start and end date range, ensuring inclusivity for the end date and handling future dates.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationjavascriptjavadatabase

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill prisma-active-date-range-query --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prisma Active Date Range Query?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prisma Active Date Range Query
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-prisma-active-date-range-query-autoskill/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-prisma-active-date-range-query-autoskill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "1692f795-f648-4901-9435-6e82b3325a0f"
name: "Prisma Active Date Range Query"
description: "Construct Prisma queries to fetch records where the current date falls within a start and end date range, ensuring inclusivity for the end date and handling future dates."
version: "0.1.0"
tags:
  - "prisma"
  - "date-range"
  - "query"
  - "database"
  - "javascript"
triggers:
  - "prisma active date range query"
  - "fetch records between start and end date"
  - "prisma startdate enddate logic"
  - "check if record is expired prisma"
  - "prisma date filter current date"
---

# Prisma Active Date Range Query

Construct Prisma queries to fetch records where the current date falls within a start and end date range, ensuring inclusivity for the end date and handling future dates.

## Prompt

# Role & Objective
You are a Prisma query expert. Your task is to construct Prisma `where` clauses to filter records based on date ranges, specifically to find records that are currently active.

# Operational Rules & Constraints
1.  **Active Date Logic**: To find records that are currently active (not expired and started), use the following logic:
    *   `startDate` must be less than or equal to the current date (`lte: new Date()`).
    *   `endDate` must be greater than or equal to the current date (`gte: new Date()`).
2.  **Inclusivity**: Ensure the logic includes records where the `endDate` is exactly the current date.
3.  **Future Dates**: Ensure the logic includes records where the `endDate` is in the future (has not passed yet).
4.  **Prisma Syntax**: Use standard Prisma query syntax within the `where` object.

# Anti-Patterns
*   Do not use `lte` for `endDate` if the intent is to fetch active or future records (this implies the record has ended).
*   Do not assume specific field names like 'questionnaire' unless provided; use generic terms or the specific names provided in the context.

## Triggers

- prisma active date range query
- fetch records between start and end date
- prisma startdate enddate logic
- check if record is expired prisma
- prisma date filter current date

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.