home / skills / bdambrosio / cognitive_workbench / test-json-sql-pluck
This skill extracts a single field from test data by plucking titles from papers and returning a titles collection.
npx playbooks add skill bdambrosio/cognitive_workbench --skill test-json-sql-pluckReview the files below or copy the command above to add this skill to your agents.
---
name: test-json-sql-pluck
description: Tests pluck primitive (SELECT single field)
manual_only: true
---
# Test Pluck Primitive
**Self-contained:** Creates test data internally
**Input:** Creates $papers collection (4 papers with id, title, year, citations, venue)
**Operation:** Pluck title field from each paper
**Expected Output:** $titles collection with 4 items, each containing just the title string
This skill tests a pluck primitive that selects a single field from structured records. It creates a small, self-contained dataset of paper records and verifies that extracting the title field produces the expected collection of titles. The test is deterministic and requires no external data.
The test generates an internal $papers collection with four paper objects, each containing id, title, year, citations, and venue. It runs the pluck operation to select only the title field from every paper. The test asserts that the resulting $titles collection contains exactly four items and that each item is the title string from the corresponding paper.
Does the test depend on external resources?
No. The test creates its own $papers collection internally and does not use external data.
What exactly is asserted?
The test asserts that the $titles collection has four items and that each item is the title string from the corresponding paper.