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 ts-sdk-view-and-querygit 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/ts-sdk-view-and-query)<a href="https://agentmods.dev/skills/aptos-labs/aptos-agent-skills/ts-sdk-view-and-query"><img src="https://agentmods.dev/badge/skills/aptos-labs/aptos-agent-skills/ts-sdk-view-and-query/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/ts-sdk-view-and-query"><img src="https://agentmods.dev/badge/skills/aptos-labs/aptos-agent-skills/ts-sdk-view-and-query.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.00075 | $0.01370 |
| Opus 5 | $0.00037 | $0.00685 |
| Sonnet 5 | $0.00015 | $0.00274 |
| Haiku 4.5 | $0.00007 | $0.00137 |
Grade A, and why
ts-sdk-view-and-query 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 11d 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 — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript SDK: View and Query
Purpose
Guide read-only access to chain data in @aptos-labs/ts-sdk: view functions, balance, account info, resources, and
modules.
ALWAYS
- Use
aptos.getBalance({ accountAddress })for APT balance – not deprecatedgetAccountCoinAmount/getAccountAPTAmount. - Use
aptos.view()for Move view functions – passfunction,functionArguments, and optionaltypeArguments. - Use
bigintfor u128/u256 view return values – castresult[0]toBigInt(...)when the Move function returns u128/u256. - Pass address as string or AccountAddress – SDK accepts
AccountAddressInput(string orAccountAddress).
NEVER
- Do not use deprecated
getAccountCoinAmountorgetAccountAPTAmount– usegetBalance(). - Do not use
numberfor u128/u256 – precision loss; usebigint. - Do not assume view returns are always strings – types vary (number, bigint, string, boolean, array).
getBalance (APT)
const balance = await aptos.getBalance({
accountAddress: account.accountAddress
});
// balance is bigint in octas (1 APT = 100_000_000 octas)
const apt = balance / 100_000_000n;
const remainder = balance % 100_000_000n;
console.log(`${apt}.${remainder.toString().padStart(8, "0")} APT`);
getAccountInfo
const accountInfo = await aptos.getAccountInfo({
accountAddress: "0x1"
});
// accountInfo: { sequence_number, authentication_key, ... }
view() – Move view functions
// No type arguments
const result = await aptos.view({
payload: {
function: `${MODULE_ADDRESS}::counter::get_count`,
functionArguments: [accountAddress]
}
});
const count = Number(result[0]);
// With type arguments (e.g. coin type)
const balanceResult = await aptos.view({
payload: {
function: "0x1::coin::balance",
typeArguments: ["0x1::aptos_coin::AptosCoin"],
functionArguments: [accountAddress]
}
});
const coinBalance = BigInt(balanceResult[0] as string);
// Multiple return values
// Move: public fun get_listing(addr): (address, u64, bool)
const [seller, price, isActive] = await aptos.view({
payload: {
function: `${MODULE_ADDRESS}::marketplace::get_listing`,
functionArguments: [listingAddress]
}
});
const listing = {
seller: seller as string,
price: BigInt(price as string),
isActive: isActive as boolean
};
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.
- 11d ago First seen · 192 lines · 75 tokens per session scan A abd2190fdfde
ts-sdk-view-and-query is a skill published in the GitHub repository aptos-labs/aptos-agent-skills (19 stars, last pushed 2mo ago), licensed MIT. It adds 75 tokens to every session and 1,370 once invoked, about $0.0004 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
bnb-chain-toolkit-guide
Guide to the BNB Chain Toolkit — a modular TypeScript toolkit for building, deploying, and interacting with smart contracts on BNB Chain. Includes BEP-20 token utilities, DeFi integrations, wallet management, and cross-chain bridging. Built for BNB Chain Hackathon by the Sperax team.
solana-toolkit-guide
Guide to the Solana Wallet Toolkit — vanity address generation with multi-threaded search, official Solana Labs libraries, Rust and TypeScript implementations. Includes wallet generation, custom address prefixes, and OG names on the blockchain.
starknet-js
Use when writing or debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects or calldata, encoding/decoding Cairo types (felt252, u256, structs, arrays, spans, ByteArray, Option/Result/custom enums), or working with contracts, accounts, providers, transactions…
adding-personhog-rpc
Guide for adding a new RPC to personhog-replica and personhog-router. Covers eligibility checks, proto definition, code generation for Python and Node.js clients, Rust implementation (storage trait, postgres queries, service handler, router wiring), and index compatibility validation. Use when adding a new gRPC…
viem-integration
Integrate EVM blockchains using viem. Use when user says "read blockchain data", "send transaction", "interact with smart contract", "connect to Ethereum", "use viem", "use wagmi", "wallet integration", "viem setup", or mentions blockchain/EVM development with TypeScript.
wallet-cli
Operate the TypeScript TRON wallet CLI for accounts, transfers, staking, governance, contracts, signing, chain queries, and password input with wallet-cli 4.13.0. Refuse wallet passwords in argv and require the supported stdin channel. For Java REPL requests, refuse that entry and offer the TypeScript one-shot CLI…