search-sql

Runs read-only SQL queries against a local DuckDB for relational people-search analytics.

1|1|Updated Apr 28, 2026
One-click install
npx skills add https://github.com/powerset-co/powerpacks --skill search-sql-powerset-co
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: search-sql
Source: https://github.com/powerset-co/powerpacks/tree/main/packs/search/skills/search-sql
Command: npx skills add https://github.com/powerset-co/powerpacks --skill search-sql-powerset-co

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Row-at-a-time filters and BM25/vector retrieval cannot express relational or aggregate people-search questions like career ordering, tenure overlaps, or network-wide statistics. This Skill answers those questions by running read-only SQL directly against the local search DuckDB. ## Core Features & Use Cases - Per-person aggregates: Answer questions like "2+ stints at seed-stage companies" or "average tenure under 2 years" using GROUP BY and HAVING over position data. - Person-to-person joins: Find people who overlapped with a target at the same company, schoolmates, or set algebra across sub-populations via self-joins on date ranges. - Network analytics: Produce aggregate tables about the network itself, such as which companies you know the most people at or how many contacts changed jobs recently. - Use Case: A recruiter asks "who can intro me to John Doe?" The Skill resolves John Doe's companies and date ranges, then runs an overlap self-join to find shared-tenure colleagues, clearly flagging the result as overlap-based inference. ## Quick Start Ask the agent to use search-sql to find everyone in my network who overlapped with a specific person at the same company. ## Schema & Method The Skill ships a schema cheat sheet covering local_people_positions, local_person_profiles, local_summaries, local_people_education, local_education, and local_companies. It enforces value-space probes before filtering on categorical columns, dedupes results to person grain, caps output at 100 people, and requires the final SQL plus coverage caveats in every answer.

Frequently Asked Questions about search-sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find people who overlapped with someone at the same company?▼

Use an overlap self-join on local_people_positions: build a CTE of the target person's company_id and date ranges, then join other positions where start and end epochs intersect. Treat end_date_epoch = 0 as an open interval and include company_name so users can judge noisy matches.

How do I query career ordering like engineer before product manager?▼

Use window functions over local_people_positions to compute each person's first engineering start date and first product start date, then filter where the engineering date precedes the product date. Dedupe results to person grain before presenting.

Can I modify or write to the DuckDB from this skill?▼

No. The connection is strictly read-only and only a single SELECT or WITH statement is accepted per call. The skill forbids writing files, modifying the database, running other primitives, or making network calls.

Why do exact-match filters on role_track miss results?▼

role_track is a messy categorical column with roughly 95 values like engineering, engineering_ic, and product_management, so exact literals silently miss rows. Always run a GROUP BY value-space probe on the column first, then filter with ILIKE patterns covering the variants.

What are the limitations of DuckDB people search queries?▼

Results are capped at 200 rows per query with a truncated flag, and company enrichment columns like company_stage can be entirely empty in some indexes. Profiles cover only an enriched subset of people, and overlap joins can produce implausible matches from noisy company resolution.