Token导航 LogoToken导航TokenDH.com
运维和基础设施执行命令github未标认证来源可访问许可证需确认审计异常

cortex-classify-notebook皮质分类笔记本

Agent Skill

cortex-classify-notebook 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

336

周安装

14

GitHub Stars

5

下载量

112
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cortex-classify-notebook(皮质分类笔记本)
来源仓库:https://github.com/snowflake-labs/sfguides
仓库路径:skills/cortex-classify-notebook
安装命令:
npx skills add https://github.com/snowflake-labs/sfguides --skill cortex-classify-notebook
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/snowflake-labs/sfguides --skill cortex-classify-notebook

简介

cortex-classify-notebook 自动将 Snowflake Cortex 文本分类教程上传至用户账户并提供访问链接。

  • 适用于希望快速上手 Cortex 文本分类功能的用户,支持 Python 与 SQL 双路径学习。
  • 自动适配 SNOWFLAKE_LEARNING 环境并完成 notebook 部署,降低上手门槛。
  • 部署后建议核对阶段名称与单元格顺序,确保与最新文档版本一致后再开始实验。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Cortex Classify Text - Notebook Deployment Skill

You are deploying the Cortex CLASSIFY_TEXT tutorial notebook to the user's Snowflake account. This skill uploads the notebook and provides a direct link to open it in Snowsight.

What This Skill Does

  1. Fetches latest documentation to ensure current syntax
  2. Detects or sets up the target environment (prefers SNOWFLAKE_LEARNING)
  3. Creates a user-specific schema for the notebook
  4. Uploads the tutorial notebook to a Snowflake stage
  5. Creates the notebook in the user's account
  6. Provides a direct link to open the notebook in Snowsight

Deployment Flow

Welcome the user briefly, then proceed through the steps efficiently while keeping them informed. Do NOT ask for confirmation at each step - deploy smoothly and report results.

Step 0: Fetch Latest Documentation (ALWAYS do this first)

Before starting deployment, use web_fetch to retrieve the current official documentation:

https://docs.snowflake.com/en/sql-reference/functions/classify_text-snowflake-cortex
https://docs.snowflake.com/en/user-guide/ui-snowsight/notebooks

This ensures your explanations and any troubleshooting advice are current. If the docs show new parameters or syntax, inform the user.

Step 1: Environment Detection and Setup

Run these two queries in parallel:

-- Query 1: Check if SNOWFLAKE_LEARNING environment exists
SHOW ROLES LIKE 'SNOWFLAKE_LEARNING_ROLE';
-- Query 2: Read the notebook file from assets/classify_unstructured_customer_reviews.ipynb

If SNOWFLAKE_LEARNING_ROLE exists (preferred):

USE ROLE SNOWFLAKE_LEARNING_ROLE;
USE DATABASE SNOWFLAKE_LEARNING_DB;
USE WAREHOUSE SNOWFLAKE_LEARNING_WH;

If NOT available (fallback):

USE ROLE ACCOUNTADMIN;  -- or appropriate role with CREATE DATABASE privilege
CREATE DATABASE IF NOT EXISTS CORTEX_TUTORIALS_DB;
USE DATABASE CORTEX_TUTORIALS_DB;
CREATE WAREHOUSE IF NOT EXISTS CORTEX_TUTORIALS_WH WITH WAREHOUSE_SIZE = 'XSMALL';
USE WAREHOUSE CORTEX_TUTORIALS_WH;

Step 2: Create User Schema and Stage

-- Create a schema for the notebook (named after current user)
SET schema_name = CONCAT(CURRENT_USER(), '_CORTEX_TUTORIALS');
CREATE SCHEMA IF NOT EXISTS IDENTIFIER($schema_name);
USE SCHEMA IDENTIFIER($schema_name);

-- Create internal stage for notebook files
CREATE STAGE IF NOT EXISTS notebook_stage
    DIRECTORY = (ENABLE = TRUE)
    ENCRYPTION = (TYPE = 'SNOWFLAKE_SSE');

Step 3: Capture Environment Info (CRITICAL)

IMPORTANT: After setting up the environment, you MUST query the actual values to use in subsequent steps. Do NOT guess or assume schema names based on the local username.

SELECT
    CURRENT_USER() as current_user,
    CURRENT_SCHEMA() as current_schema,
    CURRENT_DATABASE() as current_database,
    CURRENT_ROLE() as current_role

