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.
npx skills add aptos-labs/aptos-agent-skills --skill analyze-gas-optimizationgit clone --depth 1 https://github.com/aptos-labs/aptos-agent-skillsWrote 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.
[](https://agentmods.dev/skills/aptos-labs/aptos-agent-skills/analyze-gas-optimization)<a href="https://agentmods.dev/skills/aptos-labs/aptos-agent-skills/analyze-gas-optimization"><img src="https://agentmods.dev/badge/skills/aptos-labs/aptos-agent-skills/analyze-gas-optimization/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.
<a href="https://agentmods.dev/skills/aptos-labs/aptos-agent-skills/analyze-gas-optimization"><img src="https://agentmods.dev/badge/skills/aptos-labs/aptos-agent-skills/analyze-gas-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00064 | $0.02699 |
| Opus 5 | $0.00032 | $0.01350 |
| Sonnet 5 | $0.00013 | $0.00540 |
| Haiku 4.5 | $0.00006 | $0.00270 |
Grade A, and why
analyze-gas-optimization 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 428 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill: analyze-gas-optimization
Analyze and optimize Aptos Move contracts for gas efficiency, identifying expensive operations and suggesting optimizations.
When to Use This Skill
Trigger phrases:
- "optimize gas", "reduce gas costs", "gas analysis"
- "make contract cheaper", "gas efficiency"
- "analyze gas usage", "gas optimization"
- "reduce transaction costs"
Use cases:
- Before mainnet deployment
- When transaction costs are high
- When optimizing for high-frequency operations
- When building DeFi protocols with many transactions
Core Gas Optimization Principles
1. Storage Optimization
- Minimize stored data size
- Use efficient data structures
- Pack struct fields efficiently
- Remove unnecessary fields
2. Computation Optimization
- Avoid loops over large collections
- Cache repeated calculations
- Use bitwise operations when possible
- Minimize vector operations
3. Reference Optimization
- Prefer borrowing over moving when possible
- Use
&and&mutefficiently - Avoid unnecessary copies
Gas Cost Analysis
Expensive Operations
1. Global Storage Operations
// EXPENSIVE: Writing to global storage
move_to(account, large_struct);
// EXPENSIVE: Reading and writing
let data = borrow_global_mut<LargeData>(addr);
// EXPENSIVE: Checking existence
if (exists<Resource>(addr)) { ... }
2. Vector Operations
// EXPENSIVE: Growing vectors dynamically
vector::push_back(&mut vec, item); // O(n) worst case
// EXPENSIVE: Searching vectors
vector::contains(&vec, &item); // O(n)
// EXPENSIVE: Removing from middle
vector::remove(&mut vec, index); // O(n)
3. String Operations
// EXPENSIVE: String concatenation
string::append(&mut s1, s2);
// EXPENSIVE: UTF8 validation
string::utf8(bytes);
Optimization Patterns
1. Batch Operations
// BAD: Multiple storage accesses
public fun update_values(account: &signer, updates: vector<Update>) {
let i = 0;
while (i < vector::length(&updates)) {
let update = vector::borrow(&updates, i);
let data = borrow_global_mut<Data>(update.address);
data.value = update.value;
i = i + 1;
}
}
// GOOD: Single storage access with batch update
public fun batch_update(account: &signer, updates: vector<Update>) {
let data = borrow_global_mut<Data>(signer::address_of(account));
let i = 0;
while (i < vector::length(&updates)) {
let update = vector::borrow(&updates, i);
// Update in memory
update_memory_data(data, update);
i = i + 1;
}
}
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.
- 12d ago First seen · 428 lines · 64 tokens per session scan A a9b21db91b1a
analyze-gas-optimization is a skill published in the GitHub repository aptos-labs/aptos-agent-skills (19 stars, last pushed 2mo ago), licensed MIT. It adds 64 tokens to every session and 2,699 once invoked, about $0.0003 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.
Other skills, from other repositories
official-sui-skills
Pointer to the official Mysten Labs skills for building on Sui — language fundamentals, object model, PTBs, SDKs, publishing, upgrades, frontend integration, accessing on-chain data. Maintained upstream at github.com/MystenLabs/skills; pinned to the same ref the audit catalog derives from (see…
sui-and-move-tools
Use to get bytecode for a deployed Sui package and produce a disassembled working view. One GraphQL call fetches every module's raw bytecode bytes; sui move disassemble (already on the system, running sui prompt) produces .asm files for analysis. Trigger on "fetch this package's bytecode", "get me the .mv for package…
web3-audit
Smart contract security audit — 10 DeFi bug classes (accounting desync, access control, incomplete path, off-by-one, oracle, ERC4626, reentrancy, flash loan, signature replay, proxy), pre-dive kill signals (TVL < $500K etc), Foundry PoC template, grep patterns for each class, and real Immunefi paid examples. Use for…
sora-taira-testnet
Work against the SORA Taira testnet through its deployed Torii MCP endpoint for live account, asset, alias, contract, governance, Musubi package-registry, and transaction workflows. Use when Codex needs to inspect or mutate the Taira testnet, verify or add https://taira.sora.org/v1/mcp, prefer the curated iroha. tool…
mochi-local-sandbox
Bring up and use a Mochi-managed local Iroha sandbox plus its local Torii MCP endpoint. Use when Codex needs a reliable local devnet, needs to print or verify the codex mcp add mochi-local --url ... command, or should consume the generated .env.local and .mochi/generated/ bootstrap files for local-only development.
TronScan Data Lookup
Query TRON blockchain data via the TronScan API — accounts, transactions, tokens, blocks, contracts, transfers, and chain statistics.