Data Filtering logo

Data Filtering

Organization
cxcscmu
data-filtering

Filter accommodations, restaurants, and attractions by travel requirements

Overview

Publishercxcscmu
RepositorySkillLearnBench
Skill namedata-filtering
Stars
91
Forks
7
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by cxcscmu on GitHub. Read the source before you install it.

Installation

Install the Data Filtering AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/cxcscmu/SkillLearnBench/tree/main/skills/b1-one-shot-claude-haiku-4-5/travel-planning/data-filtering
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench.git /tmp/SkillLearnBench
mkdir -p .claude/skills
cp -r /tmp/SkillLearnBench/skills/b1-one-shot-claude-haiku-4-5/travel-planning/data-filtering .claude/skills/data-filtering
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Data Filtering in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Data Filtering on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Data Filtering is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Data Filtering Skill

Overview

Filter travel data by specific criteria like pet-friendly status, cuisine type, location, and price range.

Common Filter Scenarios

Accommodations

  • Pet-friendly filter
  • Price range (budget, mid-range, luxury)
  • Location (city, zip code)
  • Amenities (WiFi, parking, breakfast)

Restaurants

  • Cuisine type (American, Mediterranean, Chinese, Italian, etc.)
  • Location/city
  • Price range
  • Rating/reviews

Attractions

  • City location
  • Category (museum, park, historical, etc.)
  • Open during trip dates

Python Code Example

python
from typing import List, Dict
import re

def filter_pet_friendly_accommodations(
    accommodations: List[Dict],
    pet_friendly_field: str = 'pet_friendly'
) -> List[Dict]:
    """Filter accommodations that allow pets"""
    result = []
    for acc in accommodations:
        pet_field = acc.get(pet_friendly_field, '').lower()
        # Handle various formats: 'yes', 'true', '1', 'pet-friendly'
        if pet_field in ['yes', 'true', '1', 'pet friendly', 'pets allowed']:
            result.append(acc)
        elif 'pet' in pet_field and 'no' not in pet_field:
            result.append(acc)
    return result

def filter_by_cuisine(
    restaurants: List[Dict],
    cuisine_type: str,
    cuisine_field: str = 'Cuisine'
) -> List[Dict]:
    """Filter restaurants by cuisine type"""
    result = []
    cuisine_lower = cuisine_type.lower()

    for rest in restaurants:
        cuisines = rest.get(cuisine_field, '').lower()
        # Handle comma-separated cuisines
        if ',' in cuisines:
            cuisines_list = [c.strip() for c in cuisines.split(',')]
            if any(cuisine_lower in c for c in cuisines_list):
                result.append(rest)
        elif cuisine_lower in cuisines:
            result.append(rest)

    return result

def filter_by_city(
    data: List[Dict],
    city: str,
    city_field: str = 'City'
) -> List[Dict]:
    """Filter data by city"""
    result = []
    city_lower = city.lower()

    for item in data:
        item_city = item.get(city_field, '').lower()
        if item_city == city_lower:
            result.append(item)

    return result

def filter_by_price_range(
    data: List[Dict],
    min_price: float,
    max_price: float,
    price_field: str = 'Price'
) -> List[Dict]:
    """Filter data by price range"""
    result = []

    for item in data:
        try:
            price = float(item.get(price_field, 0))
            if min_price <= price <= max_price:
                result.append(item)
        except (ValueError, TypeError):
            continue

    return result

def filter_attractions_by_city(
    attractions: List[Dict],
    city: str,
    city_field: str = 'City'
) -> List[Dict]:
    """Filter attractions by city"""
    return filter_by_city(attractions, city, city_field)

def combine_filters(
    data: List[Dict],
    filters: Dict
) -> List[Dict]:
    """
    Apply multiple filters to data.
    filters dict: {'city': 'Cleveland', 'price_max': 100, ...}
    """
    result = data

    # Apply city filter
    if 'city' in filters:
        result = filter_by_city(
            result,
            filters['city'],
            filters.get('city_field', 'City')
        )

    # Apply price range filter
    if 'price_min' in filters or 'price_max' in filters:
        min_price = filters.get('price_min', 0)
        max_price = filters.get('price_max', float('inf'))
        result = filter_by_price_range(
            result,
            min_price,
            max_price,
            filters.get('price_field', 'Price')
        )

    # Apply cuisine filter
    if 'cuisine' in filters:
        result = filter_by_cuisine(
            result,
            filters['cuisine'],
            filters.get('cuisine_field', 'Cuisine')
        )

    return result

def select_diverse_options(
    data: List[Dict],
    num_selections: int,
    key_field: str = 'Name'
) -> List[Dict]:
    """Select diverse options avoiding duplicates"""
    seen = set()
    result = []

    for item in data:
        key = item.get(key_field, '').lower()
        if key not in seen:
            seen.add(key)
            result.append(item)
            if len(result) >= num_selections:
                break

    return result

Filter Priority for Trip Planning

  1. Accommodations: Must be pet-friendly first, then price/location
  2. Restaurants: Filter by city first, then cuisine type, then price
  3. Attractions: Filter by city, then availability/type

Usage Example

python
# Filter accommodations for Cleveland
cleveland_hotels = filter_by_city(accommodations, 'Cleveland')
pet_friendly = filter_pet_friendly_accommodations(cleveland_hotels)
budget_friendly = filter_by_price_range(pet_friendly, 0, 300)

# Filter restaurants by city and cuisine
cleveland_italian = filter_by_city(restaurants, 'Cleveland')
italian_only = filter_by_cuisine(cleveland_italian, 'Italian')
affordable_italian = filter_by_price_range(italian_only, 0, 80)

# Combine multiple filters
filters = {
    'city': 'Columbus',
    'cuisine': 'Mediterranean',
    'price_max': 100
}
results = combine_filters(restaurants, filters)

Frequently asked questions

What does the Data Filtering AI skill do?

Filter accommodations, restaurants, and attractions by travel requirements

Why use Data Filtering on TypingMind?

Because you install it once and use it with any model. Data Filtering is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Data Filtering in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cxcscmu/SkillLearnBench/tree/main/skills/b1-one-shot-claude-haiku-4-5/travel-planning/data-filtering. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Data Filtering?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Data Filtering?

As many as you like. As long as a model supports skills, you can use Data Filtering with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Data Filtering AI skill free?

Yes. It is published on GitHub by cxcscmu under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