input-arithmetic-safety

input-arithmetic-safety is a skill for Claude Code from quillai-network/quillshield_skills. It costs 95 tokens per session (3,050 once invoked), scanned A, original, MIT.

A smart-contract security review for finding unsafe user inputs and arithmetic mistakes. It checks missing zero-value validation, precision loss, rounding problems, unsafe integer conversions, and related Solidity edge cases.

In plain words
What is it for?
Use it when reviewing public functions, financial calculations, vaults, staking contracts, token minting, burning, or code inside unchecked blocks.
Why use it?
It helps find bugs that can miscalculate amounts or let attackers exploit vault, staking, token, or distribution logic, even when Solidity's usual overflow checks are enabled.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the input-arithmetic-safety plugin — 1 skill shipped together

Good fit Use it when reviewing public functions, financial calculations, vaults, staking contracts, token minting, burning, or code inside unchecked blocks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/quillai-network/quillshield_skills/input-arithmetic-safety
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add quillai-network/quillshield_skills --skill input-arithmetic-safety
Clone the repo
git clone --depth 1 https://github.com/quillai-network/quillshield_skills

Made for: Claude Code.

Or install input-arithmetic-safety, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for input-arithmetic-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/quillai-network/quillshield_skills/input-arithmetic-safety/github.svg)](https://agentmods.dev/skills/quillai-network/quillshield_skills/input-arithmetic-safety)
Your own site
<a href="https://agentmods.dev/skills/quillai-network/quillshield_skills/input-arithmetic-safety"><img src="https://agentmods.dev/badge/skills/quillai-network/quillshield_skills/input-arithmetic-safety/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for input-arithmetic-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/quillai-network/quillshield_skills/input-arithmetic-safety"><img src="https://agentmods.dev/badge/skills/quillai-network/quillshield_skills/input-arithmetic-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,050 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00095 $0.03050
Opus 5 $0.00048 $0.01525
Sonnet 5 $0.00019 $0.00610
Haiku 4.5 $0.00010 $0.00305

Measured 10d ago against content hash 52fb35313ea9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

input-arithmetic-safety scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/input-arithmetic-safety/skills/input-arithmetic-safety/SKILL.md · 350 lines

How it starts

The opening of the file, as written. The whole thing — 350 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Input & Arithmetic Safety

Detect input validation failures (the #1 direct exploitation cause at 34.6% of all contract exploits) and arithmetic vulnerabilities that persist even with Solidity 0.8+ checked math — precision loss, rounding exploitation, unsafe casting, and share price manipulation.

When to Use

  • Auditing any contract with public/external functions accepting user-supplied parameters
  • Reviewing DeFi protocols with fee calculations, share pricing, or exchange rates
  • Analyzing vault/staking contracts for rounding or first-depositor attacks
  • Checking contracts with unchecked blocks for overflow/underflow risks
  • Verifying arithmetic in token minting, burning, and distribution logic

When NOT to Use

  • Access control analysis (use semantic-guard-analysis)
  • Reentrancy detection (use reentrancy-pattern-analysis)
  • Full multi-dimensional audit (use behavioral-state-analysis)

Part 1: Input Validation Analysis

Critical Missing Validations

Zero Address Check:

// VULNERABLE: No zero address check
function setAdmin(address newAdmin) external onlyOwner {
    admin = newAdmin; // Can set admin to address(0) — locking out admin forever
}

// SAFE
function setAdmin(address newAdmin) external onlyOwner {
    require(newAdmin != address(0), "Zero address");
    admin = newAdmin;
}

Zero Amount Check:

// VULNERABLE: Allows zero-amount operations
function deposit(uint256 amount) external {
    balances[msg.sender] += amount;
    emit Deposit(msg.sender, amount);
    // Zero deposit: wastes gas, pollutes events, may affect accounting
}

// SAFE
function deposit(uint256 amount) external {
    require(amount > 0, "Zero amount");
    balances[msg.sender] += amount;
}

Array Length Validation:

// VULNERABLE: No length check
function batchTransfer(address[] calldata recipients, uint256[] calldata amounts) external {
    for (uint i = 0; i < recipients.length; i++) {
        transfer(recipients[i], amounts[i]); // Out-of-bounds if arrays differ in length
    }
}

// SAFE
function batchTransfer(address[] calldata recipients, uint256[] calldata amounts) external {
    require(recipients.length == amounts.length, "Length mismatch");
    require(recipients.length <= MAX_BATCH_SIZE, "Batch too large");
    // ...
}

Read the full file on GitHub · 350 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 350 lines · 95 tokens per session scan A 52fb35313ea9

Subscribe to this mod's changes

input-arithmetic-safety is a skill published in the GitHub repository quillai-network/quillshield_skills (121 stars, last pushed 5mo ago), licensed MIT. It adds 95 tokens to every session and 3,050 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ansem-crypto

Use when evaluating crypto narratives, attention rotation, memecoin cycles, Solana-style ecosystem momentum, social distribution, and reflexive retail flows in an Ansem-style crypto market framework.

questflowai/investorskills · 41 tokens

arthur-hayes-liquidity

Use when evaluating crypto markets through an Arthur Hayes-style liquidity lens: dollar liquidity, funding, risk appetite, cycle psychology, and macro-driven crypto positioning.

questflowai/investorskills · 38 tokens

cobie-cycle-filter

Use when evaluating crypto decisions through a Cobie-style cycle filter: common-sense risk, narrative traps, leverage humility, and avoiding obvious stupid trades.

questflowai/investorskills · 35 tokens

cryptocred-structure

Use when evaluating crypto charts through a CryptoCred-style structure lens: levels, confluence, market structure, risk definition, and educational technical process.

questflowai/investorskills · 35 tokens

willy-woo-onchain

Use when evaluating Bitcoin and crypto cycles through a Willy Woo-style on-chain lens: holder behavior, realized value, supply dynamics, and on-chain demand.

questflowai/investorskills · 37 tokens

prompt-proximity-architecture

Turn an approved measurement charter, ICPs, and buyer jobs into a budget-aware prompt coverage blueprint across proximity bands, aided status, information acts, journey states, roles, locales, evidence grades, partitions, and measurement lanes. Use before prompt wording to define required, optional, and prohibited…

elvisun/newsjack · 67 tokens