with one click
query-files
// This skill SHOULD be used for structured extraction or batch queries against JSON (use jq), YAML (use yq), or Markdown (use mq), and for advanced text search with ripgrep flags or pipe composition (use rg).
// This skill SHOULD be used for structured extraction or batch queries against JSON (use jq), YAML (use yq), or Markdown (use mq), and for advanced text search with ripgrep flags or pipe composition (use rg).
Use when writing or editing a Slack message, email, pull request body, GitHub issue, Reddit post, agenda, or doc. Enforces a direct, warm, unfilled tone and removes AI tells. Always scores the final draft and runs a self-audit pass before delivery.
Reframe code design through functional programming principles for agent-assisted development. This skill SHOULD be used when the user says "think functional", "think FP", "make this pure", "separate effects", "where should this side effect go", "this function does too much", "how should I structure this for agents", "make this easier to review", "reduce context needed", or when planning module structure, store design, or code that agents will write and humans will review. Applies FP discipline within any language to maximize agent effectiveness and human reviewability.
Use when designing AI features and the real opportunity may be perception support, not delegated conversational work.
Lift-and-shift port of a repository, library, API, protocol, or other software artifact to a different language, runtime, or platform, with the original source available as a reference. This skill SHOULD be used when the user says "port from X to Y", "lift and shift", "rewrite in Go", "rewrite in Rust", "translate this codebase", "convert to TypeScript", "language migration", "rewrite in another language", "carry over the algorithms", "borrow techniques from", "dirty room", "dirty-room design", "sc-dirty-room", or wants to reimplement an existing artifact while studying its internals to preserve algorithms, data structures, or idioms worth keeping. NOT for legally-constrained reimplementation — use /sc-clean-room when copyright isolation matters.
Audit and improve project memory files (CLAUDE.md, AGENTS.md, .claude.local.md) — assess against a quality rubric, then apply additions and removals. This skill SHOULD be used when the user asks to audit, improve, edit, fix, tighten, rewrite, or update a memory file, or to check whether one is too long, stale, or bloated.
Clean-room reimplementation of a repository, library, API, protocol, or other software artifact. This skill SHOULD be used when the user wants to create a functionally equivalent implementation of an existing artifact without copying its internal design or expression. NOT for refactoring existing code.
| name | query-files |
| description | This skill SHOULD be used for structured extraction or batch queries against JSON (use jq), YAML (use yq), or Markdown (use mq), and for advanced text search with ripgrep flags or pipe composition (use rg). |
Extract specific data from files using CLI tools instead of built-in Read/Grep. Saves 80-95% of context tokens on large files and enables features the built-in tools lack.
| Task | Tool | When to use over built-in |
|---|---|---|
| JSON field extraction | jq | File >50 lines, need specific fields |
| YAML field extraction | yq | File >50 lines, need specific fields |
| Markdown element extraction | mq | Need code blocks, links, headers, tables |
| Text search with advanced flags | rg | Need -F, -v, -w, -C, pipe composition |
Fall back to Read when the file is small (<50 lines), the overall structure matters, or edits follow immediately. Fall back to built-in Grep for straightforward pattern matching (handles 95% of search needs).
# Specific field
jq -r '.version' package.json
jq -r '.compilerOptions.target' tsconfig.json
# Nested field
jq -r '.dependencies.react' package.json
# All keys at a level
jq -r '.scripts | keys[]' package.json
jq -r '.dependencies | keys[]' package.json
# Multiple fields
jq '{name, version}' package.json
# Filter array by condition
jq '.items[] | select(.active == true)' data.json
# Count
jq '.dependencies | length' package.json
# Pluck from array
jq -r '.data[].name' response.json
# Filter with to_entries
jq -r '.dependencies | to_entries[] | select(.value | startswith("^")) | "\(.key): \(.value)"' package.json
Common files: package.json, tsconfig.json, package-lock.json, .eslintrc.json, API responses.
For detailed patterns (package.json, tsconfig, API responses), load jq reference.
# Specific field
yq '.version' pubspec.yaml
yq '.services.web.image' docker-compose.yml
# All keys at a level
yq '.services | keys' docker-compose.yml
# Nested array element
yq '.jobs.build.steps[0].name' .github/workflows/ci.yml
# Filter by condition
yq '.services.[] | select(.ports)' docker-compose.yml
# Multiple fields
yq '.name, .version' pubspec.yaml
# Wildcard across siblings
yq '.services.*.image' docker-compose.yml
# Output as JSON
yq -o=json '.' config.yaml
Common files: docker-compose.yml, .github/workflows/*.yml, kubernetes manifests, Helm charts, pubspec.yaml.
For detailed patterns (Docker Compose, GitHub Actions, Kubernetes), load yq reference.
# Code blocks
mq '.code' README.md
mq '.code("python")' README.md
# Headers
mq '.h' README.md
mq '.h2' README.md
# Links
mq '.link.url' README.md
# Tables
mq '.[][]' README.md
# Lists
mq '.list' README.md
# YAML frontmatter
mq '.yaml.value' file.md
# Frontmatter parsed to JSON
mq '.yaml.value' file.md | yq -o json
# Filter by content
mq '.code | select(contains("import"))' file.md
# JSON output for further processing
mq -F json '.code' README.md | jq '.[0]'
Common files: README.md, CHANGELOG.md, documentation, API docs, specs.
For detailed patterns (selectors, filtering, output formats, frontmatter), load mq reference.
Use rg via Bash when the built-in Grep tool lacks the flag or composition needed.
# Fixed string (no regex interpretation)
rg -F 'console.log(' .
# Word boundaries
rg -w 'function' .
# Invert match
rg -v 'test' -t js .
# Context lines
rg -n -C 2 'pattern' .
# Specific file types
rg -t js 'import' .
rg -t py 'def ' .
rg -t go 'func ' .
# Exclude directories
rg --glob '!node_modules' 'pattern' .
# Count matches per file
rg -c 'TODO' .
# Files only (no content)
rg -l 'pattern' .
# Pipe composition
rg 'pattern' . | head -10
rg -l 'pattern' . | sort -u
For detailed patterns (function defs, imports, file types, pipe composition), load rg reference.
# Parse markdown frontmatter as structured data
mq '.yaml.value' file.md | yq '.description'
# Markdown to JSON to jq
mq -F json '.link' README.md | jq '.[].url'
# Find files by content, extract structured data
rg -l 'apiVersion' -t yaml | xargs -I {} yq '.kind' {}
# Find markdown files, extract code blocks
fd -e md | xargs -I {} mq '.code("bash")' {}
# YAML to JSON conversion
yq -o=json '.' config.yaml | jq '.services | keys[]'
One command, exact data, minimal context. Built-in tools load everything; these tools load only what matters.