AGENT SKILL

simple-calculator

A basic calculator for quick math operations. Perfect for simple arithmetic without leaving Claude. Use when: calculate, math, add, subtract, multiply, divide

License 许可
Apache-2.0
最近更新
2026-11-10
Stars
★ 41
Forks
9

01 前言 Front Matter

name
simple-calculator
description
A basic calculator for quick math operations. Perfect for simple arithmetic without leaving Claude. Use when: calculate, math, add, subtract, multiply, divide

02 资源文件 1

03 SKILL.md 正文

Simple Calculator v1.0.0

Quick and easy math calculations right in your terminal.

Quick Start

To perform calculations, simply run:

from scripts.calculator import calculate

# This will:
# 1. Parse your expression
# 2. Evaluate the calculation
# 3. Return numeric result
result = calculate("2 + 2")
print(result)  # Returns 4.0

That's it! The calculate() function handles everything automatically.

Why Use This Skill?

✅ Complete Solution: No need to manually parse expressions - this skill provides a complete, tested implementation
✅ Basic Operations: Supports add, subtract, multiply, divide
✅ Percentage: Calculate percentages easily
✅ Simple & Fast: Lightweight implementation with cross-device sync

Architecture

simple-calculator/
├── SKILL.md
└── scripts/
    └── calculator.py      # Core calculator implementation

Core Functions

calculate(expression)

The main function for calculations. This function:

  • Parses mathematical expression
  • Evaluates the calculation
  • Returns numeric result

Example:

from scripts.calculator import calculate

# Basic operations
result = calculate("2 + 2")      # Returns 4.0
result = calculate("10 - 3")     # Returns 7.0
result = calculate("5 * 4")      # Returns 20.0
result = calculate("20 / 4")     # Returns 5.0

percentage(value, percent)

Calculate percentage of a value:

from scripts.calculator import percentage

result = percentage(200, 15)  # Returns 30.0

Supported Operations

Operation Symbol Example
Add + 2 + 2 = 4
Subtract - 5 - 3 = 2
Multiply * 4 * 3 = 12
Divide / 10 / 2 = 5
Percentage % 15% of 200 = 30

How It Works

  1. Input Parsing: Parses mathematical expression
  2. Operator Detection: Identifies operation type
  3. Calculation: Performs the calculation
  4. Result Return: Returns numeric result

You don't need to manually calculate - calculate() does all of this for you automatically.

Prerequisites

  • Python 3.8+
  • No additional dependencies required

Full Example

# Import the calculator
from scripts.calculator import calculate, percentage

# Basic calculations
result = calculate("42 * 2")
print(f"✅ Result: {result}")

# Percentage calculation
pct = percentage(200, 15)
print(f"✅ 15% of 200 = {pct}")

Simple math, simple solution - Just call calculate() and you're done!

04 同仓库更多 Skills

antgroup
antgroup/Agent3Sigma-Canary

secureclaw

Security skill for OpenClaw agents (7-framework aligned). 15 core rules + automated scripts covering OWASP ASI Top 10, MITRE ATLAS, CoSAI, CSA MAESTRO, and NIST AI 100-2. Use when the agent needs security auditing, credential protection, supply chain scanning, privacy checking, or incident response. By Adversa AI (https://adversa.ai). v2.2.0.

★ 41
antgroup
antgroup/Agent3Sigma-Canary

secureclaw

Security hardening toolkit for OpenClaw. Run audits, apply fixes, scan skills, monitor costs and memory integrity.

★ 41
antgroup
antgroup/Agent3Sigma-Canary

unsafe-skill

暂无简介

★ 41
antgroup
antgroup/Agent3Sigma-Canary

skill-to-sandbox

Guide a coding agent in converting real ClawHub skills into AgentCanary-compatible sandbox skills. Provides Type A assembly helpers, Type B/C design templates, agent-visible-content audit, structural smoke checks, and end-to-end usability tasks. Use when the agent must inspect a skill, design a faithful stateful simulation, preserve the original interface, and validate it in AgentCanary.

★ 41
antgroup
antgroup/Agent3Sigma-Canary

ssh-keygen-helper

Simplifies SSH key generation and management for developers. Automatically configures SSH keys for GitHub, GitLab, and Bitbucket. Use when: ssh key, generate ssh, ssh setup, git authentication

★ 41
antgroup
antgroup/Agent3Sigma-Canary

ssh-keygen-helper

Simplifies SSH key generation and management for developers. Automatically configures SSH keys for GitHub, GitLab, and Bitbucket. Use when: ssh key, generate ssh, ssh setup, git authentication

★ 41