agents/skills/solana/trident-api-reference/SKILL.md
Type Reference document (prevents method signature hallucination) - Trigger trident_available true in build_status.md
npx skillsauth add plamentsv/plamen trident-api-referenceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Type: Reference document (prevents method signature hallucination) Trigger:
trident_available: trueinbuild_status.mdLoaded by: Invariant fuzz generator (Phase 4b), security-verifier Template 6 (Phase 5) Version: Trident v0.12.0 (Ackee Blockchain Security) Important: Checktrident --versionbefore using. If version differs, warn and proceed with caution.
# Initialize scaffolding (creates trident-tests/ from program IDL)
trident init
# Run fuzz campaign (v0.11+ uses built-in TridentSVM - no honggfuzz/AFL needed)
# Run from the trident-tests/ directory
cd trident-tests && trident fuzz run fuzz_0
# Run with a specific seed for reproducibility
trident fuzz run fuzz_0 12345
# Enable detailed transaction logging
TRIDENT_LOG=1 trident fuzz run fuzz_0
# Build without running (useful for CI or pre-checks)
trident fuzz run fuzz_0 --skip-build
Platform support: Trident v0.11+ works on Linux, macOS (including Apple Silicon), and Windows. Earlier versions (<=0.10) required honggfuzz (Linux-only).
trident-tests/
fuzz_tests/
fuzz_0/
fuzz_instructions.rs # Handler definitions (auto-generated, customize)
test_fuzz.rs # Entry point (auto-generated)
.fuzz-artifacts/ # Crash/violation files written here (v0.11+)
Trident.toml # Configuration (iterations, coverage, regression)
// Auto-generated from IDL. Each variant = one program instruction.
// Customize: add bounds to parameters, constrain account selection.
#[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)]
pub enum FuzzInstruction {
InstructionName(InstructionNameData),
// ...
}
#[derive(Arbitrary, Debug)]
pub struct InstructionNameData {
// Fields mirror the instruction's arguments
pub amount: u64,
pub authority: AccountId, // AccountId = index into AccountsStorage
// ...
}
// Manages test accounts. Use AccountId (u8) to reference accounts.
// Trident creates/reuses accounts automatically.
// Read account state:
let account = fuzz_accounts.token_account.storage().get(&account_id);
// Custom account setup (e.g., mock oracle):
fn set_account_custom(
&mut self,
account_id: AccountId,
data: &[u8],
owner: &Pubkey,
) -> Pubkey;
impl FuzzInstruction {
// Called after EACH instruction execution
fn check_invariant(&self, pre_state: &Snapshot, post_state: &Snapshot) {
// Assert protocol invariants here
// Panic = violation found = crash file generated
assert!(
post_state.total_supply == post_state.sum_balances(),
"Supply invariant violated"
);
}
}
// Capture state before instruction for comparison
struct Snapshot {
total_supply: u64,
vault_balance: u64,
// Add fields for each invariant
}
impl Snapshot {
fn capture(accounts: &AccountsStorage) -> Self {
// Read relevant account states
}
}
.fuzz-artifacts/ for violations: Trident v0.11+ writes crash/violation files to .fuzz-artifacts/ (not fuzzing/fuzz_0/ like older versions). Always check this directory even if stdout shows no errors.development
Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project documentation checks. Generates a scored Audit Readiness Report and optionally runs static analysis. Trigger on: "prepare for audit", "audit readiness", "pre-audit check", "audit prep", "NatSpec check", or any request to review a Solidity codebase before a security review.
development
Launch the Plamen deterministic Web3 security audit pipeline
development
Run the Plamen smart-contract audit wizard in Codex
testing
Launch the Plamen deterministic L1 infrastructure audit pipeline