external-precondition-audit

external-precondition-audit is a skill for Claude Code, Codex from PlamenTSV/plamen. It costs 30 tokens per session (1,006 once invoked), scanned A, original, MIT.

A security-review step for checking interactions between a program and external modules. It infers the conditions those modules require from their function signatures, types, and possible errors.

In plain words
What is it for?
It is for auditing external calls in attack-surface reviews, documenting their likely prerequisites, and checking whether the program validates those prerequisites.
Why use it?
It helps find missing checks before external code is called, such as ownership, initialization, permissions, or sufficient balances.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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.

agentmods
npx agentmods add skills/plamentsv/plamen/external-precondition-audit
Any agent
npx skills add PlamenTSV/plamen --skill external-precondition-audit
Clone the repo
git clone --depth 1 https://github.com/PlamenTSV/plamen

Made for: Claude Code, Codex.

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 external-precondition-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/plamentsv/plamen/external-precondition-audit.svg)](https://agentmods.dev/skills/plamentsv/plamen/external-precondition-audit)
Your own site
<a href="https://agentmods.dev/skills/plamentsv/plamen/external-precondition-audit"><img src="https://agentmods.dev/badge/skills/plamentsv/plamen/external-precondition-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,006 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00030 $0.01006
Opus 5 $0.00015 $0.00503
Sonnet 5 $0.00006 $0.00201
Haiku 4.5 $0.00003 $0.00101

Measured 6d ago against content hash 3bfa4175f1ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

external-precondition-audit 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 6d 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.

agents/skills/aptos/external-precondition-audit/SKILL.md · 89 lines

How it starts

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

EXTERNAL_PRECONDITION_AUDIT Skill

Trigger Pattern: Any external module interaction detected in attack_surface.md Inject Into: Breadth agents (merged via M5 hierarchy) Constraint: Interface-level inference only -- no production fetch required

For every external module the protocol interacts with:

1. Interface-Level Requirement Inference

From the use imports and function calls to external modules, infer what the external module requires:

External Function Called Module::Function Parameters Passed Likely Preconditions (from signature + abort codes) Our Protocol Validates?

Inference method: Read the function signature, type parameters, ability constraints, and abort conditions. Example: coin::withdraw<CoinType>(account: &signer, amount: u64) -> infer that account must have sufficient balance, CoinType must be initialized, amount must be > 0. Check abort codes in framework source if available.

Aptos-specific patterns:

  • &signer parameters: does external module require the signer to own a specific resource?
  • Generic type parameters <T>: does external module require T to be registered/initialized?
  • Object<T> parameters: does external module validate object ownership or type?
  • Abort conditions: enumerate all assert! / abort in external function that could revert our call

2. Return Value Consumption

External Call Return Type How Protocol Uses Return Failure Mode if Return Unexpected

For each return value:

  • What happens if it returns 0? What happens if it returns MAX_U64?
  • What happens if the external call aborts?
  • For Option<T> returns: does our protocol handle none correctly?
  • For FungibleAsset returns: is metadata validated after receiving?
  • For Object<T> returns: is the object type verified before use?
  • For each external data structure received (Vec, array, Map, list): (a) What ordering/uniqueness does the consuming code assume? (b) Does the external contract's spec guarantee that ordering? (c) What happens if the assumption is violated (unsorted, duplicates, gaps)?

Read the full file on GitHub · 89 lines

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. 6d ago First seen · 89 lines · 30 tokens per session scan A 3bfa4175f1ee

Subscribe to this mod's changes

external-precondition-audit is a skill published in the GitHub repository PlamenTSV/plamen (281 stars, last pushed 1mo ago), licensed MIT. It adds 30 tokens to every session and 1,006 once invoked, about $0.0002 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

postgresql-indexing

PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing…

prowler-cloud/prowler · 108 tokens

gh-aw

Create and maintain GitHub Agentic Workflows (gh-aw) for Prowler. Trigger: When creating agentic workflows, modifying gh-aw frontmatter, configuring safe-outputs, setting up MCP servers in workflows, importing Copilot Custom Agents, or debugging gh-aw compilation.

prowler-cloud/prowler · 59 tokens

tdd

Test-Driven Development workflow for ALL Prowler components (UI, SDK, API). Trigger: ALWAYS when implementing features, fixing bugs, or refactoring - regardless of component. This is a MANDATORY workflow, not optional.

prowler-cloud/prowler · 50 tokens

debug

Troubleshoot ChainGPT API errors and issues. Use when: chaingpt error, api not working, 401, 402, 403, 404, 429, insufficient credits, rate limit, streaming broken, nft stuck, chat history not working. Diagnoses the problem and provides the fix.

ChainGPT-org/chaingpt-claude-skill · 65 tokens

shell-scripts

Shell script development workflow. Use when modifying files in scripts/ directory or any .sh files.

hiromaily/go-crypto-wallet · 23 tokens

alchemy-cli

Use the Alchemy CLI (@alchemy/cli) for live blockchain data, transaction lookups, NFT/token/portfolio queries, simulation, tracing/debugging, account abstraction (bundler + gas manager), webhook management, Solana RPC/DAS, and Alchemy app administration. Preferred runtime path for live agent work (querying, admin…

alchemyplatform/alchemy-claude-plugin · 156 tokens