Agent skill

External Precondition Audit

by PlamenTSV in PlamenTSV/plamen

Trigger Pattern Any external package function call detected in program - Inject Into Breadth agents (merged via M5 hierarchy)

MITAuto-check passed

Install External Precondition Audit

skills CLI
$ npx skills add PlamenTSV/plamen --skill external-precondition-audit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PlamenTSV/plamen external-precondition-audit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/sui/external-precondition-audit .claude/skills/external-precondition-audit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
external-precondition-audit
GitHub stars
303
Token cost
~1.6k tokens
SKILL.md length
702 words
Files
1
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Trigger Pattern Any external package function call detected in program - Inject Into Breadth agents (merged via M5 hierarchy)

  • Works in 3 steps: Interface-Level Requirement Inference → Return Value Consumption → State Dependency Mapping
  • Pattern Any external package function call detected in program - Inject Into Breadth agents (merged via M5 hierarchy)
  • SKILL.md covers 1. Interface-Level Requirement…, 2. Return Value Consumption, 3. State Dependency Mapping and Finding Template, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

External Precondition Audit is an agent skill from PlamenTSV/plamen. Trigger Pattern Any external package function call detected in program - Inject Into Breadth agents (merged via M5 hierarchy)

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Autonomous Web3 security audit agent for Claude Code. The licence is MIT.

When your agent uses it

  • Pattern Any external package function call detected in program - Inject Into Breadth agents (merged via M5 hierarchy)

Example prompts

  • “/external-precondition-audit”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Interface-Level Requirement Inference
  2. Return Value Consumption
  3. State Dependency Mapping

What it can do on your machine

Read from SKILL.md and the folder at commit 795962b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

External Precondition Audit loads about 1.6k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 702 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PlamenTSV/plamen at commit 795962b, republished under its MIT licence (© PlamenTSV). 702 words, ~1,639 tokens.

Download SKILL.mdSave it as .claude/skills/external-precondition-audit/SKILL.md (or your agent's skills folder).
name
external-precondition-audit
description
Trigger Pattern Any external package function call detected in program - Inject Into Breadth agents (merged via M5 hierarchy)

Skill: External Precondition Audit (Sui)

Trigger Pattern: Any external package function call detected in program Inject Into: Breadth agents (merged via M5 hierarchy) Finding prefix: [EPA-N] Rules referenced: R1, R4, R8, R10 Constraint: Interface-level inference only -- no production fetch required

use.*external|friend|public.*package|transfer::public_|dynamic_field|coin::from_balance|
clock::timestamp_ms|sui::pay|dex|swap|oracle|price_feed

For every external package the protocol calls:

1. Interface-Level Requirement Inference

From the imported module signatures, infer what the external package requires:

External Function CalledParameters PassedLikely Preconditions (from signature)Our Protocol Validates?Package Immutable?

Inference method: Read the function signature, type constraints, and any doc comments. Example: pool::swap<A, B>(pool: &mut Pool<A, B>, coin_in: Coin<A>, ...) -> infer that pool must be the correct pool for A/B pair, coin_in must have sufficient balance, and return Coin<B> may have zero value (slippage).

Package immutability check (CRITICAL Sui-specific):

  • Is the external package immutable (UpgradeCap destroyed)?
  • If upgradeable: who holds the UpgradeCap? What upgrade policy (compatible, additive, dependency-only)?
  • If upgradeable with compatible policy: the external package can change function behavior arbitrarily. Apply Rule 4 (adversarial assumption) -- treat the external package as potentially malicious after upgrade.
  • If immutable: behavior is fixed, trust boundary is clear.

2. Return Value Consumption

External CallReturn TypeHow Protocol Uses ReturnFailure Mode if Return Unexpected

For each return value:

  • What happens if it returns a Coin<T> with zero balance? (division by zero, incorrect share calculation)
  • What happens if it returns a Coin<T> with less value than expected? (slippage not checked)
  • What happens if the call aborts? (entire PTB aborts -- can this be used for griefing?)
  • Hot potato returns: If the external call returns a hot potato (zero-ability struct), is the consuming function always reachable in the same PTB? If not, the PTB always aborts.

Sui-specific: External package calls within a PTB share the same abort scope. If any external call aborts, the entire PTB reverts. Model: can an attacker cause an external call to abort to grief a user's multi-step PTB?

  • 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)?
