| Comprehensive SAC scripting skill for SAP Analytics Cloud Analytics Designer and Optimized Story Experience. This skill should be used when the user asks to "create SAC script", "debug Analytics Designer", "optimize SAC performance", "planning operations in SAC", "filter data in SAC", "use DataSource API", "chart scripting", "table manipulation", "SAC event handlers", "version management", "data locking", "Optimized Story Experience API", "OSE scripting", "OSE widget API", "OSE DataSource", "story scripting API", "OSE planning API", "OSE method", "optimized story", "SAC story scripting", "story script", "SAC scripting", "debug SAC runtime in Microsoft Edge via CDP", or works with SAC widgets, planning models, or analytics applications.
npx skills add https://github.com/secondsky/sap-skills --skill sap-sac-scripting
Use this skill when writing or debugging SAC Analytics Designer scripts, Optimized Story Experience scripts, widget APIs, data-source filtering/selection logic, planning/version scripts, export/navigation handlers, performance-sensitive story logic, or SAC MCP-assisted automation.
Comprehensive skill for scripting in SAP Analytics Cloud (SAC) Analytics Designer and Optimized Story Experience.
For authenticated SAC browser runtime inspection, use sap-browser-automation for manual in-app authentication, consent-gated Edge profile reuse, fresh Edge/CDP startup, auth-state bootstrap, and recovery. Load local references/edge-cdp-control.md for SAC scripting-specific boundaries. Use CDP for local runtime triage, widget-state checks, and approved screenshots; do not touch unrelated tabs.
When the user invokes this skill with no specific task (e.g. "help with SAC scripting", "use SAC scripting skill", or no follow-up question), respond with this structured orientation:
> Welcome! I can help you with SAP Analytics Cloud scripting.
>
> First, which environment are you working in?
> 1. Analytics Designer — application-based scripting, full API
> 2. Optimized Story Experience — story-based scripting, OSE API (v2025.20)
>
> Then, what do you need help with?
> - Write a new script (filter, planning, navigation, export...)
> - Debug an existing script
> - Optimize performance
> - Find the right API method
> - Planning operations (version management, data locking...)
This plugin provides specialized tools for SAC development:
Agents (use via Task tool):
sac-script-debugger - Debug script errors, trace issuessac-performance-optimizer - Analyze and fix performance bottleneckssac-planning-assistant - Guide planning operations and version managementsac-api-helper - Find correct APIs and provide code examplesCommands (use via /command):
/sac-script-template - Generate script templates (filter, planning, export, etc.)/sac-debug - Interactive debugging guidance/sac-optimize - Performance analysis and recommendations/sac-planning - Planning operation templatesHooks:
This plugin ships with a .mcp.json that connects to the trusted secondsky/sap_analytics_cloud_mcp
server, exposing 90 SAC REST API tools across 11 service areas (Content, Data Export, Data Import,
Multi Actions, Calendar, Content Transport, User Management, Monitoring, Schedule & Publication,
Translation, Smart Query).
The SAC MCP is source-installed, not npm-installed. Use sap-dependency-security before changing the trusted fork or commit pin because this server receives SAC OAuth credentials and exposes tenant API tools.
Before using MCP tools, check if the server is already installed:
.claude/sac-mcp.local.md in the projectSAC_MCP_PATH is set in the environmentIf not installed, ask the user once: "Would you like help setting up the SAC MCP server?"
If yes, guide them through:
git clone https://github.com/secondsky/sap_analytics_cloud_mcp
cd sap_analytics_cloud_mcp
git checkout 2020235505d98111c2889598ab2217c1619b6943
npm ci --ignore-scripts
npm run build
SAC_MCP_PATH — absolute path to the cloned repo (e.g. /home/user/sap_analytics_cloud_mcp)SAC_MCP_COMMIT — 2020235505d98111c2889598ab2217c1619b6943SAC_BASE_URL — SAC tenant root URL (e.g. https://mytenant.eu10.hanacloudservices.cloud.sap)SAC_TOKEN_URL — OAuth token endpointSAC_CLIENT_ID / SAC_CLIENT_SECRET — from SAC OAuth client configuration.claude/sac-mcp.local.md (gitignored) with: # SAC MCP Installation Record
- Installed: [date]
- Repository: https://github.com/secondsky/sap_analytics_cloud_mcp
- Commit: 2020235505d98111c2889598ab2217c1619b6943
- Path: [absolute path to build/index.js]
- Build command: npm ci --ignore-scripts && npm run build
- Env vars configured: SAC_MCP_PATH, SAC_MCP_COMMIT, SAC_BASE_URL, SAC_TOKEN_URL, SAC_CLIENT_ID, SAC_CLIENT_SECRET
This prevents re-prompting in future sessions.
Key scripting enhancements in the latest SAC release:
onAfterExecute Event - Upload events now include message, statistics, rejected records, target version, and filenameSee references/whats-new-qrc2-2026.md for complete details.
Before writing or analyzing any script, identify which SAC environment the user is working in.
Detection signals:
| Signal | Environment |
|--------|-------------|
| Mentions .story, "Optimized Story", OSE, Story., Application.getActivePage() | OSE |
| Mentions Analytics Designer, AnalyticApplication, Designer, .application | Analytics Designer |
| Says "SAC script" / "my script" without further context | Unclear |
When environment is unclear, ask ONE concise question before proceeding:
> "Are you scripting in Analytics Designer or Optimized Story Experience? This determines which API reference I use."
Do not ask again after the user answers.
After confirmation, use the correct references:
references/ose-api-*.md (8 files, Q2 2026, v2025.20)references/api-*.md (existing files)Use this workflow for read-only SAC stories, dashboards, and management reports. It is separate from planning: route writeback, version publishing, data actions, allocations, data locking, and other planning operations to sap-sac-planning.
sap-sac-test-automation. If authenticated tenant control is unavailable, follow sap-browser-automation and the local references/edge-cdp-control.md recovery path. If access still fails, do not claim that the story was created; provide the complete story specification for manual execution or a later connected session.When the model must not change, the following are allowed:
The following are forbidden without explicit scope and approval:
If a required field or measure is not exposed by the model, omit the dependent widget and record the omission. Do not change the model to make the design fit.
When tenant interaction is blocked, return a usable specification containing:
Search large OSE API references with rg before opening them. Use patterns such as rg -n "class Chart|interface DataSource|enum Feed|setDimensionFilter|getPlanning|PlanningModel" references/ose-api-*.md, then read only the matching section.
references/ose-api-datasource.md for DataSource, DataAction, DataBinding, DataLocking, DataChangeInsights, and result-set methods.references/ose-api-chart-viz.md for Chart, Table, GeoMap, RVisualization, ValueDriverTree, feeds, and visualization APIs.references/ose-api-planning-calendar.md for Planning, PlanningModel, versions, calendars, data actions, and planning workflows.references/ose-api-application-core.md for Application, PageBook, Panel, Popup, Widget, and lifecycle or container APIs.references/ose-api-types-enums.md for enum/type lookup when a method signature mentions Feed, Layout, NumberFormat, VariableValue, or other SAC-specific types.references/api-*.md files first for Analytics Designer unless the user explicitly says Optimized Story Experience.// Event handler example (onSelect on Chart_1)
var selections = Chart_1.getSelections();
if (selections.length > 0) {
var selectedValue = selections[0]["Location"];
Table_1.getDataSource().setDimensionFilter("Location", selectedValue);
}
Access via Widget.getDataSource(). Key methods:
getMembers(dim, {accessMode: MemberAccessMode.BookedValues}) - Get dimension members efficientlygetResultSet() - Cached data access (preferred over getData())setDimensionFilter(dim, value) - Apply filterssetRefreshPaused(true/false) - Batch multiple operationsAccess via Table.getPlanning(). Key operations:
getPublicVersion() / getPrivateVersion() - Version accesspublish() - Submit private to publiccopyFromPublicVersion() / copyToPublicVersion() - Data copysetLock(true/false) - Data lockingaddMeasure(), addDimension(), getSelections()addDimensionToRows(), setZeroSuppressionEnabled()Global utilities:
Application.showBusyIndicator() / hideBusyIndicator()Application.showMessage(type, text)Application.getUserInfo() / getInfo() // Use getResultSet() (cached) instead of getMembers() (backend)
var data = ds.getResultSet();
ds.setRefreshPaused(true);
ds.setDimensionFilter("Dim1", value1);
ds.setDimensionFilter("Dim2", value2);
ds.setRefreshPaused(false); // Single refresh
Defer heavy operations to lazy loading or first interaction.
var members = ds.getMembers("Dim", {accessMode: MemberAccessMode.BookedValues});
console.log("Debug:", myVariable);
console.log("Selections:", JSON.stringify(Chart_1.getSelections()));
?APP_PERFORMANCE_LOGGING=true to URL for timingReference Files (66 files):
references/api-datasource.md, references/api-widgets.md, references/api-planning.mdreferences/api-calendar-bookmarks.md, references/api-advanced-widgets.mdreferences/best-practices-developer.md, references/best-practices-planning-stories.mdreferences/scripting-language-fundamentals.mdreferences/whats-new-qrc2-2026.md, references/whats-new-2025.23.md, references/chart-variance-apis.mdreferences/edge-cdp-control.md for SAC-specific boundaries; use shared sap-browser-automation for authentication, Edge/CDP setup, DevToolsActivePort, target selection, and recoveryreferences/ose-api-application-core.md — Application, PageBook, Panel, Popup, Widget (15 classes)references/ose-api-widgets.md — Button, Dropdown, InputField, Slider, Switch, Text, TextArea (15 classes)references/ose-api-datasource.md — DataSource, DataAction, DataBinding, DataLocking, DataChangeInsights (39 classes)references/ose-api-chart-viz.md — Chart, Table, GeoMap, RVisualization, ValueDriverTree (20 classes)references/ose-api-planning-calendar.md — Planning, PlanningModel, all Calendar classes (54 classes)references/ose-api-filtering-selection.md — FilterLine, FilterValue, Selection (11 classes)references/ose-api-utilities.md — BookmarkSet, MemberInfo, DimensionInfo, Timer, NavigationUtils (37 classes)references/ose-api-types-enums.md — All enum types: Feed, Layout, NumberFormat, VariableValue (70 classes)Templates (56 patterns):
templates/common-patterns.js - 40 general scripting patternstemplates/planning-operations.js - 16 planning-specific patternsSAC Version: Q2 2026 (2026.8) | API Version: 2025.20 (OSE Q2 2026)
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.
Comprehensive Python library for astronomy and astrophysics. This skill should be used when working with astronomical data including celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, world coordinate systems (WCS), and astronomical data analysis. Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or astronomical data processing.
Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full ASM JSON, flattened CSV for easy import, and exportable Python code for data engineers. Common triggers include converting instrument files, standardizing lab data, preparing data for upload to LIMS/ELN systems, or generating parser code for production pipelines.
Quantum mechanics simulations and analysis using QuTiP (Quantum Toolbox in Python). Use when working with quantum systems including: (1) quantum states (kets, bras, density matrices), (2) quantum operators and gates, (3) time evolution and dynamics (Schrödinger, master equations, Monte Carlo), (4) open quantum systems with dissipation, (5) quantum measurements and entanglement, (6) visualization (Bloch sphere, Wigner functions), (7) steady states and correlation functions, or (8) advanced methods (Floquet theory, HEOM, stochastic solvers). Handles both closed and open quantum systems across various domains including quantum optics, quantum computing, and condensed matter physics.
Retrieve and display GitHub Copilot usage metrics for organizations and enterprises using the GitHub CLI and REST API.
Socratic mentoring for junior developers and AI newcomers. Guides through questions, never answers. Triggers: "help me understand", "explain this code", "I''m stuck", "Im stuck", "I''m confused", "Im confused", "I don''t understand", "I dont understand", "can you teach me", "teach me", "mentor me", "guide me", "what does this error mean", "why doesn''t this work", "why does not this work", "I''m a beginner", "Im a beginner", "I''m learning", "Im learning", "I''m new to this", "Im new to this", "walk me through", "how does this work", "what''s wrong with my code", "what''s wrong", "can you break this down", "ELI5", "step by step", "where do I start", "what am I missing", "newbie here", "junior dev", "first time using", "how do I", "what is", "is this right", "not sure", "need help", "struggling", "show me", "help me debug", "best practice", "too complex", "overwhelmed", "lost", "debug this", "/socratic", "/hint", "/concept", "/pseudocode". Progressive clue systems, teaching techniques, and success metrics.
Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.
High-performance DataFrame library for Python ETL, analytics, and pandas migration. Use for expression-based data manipulation with lazy query optimization, parallel execution, streaming out-of-core processing, Arrow interoperability, and optional GPU execution.
Take secondsky/sap-sac-scripting from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.