- Home
- Skills
- Bdambrosio
- Cognitive Workbench
- Test Json Sql Filter
test-json-sql-filter_skill
- Python
9
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill bdambrosio/cognitive_workbench --skill test-json-sql-filter- plan.json1.7 KB
- SKILL.md414 B
Overview
This skill validates a structured filter primitive by running an end-to-end test that creates sample data and applies a WHERE-style condition. It focuses on filtering primitive fields (numeric comparisons) and confirming the resulting collection matches the expected subset. The test is self-contained and deterministic, making it ideal for CI checks of filtering logic.
How this skill works
The skill generates an internal collection named $papers with citation counts [100, 250, 50, 180] and associated titles. It applies a filter operation equivalent to WHERE citations > 100 and produces a $high_cited collection. The test then asserts that $high_cited contains exactly the two expected items (Transformers: 250, Scaling Laws: 180).
When to use it
- Validate numeric comparison behavior of filter primitives
- Automated tests in CI to catch regressions in WHERE logic
- Verify end-to-end behavior of a query layer without external dependencies
- Demonstrate expected filter semantics for reviewers or maintainers
- Quick sanity checks after refactoring filtering code
Best practices
- Keep test data minimal and self-contained to avoid external flakiness
- Use clear, deterministic expectations (exact item counts and values)
- Test boundary conditions (equal, greater-than, less-than) in companion tests
- Name collections and assertions to clearly indicate intent (e.g., $high_cited)
- Run the test as part of a pipeline to catch regressions early
Example use cases
- CI job that runs unit-level verification of filtering primitives
- Documentation example showing how WHERE > numeric comparisons behave
- Regression test after optimizing query execution or changing comparison operators
- Teaching example for engineers learning how structured filters are evaluated
- Pre-merge check to ensure no change breaks simple numeric filters
FAQ
It asserts that filtering $papers for citations > 100 yields a $high_cited collection with exactly two items: Transformers (250) and Scaling Laws (180).
Does the skill depend on external data or services?
No. The test is self-contained and creates its own $papers collection so it can run deterministically in any environment.