From looker-skills
Creates LookML views and models for Looker BI projects based on user goals. Maps model connections, validates LookML, and runs verification queries. Use after project setup.
How this skill is triggered — by the user, by Claude, or both
Slash command
/looker-skills:creating-lookml-modelThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill guides you through the *process* of writing all the LookML (view
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.
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:
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.
Orchestrates the end-to-end Looker developer onboarding journey: pre-flight, discovery, CLI, auth, connection, project, model, and dashboard creation. Start here for a new Looker setup.
Manages LookML projects via the Looker API: creates git branches, project directories, LookML files, and generates view boilerplate from database schemas.
Build, validate, and manage semantic models using Sidemantic. Creates semantic layers mapping database tables to business dimensions/metrics, generates SQL, and imports from Cube/dbt/LookML.
npx claudepluginhub looker-open-source/looker-skills