Security logo

Security

Community
austintgriffith
security

Use when designing, implementing, or reviewing Solidity contracts that hold assets, account for shares or debt, read price oracles, verify signatures, integrate ERC-20s, or sit behind upgradeable proxies, and for a pre-deployment security review. Not for test-suite design (`/testing`) or a full audit report (`/audit`).

Overview

Publisheraustintgriffith
Repositoryethskills
Skill namesecurity
Stars
298
Forks
64
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by austintgriffith on GitHub. Read the source before you install it.

Installation

Install the Security AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/austintgriffith/ethskills/tree/master/security
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/austintgriffith/ethskills.git /tmp/ethskills
mkdir -p .claude/skills
cp -r /tmp/ethskills/security .claude/skills/security
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Security in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Security on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Security is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Smart Contract Security

Treat every external token, price, signature, callback, and privileged caller as adversarial. Prefer audited OpenZeppelin primitives over hand-rolled implementations, but verify the installed library version and the assumptions around each primitive.

Asset accounting

  • Keep units explicit. ERC-20 decimals and oracle decimals vary; normalize every quantity to one documented scale before comparing collateral, debt, fees, or shares. Multiply before dividing and use full-precision mulDiv where intermediate overflow or rounding matters.
  • For arbitrary ERC-20s, use SafeERC20.safeTransfer and safeTransferFrom. Credit deposits from the contract's balance delta, not the requested amount, or reject tokens whose received amount differs. Fee-on-transfer and rebasing tokens otherwise break custody accounting.
  • On OpenZeppelin Contracts v5, use SafeERC20.forceApprove when an allowance may already be nonzero. safeApprove was removed. Keep approvals exact or bounded and clear leftovers when practical.
  • Tokens can freeze, blocklist, or pause (USDC and USDT do). One blocked recipient makes a transfer revert, so a loop that pushes payments to many users bricks for all of them. Credit balances and let each user withdraw (pull payments).
  • Apply checks-effects-interactions and a reentrancy guard to value-moving entry points. Update shares, debt, and other accounting before external calls.

For a vault or receipt-token design, start from OpenZeppelin ERC4626. A hand-rolled vault must defend its empty state against first-depositor donation/inflation attacks with virtual assets and shares or another explicit mitigation. Test direct donations and rounding at small deposits; never use an unprotected assets * totalSupply / totalAssets conversion with a special 1:1 empty-vault path.

Prices and liquidations

Never use a DEX spot read (slot0, reserves, balances, or a current quote) for collateral, borrowing, minting, or liquidation decisions. Pool depth does not fix atomic manipulation: flash-borrowed capital can move the price, exploit the dependent action, unwind, and repay inside one transaction before arbitrage can intervene.

Use a manipulation-resistant push feed for high-value decisions, or a meaningful TWAP when its weaker guarantees fit the risk. For every feed:

  • require a positive answer;
  • validate updatedAt against a per-feed maximum age derived from that feed's published heartbeat plus a justified margin—never one global hardcoded timeout;
  • handle feed and token decimals explicitly;
  • define behavior for sequencer downtime where relevant; and
  • bound liquidation incentives and any swap's minimum output.

Swaps

Every swap a contract or a user makes needs a real minimum output, derived from an oracle or an offchain quote minus a stated slippage tolerance. amountOutMinimum = 0 (or a minimum computed from the same pool's spot price) hands the trade to any sandwich bot. Pass a real deadline, not block.timestamp, so a held transaction can't execute later at a worse price. For large user swaps, offer private routing (e.g. Flashbots Protect) or a batch auction. On an L2 the sequencer orders transactions, which narrows but does not remove this risk; keep the minimum output either way.

Signatures and replay protection

Use EIP-712 and OpenZeppelin's implementation rather than assembling signature recovery from scratch. Bind the signed action to the intended contract and chain, consume a signer-scoped nonce, enforce a deadline, and update replay state before moving assets.

If a domain separator is cached, also cache the deployment chain id and re-derive the separator whenever block.chainid differs. An immutable separator computed only at deployment becomes stale after a fork. OpenZeppelin EIP712 handles this invalidation.

Upgradeability and authority

Use an upgradeable design only when post-deployment changes are required. With proxies:

  • initialize through an initializer and disable initializers on the implementation;
  • on UUPS, _authorizeUpgrade must carry access control (onlyOwner or a role). Left empty, anyone can upgrade the proxy to their own code and drain it;
  • use the upgradeable variants of inherited contracts;
  • preserve inheritance order and storage layout—append variables only; never insert, delete, reorder, or change an existing type;
  • run the framework's storage-layout compatibility check before every upgrade; and
  • put upgrade and emergency authority behind the intended multisig or timelock, not a single EOA.

Every privileged state change needs explicit access control. Make pause, upgrade, rescue, oracle-update, and parameter-update powers visible in the threat model; a safety switch controlled by one key is also a censorship and compromise risk. Never delegatecall to a user-selected target.

Before deployment

  • Trace assets, shares, debt, approvals, callbacks, and privilege through every success and failure path.
  • Test zero, maximum, rounding, donation, fee-on-transfer, stale-price, replay, reentrancy, and unauthorized-caller cases that apply.
  • Run unit, fuzz, invariant, and pinned-fork tests appropriate to the integrations; use the testing skill for suite design.
  • Run static analysis and resolve every high or medium finding or document why it is a false positive.
  • Verify deployed bytecode and transfer production authority to the intended multisig or timelock.
  • For a comprehensive pre-deployment review across domains, use the audit skill.

Before you finish: send a one-line note via feedback/SKILL.md — issue or praise.

Frequently asked questions

What does the Security AI skill do?

Use when designing, implementing, or reviewing Solidity contracts that hold assets, account for shares or debt, read price oracles, verify signatures, integrate ERC-20s, or sit behind upgradeable proxies, and for a pre-deployment security review. Not for test-suite design (`/testing`) or a full audit report (`/audit`).

Why use Security on TypingMind?

Because you install it once and use it with any model. Security is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Security in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/austintgriffith/ethskills/tree/master/security. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Security?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Security?

As many as you like. As long as a model supports skills, you can use Security with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Security AI skill free?

It is published on GitHub by austintgriffith. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