Agent skill

Sasjs Core

by sasjs in sasjs/core

Standards and conventions for the @sasjs/core SAS macro library (mf, mp, mm, ms, mv macros).

MITAuto-check passedDevelopment

Install Sasjs Core

skills CLI
$ npx skills add sasjs/core --skill sasjs-core -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sasjs/core sasjs-core --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sasjs/core.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/sasjs-core .claude/skills/sasjs-core && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sasjs-core
GitHub stars
132
Token cost
~1.2k tokens
SKILL.md length
536 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Standards and conventions for the @sasjs/core SAS macro library (mf, mp, mm, ms, mv macros).

  • Editing SAS macros in a sasjs/core-style repo
  • SKILL.md covers Coding standards (mandatory), Folder / prefix conventions, Reuse before writing and Aborting safely, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Picking an existing macro over reinventing one

What it does

Sasjs Core is an agent skill from sasjs/core. Standards and conventions for the @sasjs/core SAS macro library (mf, mp, mm, ms, mv macros). Use when writing or editing SAS macros in a sasjs/core-style repo, picking an existing macro over reinventing one, or the sasjs/core build, lint, doxygen, and testing conventions.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Linting and formatting. The repository describes itself as: Macros for SAS® App Developers. The licence is MIT.

When your agent uses it

  • Editing SAS macros in a sasjs/core-style repo
  • Picking an existing macro over reinventing one
  • The sasjs/core build
  • Testing conventions

Example prompts

  • “Use the sasjs-core skill to standard and conventions for the @sasjs/core SAS macro library (mf, mp, mm, ms, mv macros)”
  • “/sasjs-core”

What it can do on your machine

Read from SKILL.md and the folder at commit b13a83f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are sas).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sasjs Core loads about 1.2k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 536 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sasjs/core at commit b13a83f, republished under its MIT licence (© sasjs). 536 words, ~1,223 tokens.

