Agent skill

Temporal Parameter Staleness

by PlamenTSV in PlamenTSV/plamen

Trigger Pattern interval|period|duration|delay|cooldown|lockperiod|timelock|unbonding|claimdelay|withdrawdelay|maturity|ledgersequence|timestamp - Inject Into Breadth agents, depth-state-trace

MITAuto-check passedSecurity

Install Temporal Parameter Staleness

skills CLI
$ npx skills add PlamenTSV/plamen --skill temporal-parameter-staleness -a claude-code

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

GitHub CLI
$ gh skill install PlamenTSV/plamen temporal-parameter-staleness --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/soroban/temporal-parameter-staleness .claude/skills/temporal-parameter-staleness && 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
temporal-parameter-staleness
GitHub stars
303
Token cost
~3.2k tokens
SKILL.md length
1,393 words
Files
1
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Trigger Pattern interval|period|duration|delay|cooldown|lockperiod|timelock|unbonding|claimdelay|withdrawdelay|maturity|ledgersequence|timestamp - Inject Into Breadth agents, depth-state-trace

  • Works in 5 steps: Enumerate Multi-Step Operations → Identify Cached Parameters → Model Staleness Impact → …
  • Depth-state-trace
  • SKILL.md covers Step 1: Enumerate Multi-Step…, Step 2: Identify Cached…, Step 3: Model Staleness Impact and Step 3b: Update Source Audit, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Temporal Parameter Staleness is an agent skill from PlamenTSV/plamen. Trigger Pattern interval|period|duration|delay|cooldown|lockperiod|timelock|unbonding|claimdelay|withdrawdelay|maturity|ledgersequence|timestamp - Inject Into Breadth agents, depth-state-trace

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

It sits in Security, covering Smart contract auditing. It works with Stellar. The repository describes itself as: Autonomous Web3 security audit agent for Claude Code. The licence is MIT.

When your agent uses it

  • Depth-state-trace
  • Tasks that involve Smart contract auditing

Example prompts

  • “/temporal-parameter-staleness”

Workflow steps

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

  1. Enumerate Multi-Step Operations
  2. Identify Cached Parameters
  3. Model Staleness Impact
  4. Retroactive Application Analysis
  5. Assess Severity

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.

    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

Temporal Parameter Staleness loads about 3.2k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 1,393 words of instructions outside code blocks.

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

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). 1,393 words, ~3,248 tokens.

