Ship Claude Code skill for xql (closes #6)#7
Merged
Merged
Conversation
Adds skill/SKILL.md — an official Claude Code skill so agents told "use xql" reach for the right binary with the right SQL subset instead of hallucinating from training data or falling back to sqlite3/DuckDB. The skill covers backend dispatch, the SQL subset with explicit non-goals (no JOINs / subqueries — reach for DuckDB), write-safety mechanics, CSV type-inference gotchas, SharePoint OData translation rules, REPL commands, and four worked recipes. Users install with `cp -r skill ~/.claude/skills/xql`. Also fixes the flagship case-fold dedup example in README.md, GRAMMAR.md, and the new skill to use `HAVING COUNT(*) > 1` instead of `HAVING n > 1` — xql's HAVING resolves against source columns and aggregates, not SELECT-list aliases, so the alias form errors at eval. Alias-in-HAVING support is worth its own follow-up issue. Author: David Anderson, with AI assistance from Claude Code. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014xByMrUTST8C4aJHnZqwxg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
skill/SKILL.md— an official Claude Code skill so agents told "use xql" reach for the right binary with the right SQL subset instead of hallucinating from training data or falling back to sqlite3/DuckDB. Users install withcp -r skill ~/.claude/skills/xql.HAVING n > 1example in README, GRAMMAR, and the new skill toHAVING COUNT(*) > 1— the alias form errors at eval today (worth its own follow-up issue).Closes #6.
Skill scope
Backend dispatch, SQL subset with explicit non-goals (no JOINs/subqueries — reach for DuckDB), write-safety mechanics (preview +
Apply? [y/N],!shortcut,--commit,--confirm-destructive), CSV type-inference gotchas (leading zeros, NaN, Excel scientific notation), SharePoint OData translation (LIKE limits, IN chain, BETWEEN, IS NULL, internal-vs-display column names), REPL commands + one-shot flags +--describe, four worked recipes (dedup, bulk-close SP items, schema-first exploration, redirect large SELECT). Version guard tells the agent to runxql --versionand expect 1.6.0+.Test plan
python3 yaml.safe_loadparses frontmatter (name + description, 471 chars — well under the 1536 combined cap).cp -r skill ~/.claude/skills/xql-test— layout matches Claude Code skill convention.--describe) prints the expected schema.--output) writes CSV to disk correctly.--commit— verified source file untouched after preview.🤖 Generated with Claude Code
https://claude.ai/code/session_014xByMrUTST8C4aJHnZqwxg