Show full SKILL.md (351 more words)Show less

3. State Dependency Mapping

Protocol StateDepends on External Shared ObjectExternal State Can Change Between Epochs/Txns?

For each dependency: model what happens when the external shared object state changes between our protocol's transactions.

Sui-specific concerns:

  • Shared objects are ordered by consensus. Two transactions touching the same shared object are serialized. But transactions touching DIFFERENT shared objects can execute concurrently.
  • If our protocol reads shared object A (external) and then writes shared object B (ours), another transaction can modify A between our read and our next access.
  • Cross-epoch state: External shared objects may have epoch-dependent behavior (e.g., staking pools that update per epoch). Is our protocol aware of epoch boundaries?
  • Package upgrade state change: If the external package upgrades, shared objects created by the old version may behave differently when accessed by functions from the new version. Does our protocol pin to a specific package version?
3b. Package Upgrade Risk Assessment

For each external package dependency:

External PackageUpgradeCap StatusUpgrade PolicyImpact if UpgradedOur Protocol's Mitigation
{package}{destroyed (immutable) / held by {who}}{compatible / additive / dep_only / immutable}{behavior change risk}{version pin / none}

Check:

  • Does the external package use sui::package::UpgradeCap? If so:
    • Who holds the UpgradeCap? (single admin, multisig, destroyed for immutability)
    • What upgrade policy is set? (compatible = can change anything, additive = can add but not change, dep_only = only dependency updates, immutable = frozen forever)
    • Can an upgrade change the behavior of functions our protocol depends on?
  • Does our protocol pin to a specific package version, or does it follow upgrades automatically?
  • If the external package upgrades with compatible policy: shared objects created by the old version may behave differently when accessed by the new version's functions. Our protocol may call into changed behavior without any code change on our side.

Finding Template

markdown
**ID**: [EPA-N]
**Verdict**: CONFIRMED / PARTIAL / REFUTED / CONTESTED
**Step Execution**: (see checklist below)
**Rules Applied**: [R1:___, R4:___, R8:___, R10:___]
**Severity**: Critical/High/Medium/Low/Info
**Location**: sources/{module}.move:LineN
**Title**: {missing external validation / unexpected return / state dependency}
**Description**: {specific issue with code reference}
**Impact**: {what attacker can achieve via the external package weakness}

Step Execution Checklist (MANDATORY)

SectionRequiredCompleted?Notes
1. Interface-Level Requirement InferenceYESIncludes package immutability check
2. Return Value ConsumptionYESHot potato return paths checked
3. State Dependency MappingYESCross-epoch + package upgrade state
3b. Package Upgrade RiskYESUpgradeCap holder + upgrade policy

If any step skipped, document valid reason (N/A, no external packages, framework-only deps).

© PlamenTSV, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agents/skills/sui/external-precondition-audit of PlamenTSV/plamen.

Open the folder on GitHubat commit 795962b

Compare with similar skills

External Precondition Audit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

External Precondition Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
External Precondition Audit this skillPlamenTSV/plamen303—~1.6kAutomated safety check: PassMIT
Detecting Anomalous Authentication Patternsmukul975/Anthropic-Cybersecurity-Skills34k—~7.5kAutomated safety check: PassApache-2.0
Detecting Beaconing Patterns With Zeekmukul975/Anthropic-Cybersecurity-Skills34k—~662Automated safety check: PassApache-2.0
Golang Patternsaffaan-m/ECC276k—~1.1kAutomated safety check: PassMIT
Kotlin Exposed Patternsaffaan-m/ECC276k4 repos~5.5kAutomated safety check: PassMIT
Dotnet Patternsaffaan-m/ECC276k1 repos~2.3kAutomated safety check: PassMIT

