From redshift-comment-mcp
Cross-table column search — finds every column whose name or comment matches a keyword across all tables in one (or all) schemas via one schema-wide MCP call per schema. Use when user wants to find FK / shared-key columns across many tables (e.g. before composing a JOIN), or to audit column-naming consistency. Do NOT use for a single known table (use search_columns directly), single-column lookup (use get_column_comment), or table-name search (use /redshift-grep-tables). Triggers: /redshift-grep-columns / find column / search columns across tables / where is foo column / 跨表找欄位 / 哪些表有 foo / カラム横断検索 / カラム名検索.
How this skill is triggered — by the user, by Claude, or both
Slash command
/redshift-comment-mcp:redshift-grep-columnsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Find every column whose name or comment matches a keyword across all
Find every column whose name or comment matches a keyword across all
tables in one or all schemas. Single MCP call per schema via
search_columns(table_name=None).
customer_id
or cust_no?").search_columns(kw, schema, table) directly.get_column_comment./redshift-grep-tables.| Form | Behavior |
|---|---|
<keyword> | grep across all schemas in the cluster |
<keyword> --schema <name> | scope to one schema |
<keyword> --schema <s1>,<s2> | scope to listed schemas |
<kw1> <kw2> | space-separated keywords (OR logic on MCP side) |
--max-list N | results per page (default 50) |
The MCP server's search_columns accepts an optional table_name;
omit it for schema-wide column search in one call:
search_columns(keywords, schema_name=<schema>, table_name=None)
This returns one row per matching column with table_name included,
ranked by hit_count across name + comment. Paginate via has_more
if total > 50.
Procedure:
--schema given: one call per listed schema.list_schemas(include_comments=true) → enumerate user schemas;
one search_columns per schema (schema-wide each).Latency: ~0.7s per schema-wide call (12K-column schemas). For clusters
with many schemas, prompt user to scope via --schema before running.
Group by <schema>.<table>, comment-first. One blank line between groups:
Matches for "customer_id" (12 hits in 3 schemas, 8 tables):
dbt_marts.fct_orders
customer_id bigint Customer reference (FK to dim_users.id)
dbt_marts.fct_returns
customer_id bigint Customer who initiated the return
dbt_staging.stg_users
id bigint Customer's primary key
cust_no bigint Legacy customer no, alias for id
Cap at 50 results per page; show 1-50 of 87, reply 'more' when truncated.
Rendered list IS the output. No JSON. Hand off to user to pick a target.
If the user wants to profile one of the columns, suggest
/redshift-profile <schema>.<table> <column>.
search_tables + per-table search_columns — use search_columns(keywords, schema_name, table_name=None) for one-shot schema-wide search. The orchestration approach is ~27x slower.<schema>.<table> prefix when rendering — same column name across tables IS the value of cross-table grep.| Condition | Behavior |
|---|---|
| Empty keyword | refuse with usage hint |
--schema doesn't exist | fail with the schema name + suggestion to check spelling |
| MCP returns 0 hits everywhere | "No matches; broaden keyword?" |
| Need | Use |
|---|---|
| Search tables by name/comment across schemas | /redshift-grep-tables |
| Browse interactively from zero context | /redshift-explore |
| Profile a column's values once located | /redshift-profile |
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub kouko/redshift-comment-mcp --plugin redshift-comment-mcp