/metalayer:ask-datafrom metalayer
Guides through a structured workflow for answering data questions: retrieval, metadata navigation, SQL consensus with sub-agents, execution, and reflection with plausibility checks.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /metalayer:ask-data still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Master workflow for answering data questions. Follow each phase in order.
The system has already run search_context and injected results, always-lore, structural lore, and the vault summary index into your context. Do not re-run search_context unless you explicitly need to broaden the search later.
Start with domain context. Before diving into search results, run metalayer frequent to see which views and fields have been used most in recent queries. Load those first — they're likely relevant. Most questions use the same core tables repeatedly.
Then read the injected search results. For each result that looks relevant to the question, call get_context(name) to load the full file. Make 1-5 calls typically. If a result matches a topic, call get_topic() instead — it resolves the full chain (topic -> concepts -> extends -> fields -> views -> relations).
Follow [[wikilinks]] found in loaded files. Chase links until you have:
Stop navigating when you can write the query. Do not over-fetch — if you have the tables, joins, columns, and business rules, move on.
Read the sql-consensus skill and follow it exactly:
Before executing the winning SQL, call validate_refs() on every [[ref]] from the combined in_data_model list. If any ref fails validation, fix the SQL before proceeding.
Execute the winning SQL using the source referenced by the relevant view(s). Resolve the view's source: [[source_name]] to find the source file, then use the tool it describes (CLI command, MCP server, etc.). You have access to these tools in your environment.
Also call search_context() for similar past queries in utils/queries/. Compare results against past query outputs for consistency. If the new result differs dramatically from a similar past query (order of magnitude off, opposite sign, etc.), flag it before presenting.
Read the reflection skill and follow it:
Do not draw the card yourself. Run metalayer answer-card and it will render a perfectly aligned ASCII card. Example:
metalayer answer-card \
-q "How many logins last week and which workspaces were top 3?" \
-k "login" -k " ↳ timestamp" -k " ↳ workspace_id" -k "workspaces" -k " ↳ name" \
-n "login" -n " ↳ user_id" \
-s "snowflake" \
-j "login_to_workspaces (login → workspaces)" \
-l "internal_workspaces" -l "sql_style" \
--notes "Excluded internal workspaces. Calendar week (Mon-Sun)."
Arguments:
-q — the user's original question-k — known field lines (repeatable). Views as plain text, fields indented with ↳-n — new field lines (repeatable). Same format. A view can appear on both sides.-s — source name-j — join descriptions (repeatable), e.g. "login_to_workspaces (login → workspaces)"-l — lore names applied (repeatable)--notes — methodology notes (omit for simple queries)Run this command immediately before presenting results. Display its output, then follow with the data and a plain-language summary.
After presenting results, run metalayer log-query with the query details. This logs the query AND outputs instructions for the learning phase. Example:
metalayer log-query \
--question "How many logins last week?" \
--sql "SELECT COUNT(*) FROM login WHERE ..." \
--summary "3615 total logins" \
--in-model orders --in-model login \
--not-in-model login.workspace_id --not-in-model login.user_id \
--consensus-notes "All 5 agents agreed"
The command will output a LEARNING REQUIRED block. Follow its instructions — launch a learning subagent using the Agent tool with the context it provides. Read the learn skill. This is not optional; the tool output tells you exactly what to do.
When the user says the answer is wrong, classify the error:
When the user says the answer is correct ("accepted query"), log it with a confidence flag so future queries can reference it as a validated baseline.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
None: SKILL.md is the whole skill.
Generated from the plugin's indexed repository (ryanjanssen/metalayer) — no native marketplace selected
npx claudepluginhub p/ryanjanssen-metalayer9 skills in this plugin
/context-auditContext AuditSemantic checks the LLM performs on vault content. Static validation (duplicate filenames, dangling refs, circular extends, missing type) is handled by Python. This skill covers the checks that require understanding meaning./learnYou are a learning subagent. Your only job is to review what just happened in a data query and propose updates to the vault. You cannot skip this — it is your entire task./propose-checklistPropose ChecklistRead this BEFORE drafting any vault change proposal. Answer each question for every proposed file./reflectionPost-execution quality checks. Run these after every execute_sql call./setupInitialization workflow for a new Metalayer vault. Run this when starting from scratch or verifying an existing installation./sql-consensusSQL Consensus5-sub-agent SQL generation protocol. Do not skip this — every data question goes through consensus.Other plugins' skills for the same job