Store these values for use in the upload and notebook creation steps.

Step 4: Upload Notebook File to Stage

Use the snow stage copy CLI command with fully qualified stage path:

snow stage copy <local_notebook_path> @<DATABASE>.<SCHEMA>.notebook_stage --overwrite --connection <connection_name>

Example (substitute actual values from Step 3):

snow stage copy /path/to/assets/classify_unstructured_customer_reviews.ipynb @{DATABASE}.{SCHEMA}.notebook_stage --overwrite --connection {CONNECTION}

IMPORTANT:

  • Use the ACTUAL schema name from Step 3, NOT a guessed name based on local OS username
  • The local path is: assets/classify_unstructured_customer_reviews.ipynb relative to this skill's base directory
  • Always use --overwrite flag to handle re-deployments

Step 5: Create the Notebook

Use fully qualified names for the notebook creation:

CREATE OR REPLACE NOTEBOOK <DATABASE>.<SCHEMA>.CLASSIFY_CUSTOMER_REVIEWS
    FROM '@<DATABASE>.<SCHEMA>.notebook_stage'
    MAIN_FILE = 'classify_unstructured_customer_reviews.ipynb'
    COMMENT = 'Tutorial: Classify customer reviews with Cortex AI';

Example (substitute actual values from Step 3):

CREATE OR REPLACE NOTEBOOK {DATABASE}.{SCHEMA}.CLASSIFY_CUSTOMER_REVIEWS
    FROM '@{DATABASE}.{SCHEMA}.notebook_stage'
    MAIN_FILE = 'classify_unstructured_customer_reviews.ipynb'
    COMMENT = 'Tutorial: Classify customer reviews with Cortex AI';

Step 6: Generate Snowsight URL

Get the account identifier for the URL:

SELECT CURRENT_ORGANIZATION_NAME() || '-' || CURRENT_ACCOUNT_NAME() as account_identifier

Build the Snowsight URL:

https://app.snowflake.com/{ORG}/{ACCOUNT}/#/notebooks/{DATABASE}.{SCHEMA}.CLASSIFY_CUSTOMER_REVIEWS

Where {ORG} and {ACCOUNT} come from splitting the account_identifier on -.

Success Message

After successful deployment, provide this summary:


Notebook Deployed Successfully!

Open your notebook: Click here to open in Snowsight

Location: {DATABASE}.{SCHEMA}.CLASSIFY_CUSTOMER_REVIEWS

What the notebook covers:

  1. Load Sample Data - Customer reviews from Tasty Bytes food trucks
  2. Classify Text with Python - Use cortex.classify_text() on single strings and DataFrames
  3. Classify Text with SQL - Use SNOWFLAKE.CORTEX.CLASSIFY_TEXT() directly in queries
  4. Analyze Results - Determine if customers would recommend food trucks based on reviews

To run the tutorial:

  1. Click the link above to open the notebook in Snowsight
  2. Click Run All to execute all cells
  3. Review the classification results showing "Likely", "Unlikely", or "Unsure" recommendations

Handling Issues

Schema Name Mismatch Errors

If you get "Schema does not exist" errors:

  • Always query CURRENT_SCHEMA() after setup to get the actual schema name
  • Do NOT assume the schema name matches the local OS username
  • Use the queried values in all subsequent commands

Stage Copy Failures

If snow stage copy fails:

  • Verify the stage path uses fully qualified names: @DATABASE.SCHEMA.stage_name
  • Ensure the connection parameter matches the user's active connection
  • Check that the role has WRITE privileges on the stage

Notebook Already Exists

The skill uses CREATE OR REPLACE NOTEBOOK by default, which handles existing notebooks automatically.

Insufficient Privileges

If user can't create notebooks:

  • Check if they have CREATE NOTEBOOK privilege on the schema
  • Suggest using SNOWFLAKE_LEARNING_ROLE if available
  • Fall back to ACCOUNTADMIN if necessary

Cortex Not Available

If Cortex functions aren't available in the region:

Reference Materials

  • assets/classify_unstructured_customer_reviews.ipynb - The notebook file to deploy
  • Notebook teaches classification of customer reviews into "Likely", "Unlikely", "Unsure" categories

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.62%
按下载量换算41

Claude

28.24%
按下载量换算32

Cursor

20.23%
按下载量换算23

Gemini CLI

9.54%
按下载量换算11

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/snowflake-labs/sfguides --skill cortex-classify-notebook 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills