ワンクリックで
read-strategy
Strategy for reading data from CAS or SAS tables. Determines which read tool to use (raw reads vs analytical queries).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Strategy for reading data from CAS or SAS tables. Determines which read tool to use (raw reads vs analytical queries).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Verify that a SAS Viya library exists and determine which server (CAS or SAS) hosts it. Always checks CAS first, then SAS. Returns the confirmed library name and server. Use whenever you need to confirm a library exists before listing tables or performing any library-scoped operation.
Unified resource verification skill. Use the appropriate find tool before any execution. Determines server for tables (CAS vs SAS). Never use list tools for verifying or finding specific resources; list tools are for discovery and exploration only.
Scoring workflow for Job (.job) and JobDef (.jobdef) model types. Use when the model suffix is .job or .jobdef. Handles both inline scenario scoring and table row scoring.
Scoring workflow for MAS (Micro Analytic Score) and SCR (Score Code Runtime) models. Use when the model type is .mas or .scr, or when no suffix is given (default is MAS). Handles both inline scenario scoring and table row scoring.
List SAS Viya libraries. Calls sas-score-list-libraries with the appropriate server parameter. Use only when the user explicitly wants to browse or enumerate libraries, not to verify a specific library exists. User must specify server (CAS or SAS) in their request to trigger this skill;
List MAS models, Jobs, or JobDefs in SAS Viya. Routes to the correct list tool based on resource type. Use only when the user explicitly wants to browse or enumerate models, jobs, or jobdefs.
| name | read-strategy |
| description | Strategy for reading data from CAS or SAS tables. Determines which read tool to use (raw reads vs analytical queries). |
Step 1 and Step 2 are required for every read request. Step 2 must never run before Step 1 succeeds.
GATE:
Do not check for the existence of the library separately. Follow the workflow below. The sas-score-find-table tool will check for the existence of the table in the specified library and server, which implicitly verifies the library as well.
sas-score-find-table({ lib, name: table, server: "cas" })
lib = lib as given, confirmed server = "cas" → go to Step 2sas-score-find-table({ lib: lib.toUpperCase(), name: table, server: "sas" })
lib = uppercased lib, confirmed server = "sas" → go to Step 2Use the confirmed lib and server from Step 1. Never guess or default the server.
Use sas-score-read-table for all row reads, including filtered reads with a WHERE clause.
Use sas-score-sas-query only when the request requires SQL aggregation (COUNT, SUM, AVG, MIN, MAX), GROUP BY, JOIN, or computed columns. A WHERE clause alone is not a reason to use sas-query.
sas-score-read-table)When: raw rows, filtered rows, browsing — anything that is not an aggregation or join.
Parsing row count from user input:
| User says | start | limit |
|---|---|---|
| "first N rows/records" | 1 | N |
| "top N rows" | 1 | N |
| "N rows" / "N records" | 1 | N |
| "rows N to M" | N | M−N+1 |
| "starting from row N" | N | 10 |
| (not specified) | 1 | 10 |
"first" always means start at row 1 and return N rows. It is never a row offset.
Dotted format: "lib.table" → lib: "lib", table: "table" (split on first dot).
Parameters: lib, table, server (confirmed from Step 1 — required), start, limit, where
sas-score-sas-query)When: COUNT/SUM/AVG/MIN/MAX, GROUP BY, JOIN across tables, or computed columns.
NOT for: simple filtered reads — use read-table with where instead.
Parameters: table (as "lib.table"), query, sql
Does the request need aggregation (COUNT/SUM/AVG/GROUP BY) or a JOIN?
YES → sas-score-sas-query
NO → sas-score-read-table (pass filter in `where` parameter if needed)
Public.customers, Caslib.tableSASHELP.cars, LIBREF.table (uppercase libref)"x.y" → lib=x, table=y| Error | Action |
|---|---|
| Table not found | Verify with find-resources first |
| Empty result | Ask user to adjust WHERE clause |
| Column not found | Ask user to verify column name (case-sensitive) |