Agent skill

search-articles

Query articles using category filters and BM25 keyword search

Stars 3
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/GuillermoLB/fastpaip-app/tree/main/skills/search-articles.skill

SKILL.md

Search Articles

Query articles using structured category filters and BM25 full-text keyword search.

Usage

bash
# List available categories
python search.py --list-categories

# Browse all articles
python search.py --limit 10

# Filter by categories
python search.py --categories NEWS SCIENTIFIC

# Keyword search (BM25 full-text search)
python search.py --keywords "machine learning"

# Combined filters
python search.py --categories SCIENTIFIC --keywords "biology"

# JSON output for piping
python search.py --keywords "API" --format json | jq '.results[].id'

Parameters

Parameter Type Description
--list-categories flag List all available article categories
--categories list Filter by categories (NEWS, SCIENTIFIC, etc.)
--keywords string BM25 full-text search keywords
--limit int Maximum results (default: 10)
--offset int Pagination offset (default: 0)
--format choice Output: table, json, csv
--output path Output file for json/csv

Output Formats

Table (default)

                 Search Results (3 found)
┏━━━━┳━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ID ┃ Category   ┃ Score ┃ Snippet                  ┃
┡━━━━╇━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 6  │ SCIENTIFIC │ 0.15  │ ...machine learning...   │
└────┴────────────┴───────┴──────────────────────────┘

JSON

json
{
  "results": [
    {
      "id": 6,
      "raw_article": "...",
      "category": "SCIENTIFIC",
      "keyword_score": 0.15,
      "snippet": "...machine learning..."
    }
  ],
  "metadata": {
    "total_results": 3,
    "query_time_ms": 42.5,
    "strategies_used": ["bm25_keyword_search", "category_filter"]
  }
}

CSV

csv
id,raw_article,category,keyword_score,snippet
6,"...","SCIENTIFIC",0.15,"...machine learning..."

Examples

See references/examples.md for 30+ usage examples including:

  • Category filtering
  • Keyword search strategies
  • Date range queries
  • Pagination
  • Composing with jq, grep, and other tools
  • Batch processing workflows

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results