Download SKILL.mdSave it as .claude/skills/sasjs-core/SKILL.md (or your agent's skills folder).
name
sasjs-core
description
Standards and conventions for the @sasjs/core SAS macro library (mf_*, mp_*, mm*, ms_*, mv_* macros). Use when writing or editing SAS macros in a sasjs/core-style repo, picking an existing macro over reinventing one, or the sasjs/core build, lint, doxygen, and testing conventions.

@sasjs/core - SAS Macro Library

@sasjs/core is an MIT-licensed library of production-quality SAS macros for SAS application development, portable across SAS 9 (meta), Viya, and SASjs server.

Coding standards (mandatory)

  • One macro per file; filename must match the macro name (lowercase, no spaces)
  • Macro definitions must use parentheses: %macro x(); not %macro x;
  • Macro calls are NOT terminated with a semicolon: %my_macro() not %my_macro();
  • All macro variables must be declared %local to prevent scope leakage
  • Always use mf_getuniquefileref when assigning filerefs, and mf_getuniquelibref when assigning librefs (never hardcode or hand-roll unique references)
  • 2-space indentation, no tabs, no trailing spaces, no invisible characters, max line length 300 (hard lint limit) but keep lines to 80 chars max where possible
  • Every file must have a Doxygen header:
sas
/**
  @file
  @brief One-line description of the macro

  <h4> SAS Macros </h4>
  @li mf_othermacro.sas

  @param [in] paramname Description
  @param [out] outparam Description

  <h4> Related Macros </h4>
  @li mp_related.sas

  @version 9.4
  @author Your Name
**/

Folder / prefix conventions

FolderPrefixPlatform
base/mf_ (function-style), mp_ (procedure-style)All platforms
meta/mm_SAS 9 metadata
metax/mmx_SAS 9 metadata (OS command dependent)
viya/mv_Viya
server/ms_SASjs server
xplatform/mx_Runtime platform detection
fcmp/, lua/, ddl/-PROC FCMP functions, LUA wrappers, DDL

Use mf_ macros when the macro returns a value usable in an expression; use mp_ for procedural macros that generate code/statements.

Cross-suite rule: mp_ macros must never reference mx_ macros. Platform dispatching (SAS 9 / Viya / SASjs server) belongs in the mx_ suite, which delegates to ms_/mv_/PROC STP per platform. If an mp_ macro seems to need platform-specific behaviour, the macro itself belongs in xplatform/ as an mx_ macro instead.

Reuse before writing

Before writing a new macro, check the library for an existing one - common utilities already exist, e.g. mp_abort (the deprecated mf_abort is retained for backwards compatibility - don't use it in new code), mf_existds, mf_existvar, mf_existfileref, mf_getuser, mp_jsonout (SAS datasets -> JSON for _webout), mp_ds2ddl, mp_hashdataset. Platform-specific variants exist under meta/, viya/, server/ and are selected at compile time by the CLI.

Show full SKILL.md (233 more words)Show less

Aborting safely

Never invoke %mp_abort from inside an %if/%else block - as a procedural macro, the macro processor can continue executing statements after it before the abort takes effect. Use the iftrue= condition parameter instead:

sas
%mp_abort(iftrue= (&syscc ne 0)
  ,mac=&_program
  ,msg=%str(Something went wrong)
)

When %mp_abort is called from within a %include block, SAS cannot exit cleanly (e.g. to _webout). Call %mp_abort(mode=INCLUDE) after the include (OUTSIDE any macro wrapper) - it checks work.mp_abort_errds for an abort status:

sas
%mp_abort(mode=INCLUDE)

Note: %includes inside macros should be performed with %mp_include() so the _SYSINCLUDEFILEDEVICE indicator is set and the abort dataset (work.mp_abort_errds) is passed back to the calling program.

Testing macros (mandatory conventions)

  • Always apply %mp_assertscope around the macro under test to catch scope leakage (macro variables must stay %local):
sas
%mp_assertscope(SNAPSHOT)
%mx_foo(args)
%mp_assertscope(COMPARE,
  desc=Test 1: mx_foo does not leak scope,
  outds=work.test_results
)
  • Assertions go to work.test_results via %mp_assert(iftrue=(...), desc=..., outds=work.test_results).

Lint and build

  • Run sasjs lint after every change; do not consider work done until it passes
  • NEVER bump the version in package.json (semantic-release handles it)
  • Do NOT edit generated files by hand: all.sas, mc_*.sas, the lua/ wrappers, and sasjsbuild/ outputs are produced by the CI build
  • Markdown files: never hard-wrap; one paragraph per line

Limitations

This skill is a static reference for the @sasjs/core macro library - it provides coding standards, prefix conventions, and testing guidance. It does not execute SAS code, run shell commands, access the filesystem, connect to databases, or make network requests. All code examples are illustrative and must be submitted to a SAS session by the user.

© sasjs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/sasjs-core of sasjs/core.

Open the folder on GitHubat commit b13a83f

Compare with similar skills

Sasjs Core next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sasjs Core compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sasjs Core this skillsasjs/core132—~1.2kAutomated safety check: PassMIT
Minimizing Ty Ecosystem Changesastral-sh/ruff50k—~4.6kAutomated safety check: PassMIT
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.3k—~2.2kAutomated safety check: PassMIT
Babysit PR To Pass CIsgl-project/sglang37k2 repos~3kAutomated safety check: PassApache-2.0
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
Summarise Ecosystem Resultsastral-sh/ruff50k—~2.2kAutomated safety check: PassMIT

Similar skills

  • Official

    A skill your agent uses when a user says "minimize this ty ecosystem change", "reproduce this ecosystem result", "investigate a primer difference", "investigate a mypyprimer difference"…

    50k GitHub stars~4.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.3k GitHub stars~2.2k tokensUpdated 29 days ago
    DevelopmentAuto-check passed
  • Babysit PR To Pass CI

    sgl-project/sglang

    Start and persistently pursue a goal to babysit an SGLang pull request until selected GitHub Actions workflows pass on the latest PR head.

    37k GitHub starsUsed in 2 repos~3k tokens
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when a user says "summarise ecosystem results", "summarize this ty ecosystem report", "what changed in this ecosystem run?", or asks to summarise or summarize ty ecosystem…

    50k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated 4 days ago
    DevelopmentAuto-check passed

More from sasjs/core

  • Sas

    sasjs/core

    Expert guidance for the SAS programming language - DATA step, PROC SQL, macro language, formats, ODS, and common procedures.

    132 GitHub stars~3.1k tokensUpdated 4 days ago
    Auto-check passed
  • Sasjs Adapter

    sasjs/core

    Frontend/Node integration with SAS backends using @sasjs/adapter - configuring the SASjs class, the exact request() inputs and response shape, authentication, file upload, and session management.

    132 GitHub stars~2.6k tokensUpdated 4 days ago
    Auto-check passed
  • Sasjs CLI

    sasjs/core

    Using the SASjs CLI (@sasjs/cli) to create, compile, build, deploy, run, and test SASjs projects against SAS 9, Viya, and SASjs server targets.

    132 GitHub stars~3.6k tokensUpdated 4 days ago
    Auto-check: notes
  • Sasjs Framework

    sasjs/core

    Building full SASjs applications - project structure, sasjsconfig.json, services/jobs/macros folders, multi-target (SAS 9 / Viya / SASjs server) configuration, streaming frontends, mocks and tests.

    132 GitHub stars~2.4k tokensUpdated 4 days ago
    Auto-check passed
  • Sasjs Server

    sasjs/core

    Installing, configuring, and running @sasjs/server - the open-source NodeJS wrapper around the SAS binary that provides a REST API, filesystem (SASjs Drive), Stored Program execution, and web app…

    132 GitHub stars~2.4k tokensUpdated 4 days ago
    Auto-check: notes

Categories

Questions about Sasjs Core

What does Sasjs Core do?

Standards and conventions for the @sasjs/core SAS macro library (mf, mp, mm, ms, mv macros). Sasjs Core is an agent skill from sasjs/core. Standards and conventions for the @sasjs/core SAS macro library (mf, mp, mm, ms, mv macros).

When should I use Sasjs Core?

Sasjs Core fits situations like: editing SAS macros in a sasjs/core-style repo; picking an existing macro over reinventing one; the sasjs/core build; testing conventions.

How do I install Sasjs Core in Claude Code?

Run `npx skills add sasjs/core --skill sasjs-core -a claude-code`. Or copy the skill folder (.agents/skills/sasjs-core in sasjs/core) into .claude/skills/sasjs-core in your project. Claude Code loads it when a task matches its description.

How do I install Sasjs Core in Codex?

Run `npx skills add sasjs/core --skill sasjs-core -a codex`. Or copy the skill folder (.agents/skills/sasjs-core in sasjs/core) into .agents/skills/sasjs-core in your project. Codex loads it when a task matches its description.

Can I use Sasjs Core in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sasjs/core --skill sasjs-core -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sasjs-core, .gemini/skills/sasjs-core, .github/skills/sasjs-core and .opencode/skills/sasjs-core in your project.

What does Sasjs Core need to run?

SKILL.md names no scripts, command-line tools or credentials: Sasjs Core is instructions for the agent only.

Does Sasjs Core access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sasjs Core safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sasjs Core use?

Sasjs Core is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sasjs Core use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sasjs Core?

Skills that share tags, products or a category with Sasjs Core: Minimizing Ty Ecosystem Changes (astral-sh/ruff, 50k stars), Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.3k stars), Babysit PR To Pass CI (sgl-project/sglang, 37k stars) and Rust Best Practices (farm-fe/farm, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sasjs Core?

sasjs (a GitHub organization) maintains it in sasjs/core, which has 132 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 5, 2026.

Source: sasjs/core on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.