/looker-skills:creating-lookml-modelfrom looker-skills
Creates LookML views and models based on onboarding goals, maps model connections, validates LookML, and runs verification queries. Part of Looker Developer Onboarding sequence.
Ships in looker-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill guides you through the process of writing all the LookML (view files and model files) needed to prepare for the dashboard requested by the user during their onboarding interview, configuring the connection mapping in Looker, validating the LookML code, and running inline queries to verify it functions correctly.
lookml-modeling-guidelines skill for writing and verifying all LookML
elements.Refer back to the onboarding goal and BigQuery exploration results established with the user during the Step 1 (Discovery) interview in the conversation history. You must recall: 1. The target Dashboard Goal (e.g., Sales Overview, Support Metrics, etc.). 2. The specific GCP Project, Dataset, and Tables (fact and dimension) agreed upon. 3. The target Metrics (measures) and Dimensions to be used.
Note: Do not invent or guess these details. The names of your views, fields, explores, and models must directly map to the schema and tables you discovered in Step 1.
For each BigQuery table required to build the target dashboard, you must write the LookML view definition and upload it to the project:
Create the views directory: If the views/ directory does not yet
exist in the project, create it using the Looker CLI:
looker-cli project directory create {project_id} views
Generate View Content: Retrieve the table columns (from Discovery) and
write the LookML view file content locally (e.g. to
/tmp/{table_name}.view.lkml). Follow the primary key and field definitions
guidelines.
Upload the View File: Upload the file to your Looker project views folder:
looker-cli project file create {project_id} views/{table_name}.view.lkml /tmp/{table_name}.view.lkml
Guideline Reference: You MUST consult and strictly follow the view
creation best practices in the lookml-modeling-guidelines skill
(Section 4 & 6.C) for all view definitions, primary key rules, and field
reference specifications.
Write the LookML model definition and upload it to the project root:
Write the model LookML structure (defining explores, joins, and includes) to
a local file (e.g., /tmp/{model_name}.model.lkml).
connection: "{connection_name}".include: "/views/orders.view.lkml", include: "/views/users.view.lkml"). Avoid
using broad wildcards like "/views/**/*.view.lkml" to prevent
performance bloat and compile errors.include: "/dashboards/**/*.dashboard.lookml".Upload the model file to your Looker project root:
looker-cli project file create {project_id} {model_name}.model.lkml /tmp/{model_name}.model.lkml
Guideline Reference: You MUST consult and strictly follow the model
and explore best practices in the lookml-modeling-guidelines skill
(Section 6.A & 6.B) for all include declarations, explore structures, and
explicit join relationship definitions.
Map your LookML model to the allowed database connection in Looker using the Looker CLI. This step is mandatory for Looker to register the model configuration mapping and enable querying.
Write the model configuration payload directly to /tmp/model_config.json:
{
"name": "{model_name}",
"project_name": "{project_id}",
"allowed_db_connection_names": ["{connection_name}"]
}
Register the model configuration mapping (Mandatory Step):
looker-cli model import /tmp/model_config.json
Verify the mapping:
looker-cli model cat {model_name}
Ensure the returned JSON correctly lists your connection in
allowed_db_connection_names.
Validate the LookML code to ensure there are no syntax or logic errors:
Trigger project validation using the Looker CLI:
looker-cli api project validate_project {project_id}
If errors are found, fix them in your local files, upload the updated
versions using looker-cli project file update, and re-run validation until
clean.
Guideline Reference: Under our Zero-Error Policy, you are strictly
forbidden from submitting code that fails validation. Refer to
lookml-modeling-guidelines (Section 3 & 5) for detailed validation
rules and the feedback loop process.
Test your connection and LookML model by running a verification query:
Use Discovery tools in lookml-modeling-guidelines (Section 2) to find
the fully qualified names of the dimensions and measures you defined.
Write the JSON query payload directly to /tmp/verify_query.json
(requesting your fully qualified dimension and measure, limited to 5 rows):
{
"model": "{model_name}",
"view": "{explore_name}",
"fields": ["{explore_name}.{dimension_name}", "{explore_name}.{measure_name}"],
"limit": 5
}
Execute the query using the Looker CLI:
looker-cli query runquery --file /tmp/verify_query.json --format json
Confirm that the query executes successfully and returns data without
database or SQL errors. Refer to lookml-modeling-guidelines
(Section 3) for verification guidelines.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
lookml, looker, model-creation, view-creation, looker-onboarding, looker-cli
Generated from the plugin's indexed repository (looker-open-source/looker-skills) — no native marketplace selected
npx claudepluginhub p/looker-open-source-looker-skills27 skills in this plugin
/authenticating-looker-cliLooker Developer Onboarding: Step 3. Authenticates the Looker CLI using OAuth. Only execute this after Step 2 (CLI Verification using `installing-looker-cli`)./connecting-looker-to-bigqueryLooker Developer Onboarding: Step 4. Creates a database connection in Looker to Google BigQuery. Only execute this after Step 3 (CLI Authentication using `authenticating-looker-cli`)./creating-looker-dashboardLooker Developer Onboarding: Step 7 (Final Step). Creates a LookML dashboard in the project, imports it as a user-defined dashboard (UDD) in Looker, and iteratively refines it based on user feedback by syncing changes. Only execute this after Step 6 (Model Setup using `creating-lookml-model`).Other plugins' skills for the same job