home / skills / bdambrosio / cognitive_workbench / test-json-sql-query-web
This skill helps you validate and explore JSON SQL primitives with search-web output by testing project, pluck, filter-structured, and sort operations.
npx playbooks add skill bdambrosio/cognitive_workbench --skill test-json-sql-query-webReview the files below or copy the command above to add this skill to your agents.
---
name: test-json-sql-search-web
description: Test JSON SQL primitives with search-web output
type: plan
manual_only: true
parameters: []
---
# test-json-sql-search-web
Tests JSON SQL primitives (project, pluck, filter-structured, sort) with real search-web output.
## What it tests
- search-web returns Collection of Notes
- project extracts metadata.uri, metadata.domain, char_count
- pluck extracts first URI
- filter-structured filters by char_count > 100
- sort orders by char_count descending
This skill tests JSON SQL primitives against real search-web output to validate extraction and transformation logic. It focuses on verifying project, pluck, filter-structured, and sort behaviors using Collections of Notes returned by search-web. The goal is to ensure reliable metadata extraction and ordering for downstream processing.
The skill runs a pipeline that inspects Collection objects returned by search-web and applies JSON SQL primitives. It projects selected fields (metadata.uri, metadata.domain, char_count), plucks the first URI from results, filters records where char_count > 100, and sorts the remaining items by char_count in descending order. The output is a small transformed dataset suitable for assertions in tests.
What does the filter-structured primitive check here?
It selects records where the char_count field is greater than 100, ensuring only sufficiently long documents pass.
Why sort by char_count descending?
Sorting by char_count descending prioritizes longer documents, which is useful for tests that focus on richer content.