filter

filter is a command for Claude Code from thapaliyabikendra/ai-artifacts. It costs 14 tokens per session (1,746 once invoked), scanned A, original, Apache-2.0.

A code generator for an ABP application, a .NET framework with built-in application patterns, that creates a filter data-transfer object (DTO) for an entity list.

In plain words
What is it for?
Use it to add text, identifier, Boolean, and date-range filters to an existing entity’s list endpoint.
Why use it?
It provides consistent filtering for list queries instead of requiring each filter to be designed manually. It also connects the new filter to the application service.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/thapaliyabikendra/ai-artifacts/filter
Clone the repo
git clone --depth 1 https://github.com/thapaliyabikendra/ai-artifacts

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for filter

README.md
[![agentmods](https://agentmods.dev/badge/commands/thapaliyabikendra/ai-artifacts/filter.svg)](https://agentmods.dev/commands/thapaliyabikendra/ai-artifacts/filter)
Your own site
<a href="https://agentmods.dev/commands/thapaliyabikendra/ai-artifacts/filter"><img src="https://agentmods.dev/badge/commands/thapaliyabikendra/ai-artifacts/filter.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,746 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.01746
Opus 5 $0.00007 $0.00873
Sonnet 5 $0.00003 $0.00349
Haiku 4.5 $0.00001 $0.00175

Measured 5d ago against content hash f2f33566d675, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

filter scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/generate/filter.md · 215 lines

How it starts

The opening of the file, as written. The whole thing — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate Filter Command

Generate a Filter DTO for an existing ABP entity to enable advanced list querying.

Arguments: $ARGUMENTS

Pre-flight

Project: !basename $(pwd) Application.Contracts: !find api/src -maxdepth 1 -type d -name "*Application.Contracts" 2>/dev/null | head -1

Required context:

  • Read CLAUDE.md for project conventions
  • Read existing entity DTOs to understand property types

Workflow

┌──────────────┐   ┌──────────────┐   ┌──────────────┐
│ 1. Read      │ → │ 2. Generate  │ → │ 3. Update    │
│ Entity DTOs  │   │ Filter DTO   │   │ AppService   │
└──────────────┘   └──────────────┘   └──────────────┘

Filter DTO Template

// Application.Contracts/{EntityPlural}/{Entity}Filter.cs
namespace {ProjectName}.{EntityPlural};

/// <summary>
/// Filter criteria for {Entity} list queries.
/// </summary>
public class {Entity}Filter
{
    // String properties: contains/like search
    public string? Name { get; set; }

    // Guid properties: exact match
    public Guid? CategoryId { get; set; }

    // Bool properties: exact match
    public bool? IsActive { get; set; }

    // DateTime properties: range filters
    public DateTime? CreatedAfter { get; set; }
    public DateTime? CreatedBefore { get; set; }

    // Numeric properties: range filters
    public decimal? PriceMin { get; set; }
    public decimal? PriceMax { get; set; }

    // Enum properties: exact match
    public OrderStatus? Status { get; set; }
}

Property Type Mapping

Entity Property Type Filter Properties WhereIf Pattern
string string? {Prop} .WhereIf(!filter.{Prop}.IsNullOrWhiteSpace(), x => x.{Prop}.ToLower().Contains(filter.{Prop}.ToLower()))
Guid Guid? {Prop} .WhereIf(filter.{Prop}.HasValue, x => x.{Prop} == filter.{Prop})
Guid? Guid? {Prop} .WhereIf(filter.{Prop}.HasValue, x => x.{Prop} == filter.{Prop})
bool bool? {Prop} .WhereIf(filter.{Prop}.HasValue, x => x.{Prop} == filter.{Prop})
DateTime DateTime? {Prop}From, DateTime? {Prop}To .WhereIf(filter.{Prop}From.HasValue, x => x.{Prop} >= filter.{Prop}From)
int, decimal {Type}? {Prop}Min, {Type}? {Prop}Max .WhereIf(filter.{Prop}Min.HasValue, x => x.{Prop} >= filter.{Prop}Min)
enum {EnumType}? {Prop} .WhereIf(filter.{Prop}.HasValue, x => x.{Prop} == filter.{Prop})

Read the full file on GitHub · 215 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 215 lines · 14 tokens per session scan A f2f33566d675

Subscribe to this mod's changes

filter is a command published in the GitHub repository thapaliyabikendra/ai-artifacts (24 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 14 tokens to every session and 1,746 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.