Similar skills

  • Detecting Anomalous Authentication Patterns

    mukul975/Anthropic-Cybersecurity-Skills

    Detects anomalous authentication patterns using UEBA analytics, statistical baselines, and machine learning models to identify impossible travel, credential stuffing, brute force, password spraying…

    34k GitHub stars~7.5k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Detecting Beaconing Patterns With Zeek

    mukul975/Anthropic-Cybersecurity-Skills

    Performs statistical analysis of Zeek conn.log connection intervals to detect C2 beaconing patterns.

    34k GitHub stars~662 tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Golang Patterns

    affaan-m/ECC

    Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization.

    276k GitHub stars~1.1k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.

    276k GitHub starsUsed in 4 repos~5.5k tokens
    DatabasesAuto-check passed
  • Dotnet Patterns

    affaan-m/ECC

    Idiomatic C and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.

    276k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-check passed
  • Fastapi Patterns

    affaan-m/ECC

    FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.

    276k GitHub stars~2.3k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed

More from PlamenTSV/plamen

All 87 skills in this repo
  • Audit Prep

    PlamenTSV/plamen

    Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project…

    303 GitHub stars~3.7k tokensUpdated 12 days ago
    Auto-check passed
  • Verification Protocol

    PlamenTSV/plamen

    Trigger Pattern Always (used by all verifier agents) - Inject Into security-verifier agents (Phase 5)

    303 GitHub stars~3.5k tokensUpdated 12 days ago
    Auto-check passed
  • Ability Analysis

    PlamenTSV/plamen

    Trigger Pattern Always (Aptos Move) - foundational security check - Inject Into Breadth agents, depth agents

    303 GitHub stars~3.3k tokensUpdated 12 days ago
    Auto-check passed
  • Ability Analysis

    PlamenTSV/plamen

    Trigger Pattern Always (Sui Move) -- foundational security check - Inject Into Breadth agents, depth agents

    303 GitHub stars~3.2k tokensUpdated 12 days ago
    Auto-check passed
  • Account Lifecycle

    PlamenTSV/plamen

    Trigger Pattern ACCOUNTCLOSING flag detected (close/CloseAccount usage) - Inject Into Breadth agents, depth agents

    303 GitHub stars~1.2k tokensUpdated 12 days ago
    Auto-check passed
  • Account Validation

    PlamenTSV/plamen

    Trigger Pattern Always required for Solana audits - Inject Into Breadth agents, depth agents

    303 GitHub stars~1.7k tokensUpdated 12 days ago
    Auto-check passed

Questions about External Precondition Audit

What does External Precondition Audit do?

Trigger Pattern Any external package function call detected in program - Inject Into Breadth agents (merged via M5 hierarchy). External Precondition Audit is an agent skill from PlamenTSV/plamen.

When should I use External Precondition Audit?

External Precondition Audit fits situations like: pattern Any external package function call detected in program - Inject Into Breadth agents (merged via M5 hierarchy).

How do I install External Precondition Audit in Claude Code?

Run `npx skills add PlamenTSV/plamen --skill external-precondition-audit -a claude-code`. Or copy the skill folder (agents/skills/sui/external-precondition-audit in PlamenTSV/plamen) into .claude/skills/external-precondition-audit in your project. Claude Code loads it when a task matches its description.

How do I install External Precondition Audit in Codex?

Run `npx skills add PlamenTSV/plamen --skill external-precondition-audit -a codex`. Or copy the skill folder (agents/skills/sui/external-precondition-audit in PlamenTSV/plamen) into .agents/skills/external-precondition-audit in your project. Codex loads it when a task matches its description.

Can I use External Precondition Audit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PlamenTSV/plamen --skill external-precondition-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/external-precondition-audit, .gemini/skills/external-precondition-audit, .github/skills/external-precondition-audit and .opencode/skills/external-precondition-audit in your project.

What does External Precondition Audit need to run?

SKILL.md names no scripts, command-line tools or credentials: External Precondition Audit is instructions for the agent only.

Does External Precondition Audit access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is External Precondition Audit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does External Precondition Audit use?

External Precondition Audit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does External Precondition Audit use?

About 1.6k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to External Precondition Audit?

Skills that share tags, products or a category with External Precondition Audit: Detecting Anomalous Authentication Patterns (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Detecting Beaconing Patterns With Zeek (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Golang Patterns (affaan-m/ECC, 276k stars) and Kotlin Exposed Patterns (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains External Precondition Audit?

PlamenTSV (a GitHub user) maintains it in PlamenTSV/plamen, which has 303 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on September 26, 2026.

Source: PlamenTSV/plamen on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.