# Calculate Math Expressions Quickly

Manual arithmetic checks slow agents when users need quick numeric answers. This skill evaluates basic math expressions and returns concise results.

## Install

```bash
npx skillstore add ai creator/decalogue-calculator
```

## Metadata

- Status: approved
- Slug: decalogue-calculator
- Version: 1.0.0
- Author version: 1.0.0
- Skillstore revision: r1
- Version status: valid
- Tree hash: 77ec1dcc0efe9fa383706c702f34438d44933bd5ab7c32ad85057d577ba94e66
- Author: AI Creator
- GitHub username: Decalogue
- License: MIT
- Repository: https://github.com/Decalogue/creator/tree/main/src/skills/calculator
- Ref: 26421118b848d9f1efc0aa169d8a7a9e7e0a877e
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: scripts, external\_commands
- Quality score: 80
- Quality tier: silver
- Public page: https://skillstore.pages.dev/skills/decalogue-calculator
- Manifest: https://skillstore.pages.dev/api/skills/decalogue-calculator/manifest

## Capabilities

- Evaluates addition, subtraction, multiplication, division, and parentheses.
- Supports exponent notation with \*\* and ^ operators.
- Returns clear errors for division by zero.
- Rejects expressions that contain unsupported characters.
- Includes documented examples for common arithmetic operations.

## Use Cases

- Check classroom arithmetic: Solve basic expressions and show the result for homework review or study support.
- Verify product calculations: Confirm simple totals, ratios, and formulas during planning work.
- Test agent math responses: Compare an assistant response with a deterministic calculation for common arithmetic prompts.

## Prompt Templates

### Calculate a basic expression

```
Use the calculator skill to solve 2 + 3 * 4. Explain the order of operations briefly.
```

### Use parentheses

```
Calculate (5 + 3) * 2 with the calculator skill. Return the final value and one short explanation.
```

### Compare two formulas

```
Calculate 10 * 5 + 20 and 100 / 4 - 10. Tell me which result is larger.
```

### Review a complex expression

```
Verify (18.5 + 6.5) / 5 + 2^3. Report the final value and any calculation errors.
```

## Limitations

- Does not support variables, named constants, or functions.
- Does not include advanced math operations such as trigonometry.
- Uses Python eval internally and should be hardened before publication.
- Has no built-in timeout or expression length limit.

## Best Practices

- Keep expressions short and explicit.
- Use parentheses when operator precedence could be unclear.
- Review error messages before trusting a failed calculation.

## Anti Patterns

- Do not submit formulas with variables, functions, or named constants.
- Do not use this skill for safety-critical decisions without independent verification.
- Do not expose the current implementation to untrusted public input.

## Security Audit

- Audited at: 2026-07-09T15:33:48.511\+00:00
- Summary: The eval finding in calculator.py is confirmed because caller-provided expressions reach Python eval after only a regex whitelist. The SKILL.md findings are false positives caused by Markdown inline code, fenced examples, and file names. No evidence found for prompt injection, data exfiltration, network use, or malicious prose.

## Stats

- Views: 223
- Downloads: 12
- Favorites: 0
- Popularity score: 0
