# Calculations toolkit

> Calculations toolkit is an open-source agent skill for enterprise it. Guides an agent through building, debugging and managing LeanIX calculated fields. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/SAP/leanix-ai-plugins/tree/main/skills/calculations-toolkit
- **Repository:** https://github.com/sap/leanix-ai-plugins
- **GitHub stars:** 12
- **License:** Apache-2.0
- **Skill name:** calculations-toolkit
- **Collection:** https://github.com/SAP/leanix-ai-plugins
- **Categories:** [enterprise it](https://ai-powered.com/categories/enterprise-it)
- **Listing updated:** 2026-12-03

## About

This skill helps an agent work with LeanIX Calculations, which fill computed fields on fact sheets from their own data or from related fact sheets through relations. It covers creating new calculations, diagnosing failing ones, explaining what calculations can do, and reviewing or managing the calculations already in a workspace.

The workflow has the agent first discover the workspace data model through the LeanIX GraphQL schema, then validate field and relation names, write synchronous JavaScript with an exported main function, test-run the code against sample fact sheets, and only then create the calculation. It also gives guidance on common error patterns, such as async code, imports or wrong data access paths, and on reading execution logs to trace what a calculation wrote.

Using the skill requires the LeanIX MCP server with the calculations toolset enabled. Calculations are written in JavaScript and run inside LeanIX, not in the agent's environment.

## When your agent uses it

> Build, debug, and create LeanIX Calculations — populate computed fields from other fields and relations. Use when creating new calculations, debugging errors, understanding calculation capabilities, managing workspace calculations, or analyzing existing calculations. Covers target field types, field access patterns, relation data, templates, error patterns, and best practices.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs JavaScript scripts](https://github.com/SAP/leanix-ai-plugins/tree/HEAD/skills/calculations-toolkit)
- [Asks for: Read, Write, Edit, AskUserQuestion, mcp__leanix__list_calculations, mcp__leanix__get_calculation, mcp__leanix__create_calculation, mcp__leanix__update_calculation…](https://github.com/SAP/leanix-ai-plugins/blob/HEAD/skills/calculations-toolkit/SKILL.md)
- [No network calls found in its scripts](https://github.com/SAP/leanix-ai-plugins/tree/HEAD/skills/calculations-toolkit)
- [License: Apache-2.0](https://github.com/SAP/leanix-ai-plugins/tree/HEAD/skills/calculations-toolkit)

## Features

- **Workspace data model discovery:** Looks up fact sheet types, fields, relations and enum values from the live GraphQL schema before writing any code.
- **Calculation code generation:** Produces synchronous JavaScript templates for counting, summing, averaging, date differences and conditional logic.
- **Test run before creation:** Runs candidate code against a sample fact sheet or relation to check the result before saving the calculation.
- **Error diagnosis:** Checks code for disallowed patterns such as async, fetch and imports, and maps common error counts to likely causes.
- **Execution log review:** Lists and inspects past calculation runs to see the code, input data and value written for a fact sheet.
- **Workspace calculation audit:** Reviews existing calculations for missing owners, empty descriptions, errors and inactive status.

## Good for

- Create a calculation that counts how many applications relate to a business capability
- Debug a calculation that shows a configuration error after a field was renamed
- Calculate days until a contract end date and store it in a custom field
- Audit all workspace calculations for errors and missing owners
- Trace why a specific fact sheet shows an unexpected calculated value

## Install

### Claude Code

This skill ships in the `sap-leanix` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add SAP/leanix-ai-plugins
/plugin install sap-leanix@leanix-ai-plugins
```

Or copy only this skill to `~/.claude/skills/calculations-toolkit`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SAP/leanix-ai-plugins.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/calculations-toolkit &&
cp -R "$tmp/skills/calculations-toolkit" ~/.claude/skills/calculations-toolkit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/calculations-toolkit` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/calculations-toolkit` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SAP/leanix-ai-plugins.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/calculations-toolkit &&
cp -R "$tmp/skills/calculations-toolkit" ~/.agents/skills/calculations-toolkit &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/calculations-toolkit` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/calculations-toolkit` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SAP/leanix-ai-plugins.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/calculations-toolkit &&
cp -R "$tmp/skills/calculations-toolkit" ~/.cursor/skills/calculations-toolkit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/calculations-toolkit` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/SAP/leanix-ai-plugins.git --path skills/calculations-toolkit
```

Or copy the folder to `~/.gemini/skills/calculations-toolkit` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/calculations-toolkit`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SAP/leanix-ai-plugins.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/calculations-toolkit &&
cp -R "$tmp/skills/calculations-toolkit" ~/.copilot/skills/calculations-toolkit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/calculations-toolkit` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/SAP/leanix-ai-plugins.git
```

Then copy `leanix-ai-plugins/skills/calculations-toolkit` into your agent's skills folder as `calculations-toolkit`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does the skill need any setup?

It requires the LeanIX MCP server with the calculations toolset enabled. Authentication is handled by the MCP server through /mcp, not by the skill.

### Can calculations make API calls or use imports?

No. The skill's guidance states that calculation code cannot use async, await, fetch or imports, and it must return a single value.

### Are new calculations active immediately?

No. The skill creates them as inactive and asks whether to enable them afterwards, since source fields are only read once a calculation is enabled.

### Which languages does the skill use?

The skill's bundled scripts are JavaScript, and the calculation code it writes is JavaScript that runs inside LeanIX.

### How do I install Calculations toolkit in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/calculations-toolkit to use it in all your projects, or to .claude/skills/calculations-toolkit in one project. Or install the sap-leanix plugin, which includes it: /plugin marketplace add SAP/leanix-ai-plugins, then /plugin install sap-leanix@leanix-ai-plugins.

### Does Calculations toolkit run scripts?

Yes. It runs JavaScript scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Calculations toolkit?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Fact sheet search](https://ai-powered.com/skills/fact-sheet-search): Fact sheet search is an open-source agent skill for enterprise it.

---
Source: https://ai-powered.com/skills/calculations-toolkit
