Install the MView skill
Instructions for an LLM to install a skill for creating and validating MViews from the canonical sources.
Install the MView skill
This page is intended for an LLM with access to the user's filesystem. Its purpose is to install a reusable skill for creating, reviewing, and validating MViews without duplicating a copy of the specification that may become outdated.
The skill must use Create an MView with an AI agent as its entry point. That page is designed for models: it explains the creation workflow and links to the specific documentation that must be consulted at each step.
Instructions for the installing model
When the user asks you to install the MView skill, perform these actions:
- Identify the skills directory supported by the agent you are configuring. Inspect the project's instructions and configuration first. Prefer a project-local installation so it remains portable with the repository.
- Create a directory named
mviewinside that skills directory. - Create
mview/SKILL.mdwith the template from this page. - If a skill with that name already exists, read it before editing. Update only the MView instructions and preserve local adaptations that do not conflict with the canonical sources.
- Do not download or maintain a local copy of the JSON Schema as the source of truth. The skill must consult the canonical URL to avoid becoming outdated.
- Verify that
SKILL.mdexists at the expected location and report the installed path.
Common locations include .agents/skills/mview/SKILL.md, .claude/skills/mview/SKILL.md, and .opencode/skills/mview/SKILL.md, but you must use the actual convention of the agent and project instead of assuming one of them.
SKILL.md template
Install the following content:
---
name: mview
description: Create, review, and validate MViews from source files or selected files in a source directory using the canonical Carmen Labs MView specification. Use when the user asks to create, modify, inspect, or validate an MView, mview.json, MView parser, or MView component.
---
# MView
Use the current Carmen Labs documentation as the source of truth. Do not rely on remembered field names, accepted values, or copied schema definitions.
## Canonical sources
- Model-oriented creation guide: https://carmenlabs.com/v1/create
- Specification overview: https://carmenlabs.com/v1/overview
- Manifest reference: https://carmenlabs.com/v1/schema-reference
- Canonical JSON Schema: https://schemas.carmenlabs.com/mview/v1/schema.json
- Capabilities and normalized input: https://carmenlabs.com/v1/capabilities
- Parser contract: https://carmenlabs.com/v1/parser-contract
- Component contract: https://carmenlabs.com/v1/component-contract
- Directory and discovery rules: https://carmenlabs.com/v1/directory-layout
- Security model: https://carmenlabs.com/v1/security-model
- Versioning: https://carmenlabs.com/v1/versioning
## Required workflow
1. Fetch and read `https://carmenlabs.com/v1/create` before creating an MView. Treat it as the navigation entry point for models, then follow the linked specification pages needed for the task.
2. Inspect the source file or the explicitly selected files in a source directory locally. Determine their structure, fields, encodings, missing values, and the user's intended view. Never invent source columns or data, and never include undeclared directory files implicitly.
3. Read the capabilities page and select `accepts` from the normalized input the parser actually needs, not only from the source file extension.
4. Read the manifest reference and fetch the canonical JSON Schema before writing `mview.json`. The schema is the authority for fields, required properties, enums, patterns, and `additionalProperties`.
5. Read the parser and component contracts before implementing them. Keep source-file I/O in the runtime, make the parser deterministic, and make the component render only the model it receives.
6. Read the directory-layout and security pages before choosing paths or adding runtime behavior. All manifest paths must be relative.
7. Preserve the user's original creation request in `mview.json` as `prompt`.
8. Validate the finished manifest against `https://schemas.carmenlabs.com/mview/v1/schema.json`. Also verify that parser output matches component input and that every declared file exists.
## Source-data discovery
The creation guide tells you which documentation to consult; it does not contain the user's source data. Find data only through files or tools the user has made available in the current workspace:
1. Locate the source file or directory named by the user. For a directory, identify the exact selected files. If the source or selection is ambiguous or unavailable, ask for its path or for a representative sample.
2. Inspect only enough data to infer the real structure and safely implement the parser.
3. Do not upload source data to Carmen Labs documentation URLs. Those URLs provide specification material only.
4. Set `source.path` relative to the MView directory. For a directory, set `source.kind` to `"directory"`, make every `source.files[].path` relative to it, and declare each file's `accepts`. Use content hashes only when they were calculated according to the canonical manifest reference.
## Non-negotiable rules
- Never modify a source file as part of MView execution.
- Never let a directory MView read files outside its explicit `source.files` selection.
- Never use absolute paths in the manifest.
- Never add manifest properties that are absent from the current schema.
- Never let the parser or component bypass the runtime to read arbitrary files.
- Never substitute `metadata` for rendering configuration; values that affect rendering belong in `settings`.
- Prefer the simplest renderer supported by the target runtime and justified by the requested view.
If a canonical URL cannot be accessed, state which source could not be verified. Do not guess the current contract or claim schema conformance without validation.How the skill finds information
The skill does not need to store the entire specification. When activated, it:
- Opens
/v1/createto obtain the model-oriented workflow. - Follows links from that page according to the task: capabilities for interpreting input, the schema reference for the manifest, and contracts for the parser and component.
- Fetches the schema directly from
schemas.carmenlabs.com/mview/v1/schema.jsonbefore validation. - Inspects actual data only in the workspace or through tools authorized by the user.
This separation keeps the skill small and allows it to always consult the published version of the specification.
Installation check
Installation is complete when:
- Exactly one
mview/SKILL.mdexists in the selected skills directory. - Its frontmatter contains
name: mviewand a description that activates the skill for MView tasks. - The creation guide and JSON Schema are listed as canonical sources.
- The workflow requires inspecting real data, consulting the documentation, and validating the manifest.
- The agent can discover the skill after starting a new session or reloading its skill catalog.
