Map Explain
Produce a natural-language explanation of a specific Cortex function, business...
Install
npx skills add Snowflake-Labs/cocoplus --skill map-explain -g -a claude-code -y- Repository
- Snowflake-Labs/cocoplus727
- Category
- Business
- Updated
- 1mo ago
- License
- MIT
- Context cost
- Lightabout 1,023 tokens
- Runs scripts
- No, instructions only
What it does
Produce a natural-language explanation of a specific Cortex function, business capability, or schema element from the committed knowledge graph
$map explain <target>
Explain a specific function, capability, or schema element in domain terms using the committed coco-map.json. Answers: what it does, what depends on it, what it depends on, and how it relates to the nearest business capability.
Preconditions
.cocoplus/must be initialized.cocoplus/map/coco-map.jsonmust exist (run$mapfirst)<target>argument must be provided
Arguments
<target>(required): A function name, business capability name, or schema element name to explain. Case-insensitive matching is applied.
Step-by-Step Behavior
-
Verify initialization: Check
.cocoplus/exists. If not, output: "CocoPlus not initialized. Run$pod initfirst." and exit. -
Verify map exists: Check
.cocoplus/map/coco-map.jsonexists. If not, output:No function knowledge graph found. Run $map first to build it.and exit.
-
Read
coco-map.json: Load all structural and domain sections. -
Locate target: Search for
<target>across:- Function names in
structural.functions - Capability names in
domain.capabilities - Vocabulary terms in
domain.vocabulary - Apply case-insensitive fuzzy match (substring match if exact match not found)
- Function names in
-
If not found: Output:
No function or capability named '[target]' found in coco-map.json. Available functions: [comma-separated list] Available capabilities: [comma-separated list] Run $map to refresh the map if the project has changed.and exit.
-
Build explanation depending on target type:
For a function:
[function-name], Cortex AI Function
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
What it does:
[domain-level description from domain.vocabulary and domain.capabilities]
Cortex API: [AI_CLASSIFY / AI_COMPLETE / etc.]
File: [file-path]
Schema: [database.schema.function-name]


