developer-tools
Bring SAS Language Expertise to Your AI Agents
Introducing the SAS skill for AI agents: write, review, debug .sas code with zero warnings.
Where this fits
You're a data engineer maintaining a legacy SAS pipeline. Your AI agent can draft Python or SQL, but when you ask it to fix a DATA step with RETAIN and first. logic, it produces code that throws WARNING: Variable in the log. The sas skill from SASjs fills that gap by embedding expert SAS language knowledge directly into your agent's toolset, so it can write, review, and debug .sas programs with confidence.
Why agents benefit
- Generate idiomatic SAS code — the skill covers DATA step, PROC SQL, macro language, formats, ODS, and common PROCs, so agents produce clean, framework-independent syntax.
- Enforce zero-warning output — it explicitly treats
WARNING:andERROR:as unacceptable, pushing agents to refine code until the log is clean. - Handle advanced patterns — from hash objects to
PROC TRANSPOSEandCONNECT TOpass-through, agents can tackle complex transformations without guessing. - Debug existing programs — the skill provides structured guidance for isolating issues in macro quoting,
BY-group processing, or ODS destination quirks. - Answer SAS language questions — agents can explain
%STRvs%NRSTRorINFILEoptions with precision, not generic AI waffle.
Practical scenarios
Generating a clean DATA step for data cleaning
Ask your agent to "write a DATA step that removes duplicates and keeps the last record per ID" — it responds with a PROC SORT and DATA step using last. logic, tested for zero warnings.
Debugging a PROC SQL pass-through join
Your agent can review a CONNECT TO block, spot missing QUERY options, and suggest a corrected SELECT with proper DBMS quoting — all without touching SASjs framework specifics.
Creating a custom format with PROC FORMAT
Request a picture format for displaying large numbers as $1.2M, and the agent writes a PROC FORMAT with PICTURE and DATA step validation, ensuring it runs without log noise.
Add it to your agent workflow
Install the skill with a single command:
npx skills add sasjs/skills --skill sas
Then prompt your agent like this:
Use the SAS skill to write a macro that filters a dataset by a date range and outputs a summary report via ODS PDF.
The agent will load the skill and produce production-ready SAS code, complete with log-clean guarantees.
Compare before adopting
Before committing, compare against other SAS-related skills or general coding skills. Check the GitHub repo for recent commits — sasjs/skills is actively maintained. Look at the skill's scope: it explicitly excludes SASjs framework content, so it's pure language expertise. Also verify it fits your workflow: if you use SAS Viya or SASjs, this skill complements those, not replaces them.
Why it is worth tracking
With 2 stars, this is early-stage but backed by SASjs, a well-known open-source SAS tooling vendor. The skill's strict no-warning policy is a strong quality signal for production code. Track it if you regularly work with SAS and want your agents to handle legacy codebases or generate new programs. As the skill gains community feedback and updates, it could become a standard for SAS agent workflows. For more details, see the skill page on OpenAgentSkill.
Featured Skill
sas
Skill by sasjs