Install the "share-allocation-fairness" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/share-allocation-fairness into .claude/skills/share-allocation-fairness/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "share-allocation-fairness", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add PlamenTSV/plamen --skill share-allocation-fairness -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "share-allocation-fairness" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/share-allocation-fairness into .agents/skills/share-allocation-fairness/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "share-allocation-fairness", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add PlamenTSV/plamen --skill share-allocation-fairness -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "share-allocation-fairness" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/share-allocation-fairness into .cursor/skills/share-allocation-fairness/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "share-allocation-fairness", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add PlamenTSV/plamen --skill share-allocation-fairness -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "share-allocation-fairness" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/share-allocation-fairness into .gemini/skills/share-allocation-fairness/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "share-allocation-fairness", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add PlamenTSV/plamen --skill share-allocation-fairness -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "share-allocation-fairness" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/share-allocation-fairness into .github/skills/share-allocation-fairness/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "share-allocation-fairness", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add PlamenTSV/plamen --skill share-allocation-fairness -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "share-allocation-fairness" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/share-allocation-fairness into .opencode/skills/share-allocation-fairness/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "share-allocation-fairness", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
share-allocation-fairness
GitHub stars
303
Token cost
~2.8k tokens
SKILL.md length
1,289 words
Files
1
Skills in repo
87
Repo updated
First seen
Licence
MIT
At a glance
Trigger Pattern SHAREALLOCATION flag detected in pattern scan - Inject Into Breadth agents, depth-edge-case
Works in 4 steps: Classify Allocation Mechanism → Late Entry Attack Model → Queue Position and Batch Processing → …
Pattern SHAREALLOCATION flag detected in pattern scan - Inject Into Breadth agents
SKILL.md covers Purpose, Methodology, Output and Finding Template, plus 1 more section
Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
What it does
Share Allocation Fairness is an agent skill from PlamenTSV/plamen. Trigger Pattern SHAREALLOCATION flag detected in pattern scan - Inject Into Breadth agents, depth-edge-case
Its SKILL.md is about 2.8k 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 SHAREALLOCATION flag detected in pattern scan - Inject Into Breadth agents
Depth-edge-case
Example prompts
“/share-allocation-fairness”
Workflow steps
4 steps, taken from the step headings in SKILL.md.
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
Share Allocation Fairness loads about 2.8k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 1,289 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~34
When it runs· the whole SKILL.md, loaded when a task matches
~2.8k
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.
Analyze fairness of share/token allocation mechanisms on Sui where users receive Coin<T> shares or Balance<T> proportional to deposits, contributions, or participation -- checking for late-entry advantages, PTB-based timing exploitation, queue-position gaming, and time-weighting omissions.
Sui-specific share representations:
Coin<ShareToken>: Fungible, freely transferable (has key + store). User holds as owned object.
Balance<ShareToken> inside a position object: Non-transferable accounting. Locked within the protocol's object model.
u64 field in a shared/owned struct: Simple numerical tracking, no token representation.
Check which representation is used -- it affects transferability, composability, and gaming vectors.
Methodology
STEP 1: Classify Allocation Mechanism
Identify which pattern the protocol uses:
Type
Sui Pattern
Key Risk
Pro-rata snapshot
Shares minted at fixed ratio via balance::split/coin::mint_balance at deposit time
Late depositors dilute early depositors' accrued value
Time-weighted
Per-user owned object tracks reward_per_share_paid and accrued_rewards with clock::timestamp_ms()
Checkpoint manipulation, discrete vs continuous accrual
Queue-based
Table/VecMap in shared object stores pending deposits
Queue position gaming, PTB-based front-running
Epoch-based
Shares valued per Sui epoch boundary via tx_context::epoch()
Cross-epoch timing arbitrage at epoch transition
STEP 2: Late Entry Attack Model
For each allocation entry function:
Identify accrual source: What generates value for existing share holders? (yield from external DeFi, fees collected in shared pool, token emissions via TreasuryCap)
Trace timing: When does accrued value become claimable vs when can new shares enter? Is there a separate crank/update function?
Check for time-weighting: Does allocation account for HOW LONG shares were held, or only THAT shares are held at checkpoint time?
Model attack: Can a depositor enter AFTER value accrues but BEFORE distribution, capturing value they did not earn?
Entry Function
Accrual Source
Time-Weighted?
Late Entry Possible?
Impact
Sui timing model:
clock::timestamp_ms() provides millisecond-precision timestamps (read from the Clock shared object)
Timestamps advance per checkpoint (~0.5-2s), NOT per transaction
Multiple transactions within the same checkpoint see the SAME timestamp
Implication: time-weighted calculations based on clock::timestamp_ms() have ~0.5-2s granularity. An attacker can deposit and withdraw within the same checkpoint and see zero time elapsed, potentially capturing rewards with zero time commitment.
PTB-specific timing: With PTB composability, an attacker can compose multiple function calls in a single atomic transaction: [deposit] -> [trigger_distribution] -> [withdraw] within one PTB. This is more powerful than EVM flash loans for timing attacks because PTBs execute atomically with no inter-step cost.
STEP 2c: Cross-Address Deposit Model
For each entry function accepting a recipient address parameter:
Entry Function
Accepts Recipient?
Default State for New Recipient
Exploitable?
Impact
Check: When a new position object or dynamic field is created for a recipient:
What is the DEFAULT state? (reward_per_share_paid = 0? last_deposit_epoch = 0?)
If reward_per_share_paid starts at 0 while the global index is at N, the new position holder captures ALL historical rewards on their deposit -- FINDING
Can deposit(recipient, coin) where recipient != sender create a position that captures historical rewards the recipient did not earn?
On Sui, this may manifest as a new owned object created for the recipient (clean state -- typically safe) or a new dynamic field added to a shared object keyed by address (check default values).
STEP 2d: Pre-Setter Timing Model
For each admin-settable reward/rate parameter:
Parameter Setter
Cap Required
Staked-Before-Set?
Retroactive Rewards?
Fair?
Model: user deposits (position created with current index) -> admin sets reward rate -> rewards accrue.
Does the user receive retroactive rewards for the period BEFORE the rate was set?
Is the global reward index updated atomically with the rate change in the same function call?
2e. Pre-Configuration State Analysis
For the allocation mechanism identified in Step 1:
Configuration Step
Parameter Set
Functions Available Before Set
Exploitable Default?
What is the deployment/initialization sequence? In Sui, init runs once at package publish. What configuration happens in init vs subsequent admin transactions?
For each step: what functions are callable BEFORE this configuration completes?
Are there reward/share calculations that use unconfigured (zero/default) values in shared objects?
Can a user deposit/stake before full configuration and receive outsized rewards/shares?
Is there a version flag or is_initialized check that gates user interactions?
Sui-specific: init() runs atomically at publish. If configuration requires MULTIPLE transactions (init -> configure_pool -> set_rates), there are windows between these transactions where the protocol is partially configured.
If users can interact during partial configuration AND default values create unfair advantage -> FINDING (minimum Medium, Rule 13: design gap).
Show full SKILL.md (559 more words)Show less
STEP 3: Queue Position and Batch Processing
For protocols with batch/queue processing:
Ordering fairness: Is queue order FIFO (Table insertion order), arbitrary (admin-chosen), or manipulable (PTB composition order)?
Partial processing: Can admin process some deposits but not others within a batch? Does the batch function iterate with a limit?
Cross-batch state: Does processing order within a batch affect allocation ratios?
Deposit splitting: Can a user split one large Coin<T> into many small deposits (via coin::split in a PTB) for queue advantage or per-deposit limit bypass?
Sui-specific ordering:
Transactions touching only owned objects are processed without consensus (fast path) -- no ordering manipulation
Transactions touching shared objects go through consensus -- validator-influenced ordering within checkpoint
PTB atomicity: all commands execute atomically, batch processing within a single PTB is all-or-nothing
An attacker can use PTB to atomically: read queue state -> deposit at favorable position -> trigger processing -> claim
STEP 4: Share Redemption Symmetry
Check that entry and exit use consistent valuation:
Mint vs burn ratio: Are shares minted at the same exchange rate they can be burned? (check share price calculation in both deposit and withdraw)
Pending claims: Can unclaimed reward Balance<T> dilute active shares' value? (rewards already owed but counted in TVL)
Withdrawal queue: Does withdrawal ordering create unfair priority?
Sui-specific redemption:
If shares are Coin<ShareToken>, user burns them via protocol function. Check: can user transfer shares to another address and redeem there to bypass cooldowns?
If shares are Balance<ShareToken> inside position object, redemption requires the position object. Check: can position object be transferred (has store?) to bypass restrictions?
First-depositor / last-withdrawer edge cases: what happens when total_supply == 0 and someone deposits? (division by zero in share calculation?)
TreasuryCap authority risks:
Can TreasuryCap be used outside of deposit logic to inflate share supply?
Is TreasuryCap stored in a shared object with access control? If store allows extraction from the wrapper -> unauthorized minting.
If freeze authority pattern exists (rare on Sui): who controls it?
STEP 4b: Aggregate Constraint Coherence (Rule 14)
For independently-settable allocation rates/shares (e.g., per-pool weights, fee splits, distribution percentages):
Rate/Weight Setter
Aggregate Constraint
Enforced On-Chain?
What if Sum Exceeds/Falls Short?
Sui-specific: If weights are stored as dynamic fields on a shared object (one field per pool), the setter function may not iterate all fields to validate the sum. Check: does the setter read all weight dynamic fields and validate the total?
If aggregate constraint NOT enforced and rates independently settable -> FINDING (Rule 14).
Output
For each finding, specify:
Allocation mechanism type (pro-rata, time-weighted, queue, epoch)
Whether time-weighting is present or missing
Concrete attack sequence with numerical example (SUI/token amounts)
Who benefits and who is harmed
Whether the attack requires PTB composition or is achievable with single function calls
Share Allocation Fairness 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.
Share Allocation Fairness compared with similar skills
Skill
Stars
Used in
Tokens
Auto-check
Licence
Repo updated
Share Allocation Fairness this skillPlamenTSV/plamen
Detect and defend against indirect prompt injection hidden in web pages, documents, and images consumed by an agent, via content extraction (HTML/PDF/OCR), normalization, and scanning with LLM…
Detects prompt injection using regex signature matching, heuristic scoring for structural anomalies, and DeBERTa-based transformer classification, flagging direct injections (system-prompt…
Scan a source tree for SQL-injection vulnerable patterns: string concatenation into queries, f-string interpolation in SQL, string-format substitution into raw queries, deprecated cursor methods…
Scan a source tree for command-injection vulnerable patterns: shell=True calls in Python subprocess, os.system / os.popen with interpolated strings, Node childprocess.exec with template literals…
Detects and analyzes process injection techniques used by malware including classic DLL injection, process hollowing, APC injection, thread hijacking, and reflective loading.
Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project…
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 Share Allocation Fairness
What does Share Allocation Fairness do?
Trigger Pattern SHAREALLOCATION flag detected in pattern scan - Inject Into Breadth agents, depth-edge-case. Share Allocation Fairness is an agent skill from PlamenTSV/plamen.
When should I use Share Allocation Fairness?
Share Allocation Fairness fits situations like: pattern SHAREALLOCATION flag detected in pattern scan - Inject Into Breadth agents; depth-edge-case.
How do I install Share Allocation Fairness in Claude Code?
Run `npx skills add PlamenTSV/plamen --skill share-allocation-fairness -a claude-code`. Or copy the skill folder (agents/skills/sui/share-allocation-fairness in PlamenTSV/plamen) into .claude/skills/share-allocation-fairness in your project. Claude Code loads it when a task matches its description.
How do I install Share Allocation Fairness in Codex?
Run `npx skills add PlamenTSV/plamen --skill share-allocation-fairness -a codex`. Or copy the skill folder (agents/skills/sui/share-allocation-fairness in PlamenTSV/plamen) into .agents/skills/share-allocation-fairness in your project. Codex loads it when a task matches its description.
Can I use Share Allocation Fairness 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 share-allocation-fairness -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/share-allocation-fairness, .gemini/skills/share-allocation-fairness, .github/skills/share-allocation-fairness and .opencode/skills/share-allocation-fairness in your project.
What does Share Allocation Fairness need to run?
SKILL.md names no scripts, command-line tools or credentials: Share Allocation Fairness is instructions for the agent only.
Does Share Allocation Fairness 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 Share Allocation Fairness 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 Share Allocation Fairness use?
Share Allocation Fairness 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 Share Allocation Fairness use?
About 2.8k tokens (SKILL.md is roughly 11k 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 Share Allocation Fairness?
Skills that share tags, products or a category with Share Allocation Fairness: Detecting Indirect Prompt Injection (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Detecting AI Model Prompt Injection Attacks (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Detecting SQL Injection Patterns (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Detecting Command Injection Patterns (jeremylongshore/tons-of-skills-marketplace, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Share Allocation Fairness?
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.