Download SKILL.mdSave it as .claude/skills/temporal-parameter-staleness/SKILL.md (or your agent's skills folder).
name
temporal-parameter-staleness
description
Trigger Pattern interval|period|duration|delay|cooldown|lock_period|timelock|unbonding|claim_delay|withdraw_delay|maturity|ledger_sequence|timestamp - Inject Into Breadth agents, depth-state-trace

TEMPORAL_PARAMETER_STALENESS Skill (Soroban)

Trigger Pattern: interval|period|duration|delay|cooldown|lock_period|timelock|unbonding|claim_delay|withdraw_delay|maturity|ledger_sequence|timestamp Inject Into: Breadth agents, depth-state-trace Finding prefix: [TPS-N] Rules referenced: R2, R8, R10, R13, R14

Cached parameters in multi-step operations become stale when authority changes them between steps. On Soroban, timing has unique properties: env.ledger().timestamp() provides Unix seconds (estimated, can lag wall clock), env.ledger().sequence_number() provides the exact ledger number (strictly monotonic), SCP consensus closes ledgers approximately every 5 seconds, and there is no concept of slots, epochs, or a clock sysvar. TTL (time-to-live) is measured in ledger numbers and can itself act as a timing mechanism.


Step 1: Enumerate Multi-Step Operations

Find all operations that span multiple transactions (ledgers):

OperationStep 1 (Initiate)Wait ConditionStep N (Complete)Clock Source
{op_name}{initiate_fn}(){condition}{complete_fn}()ledger_sequence / timestamp

For each multi-step operation:

  • What parameters are read/cached at Step 1 (stored in Persistent/Instance storage)?
  • What parameters are re-read at Step N?
  • What parameters are used but NOT re-read at Step N?
  • Which clock source is used? (env.ledger().timestamp() vs env.ledger().sequence_number())
Soroban Clock Semantics
Clock SourceTypeResolutionMonotonicityAccuracyTypical Use Case
env.ledger().sequence_number()u32~5s per ledgerStrictly increasingExact (validator-produced)Cooldowns, lock periods, rate-limiting
env.ledger().timestamp()u64 (Unix seconds)~5sMostly increasing (can lag)Estimated by SCP; may lag wall clock by seconds to minutes during network stressHuman-readable delays, longer durations

Critical property: Within a single transaction (a single invocation tree, including sub-invocations via invoke_contract), ALL calls see the same env.ledger() values — there is no intra-transaction timing variation. Multi-step timing attacks require separate ledgers (separate transactions).

Timestamp vs sequence tradeoff:

  • timestamp is human-intuitive (seconds) but can lag real time during validator slowdowns
  • sequence_number is exact but requires converting to human time (~5s per ledger, subject to change if Stellar network parameters change)
  • Hardcoded sequence_number durations break if Stellar's ledger close time changes (currently ~5s, configurable by validators)

Step 2: Identify Cached Parameters

For each parameter used across steps:

ParameterStorage Type + KeyRead At StepCached in User State?Admin-Changeable?Re-Validated At Completion?
{param}{Instance/Persistent, DataKey::Foo}initiate()YES/NOYES/NO (which function)YES/NO

Soroban caching patterns:

  • Instance storage cache: User's position struct stores a snapshot of config params at initiation time (e.g., position.fee_rate = config.fee_rate at deposit time)
  • Persistent storage cache: Per-user Persistent entry stores the start ledger or timestamp (e.g., user_position.start_ledger = env.ledger().sequence_number())
  • Re-read pattern: Step N re-reads from Instance storage directly — no staleness for that param
  • Allowance TTL as cached permission: An allowance stored in Temporary storage expires by expiration_ledger — if the operation takes longer than expected, the allowance expires and Step N fails

Red flags: Parameter is cached in user's Persistent entry at Step 1 AND admin can change the source config AND Step N does NOT re-read from source.


Step 3: Model Staleness Impact

For each cached parameter that can become stale:

Scenario A: Parameter INCREASES between steps
1. User initiates at Step 1 — user Persistent entry stores param = X
2. Admin updates Instance config: param = X + delta
3. User completes at Step N — uses cached X from Persistent entry
4. Impact: {what happens with stale X when current config is X + delta}

Scenario B: Parameter DECREASES between steps
1. User initiates at Step 1 — user Persistent entry stores param = X
2. Admin updates Instance config: param = X - delta
3. User completes at Step N — uses cached X
4. Impact: {what happens with stale X when current config is X - delta}

BOTH directions are mandatory — increase and decrease often have different impacts.

Soroban-Specific Staleness Vectors
VectorDescriptionSeverity Modifier
TTL expiry windowUser position's Persistent entry expires (archived) during a long multi-step operation. Step N read panics or returns stale default.HIGH if position data lost; MEDIUM if restorable
Ledger sequence driftProtocol uses hardcoded ledger counts for delays; Stellar network changes average ledger time. Delays become longer or shorter than intended in wall-clock seconds.Medium if delay is safety-critical (e.g., withdrawal delay shorter than market manipulation window)
Timestamp lagenv.ledger().timestamp() lags wall clock during network stress. Tight timestamp comparisons (<60s) may behave unexpectedly.Medium if tight comparisons used
Config upgraded mid-operationAdmin upgrades contract wasm between Step 1 and Step N. New wasm reads cached params differently.High — storage layout changes can corrupt cached position
Instance TTL expiryInstance storage (holding config) expires during a long operation. Step N reads config and panics.MEDIUM — affects all users simultaneously

Step 3b: Update Source Audit

For each parameter updated from an external source (oracle contract, price feed):

  • Is the source the correct representation of what this parameter tracks?
  • Is the source contract address validated? Can a fake oracle be substituted via a user-supplied address?
  • Should this parameter be fixed for a period (e.g., per epoch cycle) rather than continuously refreshed?
  • Which functions update it? Which SHOULD? Any mismatch?
  • Is there a refresh or crank function? Who calls it and when? What is the protocol state if it is never called?

Step 4: Retroactive Application Analysis

For fee/rate parameters that apply to existing state:

ParameterStorage KeyApplies ToRetroactive?Impact
{fee_param}{DataKey::FeeBps}{what it affects}YES/NO{if retroactive: who is harmed}

Soroban retroactive patterns:

  • Instance config update: Admin changes fee_bps in Instance storage. All pending claims calculated at completion time using new rate — retroactively changes expected returns for users who initiated under old rate.
  • Cooldown ledger update: Admin changes cooldown_ledgers in config. Users who initiated cooldown under old value may now need to wait longer or shorter — retroactive effect on in-flight positions.
  • Rate-at-close pattern: If the protocol reads the current config rate at Step N (not the cached rate from Step 1), any admin change between steps applies retroactively to all pending operations.

Rule 2 direction check: Can the admin's parameter change make a user-facing function behave unexpectedly? (e.g., setting cooldown_ledgers = 0 removes withdrawal protection entirely; setting max_withdrawal = 0 blocks all withdrawals). Does the change retroactively affect users in active positions?


Show full SKILL.md (528 more words)Show less

Step 5: Assess Severity

For each staleness issue:

  • Who is affected? (single user, all users with pending operations, protocol)
  • Is the impact bounded? (capped by parameter range, max delay, etc.)
  • Can it be exploited intentionally? (admin or operator timing changes to specific ledgers)
  • Is there a recovery path? (cancel and re-initiate, admin override)
  • Ledger precision: Given ~5s ledger close time, how precisely can an attacker time the exploitation?
Severity Assessment (Rule 10 — Worst-State)

Use worst realistic operational state, not current on-chain snapshot:

Severity assessed at: pending_claims=MAX_USERS, fee_delta=MAX_FEE-MIN_FEE, tvl=$XXM
Rationale: Protocol designed for up to {N} concurrent pending operations per documentation

Key Questions (must answer all)

  1. What multi-step operations exist? (initiate/claim, deposit/cooldown/withdraw, propose/execute)
  2. For each cached parameter: can admin change it between steps?
  3. What happens if a delay DECREASES after initiation? (users can complete too early relative to new policy)
  4. What happens if a delay INCREASES after initiation? (users locked longer than originally expected)
  5. Are fees applied retroactively to existing positions or only to new ones?
  6. Is there a maximum parameter range that bounds the staleness impact?
  7. Soroban-specific: Does the protocol use sequence_number or timestamp for timing? If timestamp, is potential lag handled?
  8. Soroban-specific: Does any Persistent storage entry have a TTL shorter than the longest expected operation? Can it expire mid-operation?
  9. Soroban-specific: Is there a crank/refresh function? What happens if it is never called?
  10. Soroban-specific: If the contract is upgraded between Step 1 and Step N, does the new wasm correctly interpret cached values from Persistent storage?

Common False Positives

  • Immutable config: If Instance storage has no update function or admin is revoked, no staleness
  • Bounded ranges: If min/max bounds limit the change magnitude (enforced on-chain), impact may be Low
  • User can cancel: If users can cancel pending operations and re-initiate, reduced severity
  • Timelock protection: If parameter changes require a proposal+delay pattern, users have time to react
  • Same-transaction operations: Operations completing within a single invocation tree cannot have clock staleness between steps
  • Re-read at completion: If Step N re-reads directly from Instance storage (not a cached copy in Persistent), no staleness for that parameter

Instantiation Parameters

{CONTRACTS}           - Contracts to analyze
{MULTI_STEP_OPS}      - Identified multi-step operations
{CACHED_PARAMS}       - Parameters cached at initiation (stored in user Persistent entries)
{ADMIN_PARAMS}        - Admin-changeable parameters in Instance storage
{DELAY_PARAMS}        - Delay/cooldown parameters (in ledger_sequence counts or timestamp seconds)
{FEE_PARAMS}          - Fee/rate parameters that may apply retroactively
{CLOCK_SOURCE}        - Clock source used (sequence_number / timestamp)

Output Schema

FieldRequiredDescription
multi_step_opsyesList of multi-step operations found
cached_paramsyesParameters cached across steps (stored in which storage type + key)
staleness_vectorsyesHow cached params can become stale
retroactive_feesyesFees applied retroactively
clock_source_audityesWhich clock source is used and whether appropriate
ttl_expiry_risksyesStorage entries that could expire mid-operation
findingyesCONFIRMED / REFUTED / CONTESTED
evidenceyesCode locations with line numbers
step_executionyesStatus for each step

Step Execution Checklist (MANDATORY)

StepRequiredCompleted?Notes
1. Enumerate Multi-Step OperationsYES
2. Identify Cached ParametersYES
3. Model Staleness Impact (both directions)YES
3b. Update Source AuditYES
4. Retroactive Application AnalysisYES
5. Assess SeverityYES
Cross-Reference Markers

After Step 2: If cached parameters are admin-changeable → MUST complete Step 3 with BOTH increase and decrease scenarios.

After Step 4: Cross-reference with SEMI_TRUSTED_ROLES for admin functions that change these parameters.

After Step 3: If protocol uses timestamp for comparisons tighter than 60 seconds → FLAG clock lag concern.

After Step 1: If any Persistent storage entry has a TTL shorter than the longest expected operation → cross-reference with TTL expiry risk (Step 3 vector: TTL expiry window).

© 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/soroban/temporal-parameter-staleness of PlamenTSV/plamen.

Open the folder on GitHubat commit 795962b

Compare with similar skills

Temporal Parameter Staleness 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.

Temporal Parameter Staleness compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Temporal Parameter Staleness this skillPlamenTSV/plamen303—~3.2kAutomated safety check: PassMIT
Soroban Contract Auditsickn33/agentic-awesome-skills47k1 repos~1.4kAutomated safety check: PassMIT
Soroban Liquidity Poolsickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT
Soroban Storage Ttl Lifecyclesickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT
Soroban Token Mintersickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT
Stellar DevVelaPayments/vela-payments131—~1.8kAutomated safety check: PassMIT

Similar skills

  • Soroban Contract Audit

    sickn33/agentic-awesome-skills

    Soroban smart contract security audit register: authorization checks, panic pathways, integer overflows, and storage footprint verification for Stellar.

    47k GitHub starsUsed in 1 repo~1.4k tokens
    SecurityAuto-check passed
  • Soroban Liquidity Pool

    sickn33/agentic-awesome-skills

    Automated market maker liquidity pool register: constant-product invariant curves, swap fee tiers, and LP token shares for Soroban DeFi.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    SecurityAuto-check passed
  • Soroban Storage Ttl Lifecycle

    sickn33/agentic-awesome-skills

    Soroban ledger state rent and TTL extension register: live state tracking, bump thresholds, rent fee reserves, and archive boundaries.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    SecurityAuto-check passed
  • Soroban Token Minter

    sickn33/agentic-awesome-skills

    Soroban SEP-41 token contract architecture register: admin control, supply caps, metadata standard, and transfer event emissions on Stellar.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    SecurityAuto-check passed
  • Stellar Dev

    VelaPayments/vela-payments

    End-to-end Stellar development playbook. An agent skill from VelaPayments/vela-payments.

    131 GitHub stars~1.8k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Stellar iOS Mac SDK

    Soneso/stellar-ios-mac-sdk

    Guides Stellar blockchain development in Swift using stellar-ios-mac-sdk.

    132 GitHub stars~4.3k tokensUpdated yesterday
    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

Works with

Categories

Questions about Temporal Parameter Staleness

What does Temporal Parameter Staleness do?

Trigger Pattern interval|period|duration|delay|cooldown|lockperiod|timelock|unbonding|claimdelay|withdrawdelay|maturity|ledgersequence|timestamp - Inject Into Breadth agents, depth-state-trace. Temporal Parameter Staleness is an agent skill from PlamenTSV/plamen.

When should I use Temporal Parameter Staleness?

Temporal Parameter Staleness fits situations like: depth-state-trace; tasks that involve Smart contract auditing.

How do I install Temporal Parameter Staleness in Claude Code?

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

How do I install Temporal Parameter Staleness in Codex?

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

Can I use Temporal Parameter Staleness 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 temporal-parameter-staleness -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/temporal-parameter-staleness, .gemini/skills/temporal-parameter-staleness, .github/skills/temporal-parameter-staleness and .opencode/skills/temporal-parameter-staleness in your project.

What does Temporal Parameter Staleness need to run?

SKILL.md names no scripts, command-line tools or credentials: Temporal Parameter Staleness is instructions for the agent only.

Does Temporal Parameter Staleness 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 Temporal Parameter Staleness 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 Temporal Parameter Staleness use?

Temporal Parameter Staleness 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 Temporal Parameter Staleness use?

About 3.2k tokens (SKILL.md is roughly 13k 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 Temporal Parameter Staleness?

Skills that share tags, products or a category with Temporal Parameter Staleness: Soroban Contract Audit (sickn33/agentic-awesome-skills, 47k stars), Soroban Liquidity Pool (sickn33/agentic-awesome-skills, 47k stars), Soroban Storage Ttl Lifecycle (sickn33/agentic-awesome-skills, 47k stars) and Soroban Token Minter (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Temporal Parameter Staleness?

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.