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.
Trigger Pattern SEMITRUSTEDROLE flag (required) - Inject Into Breadth agents, depth-state-trace
$ npx skills add PlamenTSV/plamen --skill semi-trusted-roles -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PlamenTSV/plamen semi-trusted-roles --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/sui/semi-trusted-roles .claude/skills/semi-trusted-roles && rm -rf skills-srcUse ~/.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/
Install the "semi-trusted-roles" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/semi-trusted-roles into .claude/skills/semi-trusted-roles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semi-trusted-roles", 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.
$skill-installer install https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/semi-trusted-rolesType 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.
$ npx skills add PlamenTSV/plamen --skill semi-trusted-roles -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PlamenTSV/plamen semi-trusted-roles --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agents/skills/sui/semi-trusted-roles .agents/skills/semi-trusted-roles && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "semi-trusted-roles" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/semi-trusted-roles into .agents/skills/semi-trusted-roles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semi-trusted-roles", 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.
$ npx skills add PlamenTSV/plamen --skill semi-trusted-roles -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PlamenTSV/plamen semi-trusted-roles --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agents/skills/sui/semi-trusted-roles .cursor/skills/semi-trusted-roles && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "semi-trusted-roles" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/semi-trusted-roles into .cursor/skills/semi-trusted-roles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semi-trusted-roles", 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.
$ gemini skills install https://github.com/PlamenTSV/plamen.git --path agents/skills/sui/semi-trusted-roles--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PlamenTSV/plamen --skill semi-trusted-roles -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PlamenTSV/plamen semi-trusted-roles --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agents/skills/sui/semi-trusted-roles .gemini/skills/semi-trusted-roles && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "semi-trusted-roles" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/semi-trusted-roles into .gemini/skills/semi-trusted-roles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semi-trusted-roles", 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.
$ gh skill install PlamenTSV/plamen semi-trusted-rolesInstalls 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).
$ npx skills add PlamenTSV/plamen --skill semi-trusted-roles -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .github/skills && cp -r skills-src/agents/skills/sui/semi-trusted-roles .github/skills/semi-trusted-roles && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "semi-trusted-roles" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/semi-trusted-roles into .github/skills/semi-trusted-roles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semi-trusted-roles", 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.
$ npx skills add PlamenTSV/plamen --skill semi-trusted-roles -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PlamenTSV/plamen semi-trusted-roles --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agents/skills/sui/semi-trusted-roles .opencode/skills/semi-trusted-roles && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "semi-trusted-roles" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/semi-trusted-roles into .opencode/skills/semi-trusted-roles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semi-trusted-roles", 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.
semi-trusted-rolesTrigger Pattern SEMITRUSTEDROLE flag (required) - Inject Into Breadth agents, depth-state-trace
Semi Trusted Roles is an agent skill from PlamenTSV/plamen. Trigger Pattern SEMITRUSTEDROLE flag (required) - Inject Into Breadth agents, depth-state-trace
Its SKILL.md is about 3.4k 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.
6 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.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Semi Trusted Roles loads about 3.4k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 1,151 words of instructions outside code blocks.
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.
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.
The full file from PlamenTSV/plamen at commit 795962b, republished under its MIT licence (© PlamenTSV). 1,151 words, ~3,380 tokens.
.claude/skills/semi-trusted-roles/SKILL.md (or your agent's skills folder).Trigger Pattern: SEMI_TRUSTED_ROLE flag (required) Inject Into: Breadth agents, depth-state-trace Purpose: Analyze capability-based privilege model in Sui Move protocols for both role-to-user and user-to-role attack vectors
AdminCap|OwnerCap|TreasuryCap|OperatorCap|KeeperCap|GovernanceCap|
MinterCap|ManagerCap|UpgradeCap|PublisherCap|has_cap|assert_cap|
capability|cap_check|admin_onlyEnumerate ALL capability objects in the protocol:
| Capability Type | Abilities | Holder | Functions Callable | State Modifiable | Transferable? |
|---|---|---|---|---|---|
| {AdminCap} | {key, store?} | {deployer/multisig} | {list all functions requiring &AdminCap} | {list state} | {YES if has store / NO if only key} |
Sui capability model:
key ability: object can exist on-chain. Transferred with transfer::transfer (module-only) or transfer::public_transfer (if also has store).key + store: freely transferable by anyone. High risk -- capability can be sent to arbitrary addresses.key only: transferable only by the defining module's functions. Lower risk -- controlled transfer.fun admin_action(cap: &AdminCap, ...) -- presence of reference proves ownership.For each capability at {CAPABILITY_OBJECTS}:
share_object) or owned? Shared caps are NOT single-holder.For each permitted action, ask:
Timing Abuse:
Parameter Abuse:
Sequence Abuse:
Omission Abuse:
Scenario A: Timing Attack
1. {ROLE_NAME} monitors pending transactions on shared objects
2. {ROLE_NAME} submits transaction to modify shared object state
3. Due to Sui's object-based execution, contention determines ordering
4. User's transaction executes with worse conditions
5. Impact: {TIMING_IMPACT}
Scenario B: Parameter Attack
1. {ROLE_NAME} calls {ROLE_FUNCTION} with {MALICIOUS_PARAMS}
2. Parameters are not validated against {EXPECTED_CONSTRAINTS}
3. Impact: {PARAM_IMPACT}
Scenario C: Key Compromise / Capability Theft
1. {ROLE_NAME} capability object is transferred to attacker
2. If cap has `store` ability: attacker can receive it via `transfer::public_transfer`
3. Attacker can call: {ROLE_FUNCTIONS}
4. Maximum extractable value: {MAX_DAMAGE}
5. Recovery options: {RECOVERY_PATH}
- Can a higher-level cap revoke or re-create the compromised cap?
- Is there an UpgradeCap that can patch the module?
Scenario C2: Shared Capability Abuse
1. {ROLE_NAME} capability is a shared object (created via `transfer::share_object`)
2. ANY user can include the shared cap in their PTB as `&SharedCap` reference
3. Attacker calls admin functions by passing the shared cap reference
4. Attacker can atomically compose admin operations with exploitation in a single PTB
5. Maximum extractable value: {MAX_DAMAGE}
6. NOTE: Shared caps effectively give EVERYONE the admin role -- this is almost always a critical finding| Mitigation | Present? | Effective? |
|---|---|---|
| Timelock on {ROLE_NAME} actions | YES/NO | {clock-based delay?} |
| Multisig ownership (Sui multisig or custom) | YES/NO | {threshold?} |
| Removal/revocation function for {ROLE_NAME} | YES/NO | {who can revoke?} |
| Rate limits or cooldowns (clock-based) | YES/NO | {duration?} |
| Parameter bounds enforcement | YES/NO | {min/max checked?} |
| UpgradeCap held separately | YES/NO | {who holds it?} |
Does a removal/revocation function for {ROLE_NAME} EXIST? If NO -> FINDING: capability is irrevocable without module upgrade. Severity: minimum Medium if cap can modify user-facing state.
Capability transfer control:
store: anyone holding it can transfer freely. Is this intended?key: only module functions can transfer. Are those functions properly access-controlled?destroy function for the capability? If NO and cap has store: it can never be burned.transfer::freeze_object)? Frozen caps can be read (&Cap) but not consumed or mutated -- limits authorized actions to read-only gating.PTB composition risk: Can the capability holder compose a PTB that atomically: (1) changes parameters via admin function, (2) exploits the changed parameters via user function? If YES and cap is owned by a semi-trusted role -> the role can atomically manipulate + exploit without time for users to react.
Predictability Analysis:
Scenario D: User Exploits Keeper Timing
1. User observes that {ROLE_NAME} executes {ROLE_ACTION} at predictable times (e.g., epoch boundaries)
2. User positions themselves before {ROLE_ACTION} (deposit/stake before reward distribution)
3. {ROLE_ACTION} executes, changing state
4. User benefits from known state change
5. Impact: {USER_EXPLOIT_IMPACT}Scenario E: User Griefs Role Preconditions
1. {ROLE_FUNCTION} has precondition: {PRECONDITION} (stored in shared object)
2. User calls a permissionless function that modifies the shared object to violate {PRECONDITION}
3. {ROLE_NAME} calls {ROLE_FUNCTION}, which aborts
4. System enters degraded state (no keeper actions possible)
5. Impact: {GRIEF_IMPACT}Scenario F: User Forces Suboptimal Role Action
1. {ROLE_NAME} must choose between options based on shared object state
2. User manipulates shared object state to make worst option appear best
3. {ROLE_NAME} (following honest behavior) chooses suboptimal path
4. User profits from forced suboptimal execution
5. Impact: {SUBOPTIMAL_IMPACT}Scenario G: Same-Chain Rate Staleness via Discrete Updates
1. Protocol's exchange rate only updates when {ROLE_NAME} acts (discrete updates)
2. Between role actions, rate is stale -- does not reflect accumulated value
3. User monitors for {ROLE_NAME} pending transaction on shared object
4. User enters at stale rate (favorable), {ROLE_NAME} executes, rate updates
5. User exits at updated rate (or holds appreciating position)
6. Impact: {RATE_ARBIT_IMPACT}For each function callable by {ROLE_NAME}:
| Function | Preconditions | Stored In | User Can Manipulate? | Grief Impact |
|---|---|---|---|---|
| {func} | balance > 0 | Shared pool object | YES - withdraw all | Keeper stuck |
| {func} | epoch elapsed | Clock (0x6) | NO - time-based | N/A |
| {func} | threshold met | Shared config object | YES - partial withdraw | Delayed execution |
Generic Rule: Any admin/keeper function precondition that depends on user-modifiable shared object state is potentially griefable.
Sui-specific griefability: Shared object contention can cause transaction ordering issues. If a keeper transaction and a user transaction both touch the same shared object, Sui's consensus determines ordering -- neither party can guarantee priority.
MANDATORY: Enumerate ALL functions that require a capability parameter. Do NOT rely on manual scanning -- grep for all capability types found in Step 1.
For each function requiring ANY capability:
| Function | Required Cap | Preconditions | Shared Object Dependency? | User Can Manipulate? | Grief Impact |
|---|---|---|---|---|---|
| {admin_fn} | {AdminCap} | {preconditions} | YES/NO | YES/NO | {impact if griefed} |
Enumeration completeness check:
Specific checks:
RULE: If ANY admin function has a user-griefable precondition -> severity >= MEDIUM if it blocks critical protocol operations.
key and no transfer function exists, theft requires module compromise{CONTRACTS} -- Move modules to analyze
{ROLE_NAME} -- Specific capability type (AdminCap, OperatorCap, etc.)
{CAPABILITY_OBJECTS} -- Capability object types and their abilities
{ROLE_FUNCTIONS} -- Functions this capability grants access to
{USER_ACTION} -- User action that could be front-run
{ROLE_ACTION} -- Role action used in attack
{TIMING_IMPACT} -- Impact of timing attack
{MALICIOUS_PARAMS} -- Harmful parameter values
{EXPECTED_CONSTRAINTS}-- What params should be validated against
{PARAM_IMPACT} -- Impact of parameter attack
{MAX_DAMAGE} -- Maximum extractable value
{RECOVERY_PATH} -- How to recover from compromise| Field | Required | Description |
|---|---|---|
| capability_inventory | yes | All capability objects and their permissions |
| timing_vectors | yes | Timing-based abuse opportunities |
| parameter_vectors | yes | Parameter-based abuse opportunities |
| omission_vectors | yes | Harm from inaction |
| user_exploit_vectors | yes | How users can exploit the role (reverse direction) |
| transfer_risk | yes | Capability transferability analysis |
| max_damage | yes | Worst-case damage assessment |
| mitigations | yes | Existing protections |
| finding | yes | CONFIRMED / REFUTED / CONTESTED / NEEDS_DEPTH |
| evidence | yes | Code locations with line numbers |
| step_execution | yes | Status for each step |
| Step | Required | Completed? | Notes |
|---|---|---|---|
| 1. Inventory Role Permissions | YES | ||
| 2. Analyze Within-Scope Abuse | YES | ||
| 3. Model Attack Scenarios (A,B,C,C2) | YES | Including shared cap scenario | |
| 4. Assess Mitigations | YES | ||
| 5. Model User-Side Exploitation (D,E,F,G) | YES | MANDATORY -- never skip | |
| 6. Precondition Griefability Check | YES | MANDATORY -- never skip | |
| 6b. Admin Function Griefability | YES | MANDATORY -- never skip |
After Step 4 (Assess Mitigations):
After Step 5 (User-Side Exploitation):
TOKEN_FLOW_TRACING.md for token-related griefing vectorsAfter Step 6 (Precondition Griefability):
© PlamenTSV, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in agents/skills/sui/semi-trusted-roles of PlamenTSV/plamen.
Open the folder on GitHubat commit 795962b
Semi Trusted Roles 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Semi Trusted Roles this skillPlamenTSV/plamen | 303 | — | ~3.4k | Automated safety check: Pass | MIT | |
| Golang Patternsaffaan-m/ECC | 276k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Dotnet Patternsaffaan-m/ECC | 277k | 1 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Fastapi Patternsaffaan-m/ECC | 276k | — | ~2.3k | Automated safety check: Pass | MIT | |
| Flagsvercel/next.js | 143k | — | ~746 | Automated safety check: Pass | MIT | |
| Kotlin Exposed Patternsaffaan-m/ECC | 277k | 4 repos | ~5.5k | Automated safety check: Pass | MIT |
affaan-m/ECC
Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization.
affaan-m/ECC
Idiomatic C and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.
affaan-m/ECC
FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.
vercel/next.js
How to add or modify Next.js experimental feature flags end-to-end.
affaan-m/ECC
JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.
affaan-m/ECC
Python-specific design patterns and best practices including protocols, dataclasses, context managers, decorators, async/await, type hints, and package organization.
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…
PlamenTSV/plamen
Trigger Pattern Always (used by all verifier agents) - Inject Into security-verifier agents (Phase 5)
PlamenTSV/plamen
Trigger Pattern Always (Aptos Move) - foundational security check - Inject Into Breadth agents, depth agents
PlamenTSV/plamen
Trigger Pattern Always (Sui Move) -- foundational security check - Inject Into Breadth agents, depth agents
PlamenTSV/plamen
Trigger Pattern ACCOUNTCLOSING flag detected (close/CloseAccount usage) - Inject Into Breadth agents, depth agents
PlamenTSV/plamen
Trigger Pattern Always required for Solana audits - Inject Into Breadth agents, depth agents
Trigger Pattern SEMITRUSTEDROLE flag (required) - Inject Into Breadth agents, depth-state-trace. Semi Trusted Roles is an agent skill from PlamenTSV/plamen.
Semi Trusted Roles fits situations like: pattern SEMITRUSTEDROLE flag (required) - Inject Into Breadth agents; depth-state-trace.
Run `npx skills add PlamenTSV/plamen --skill semi-trusted-roles -a claude-code`. Or copy the skill folder (agents/skills/sui/semi-trusted-roles in PlamenTSV/plamen) into .claude/skills/semi-trusted-roles in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PlamenTSV/plamen --skill semi-trusted-roles -a codex`. Or copy the skill folder (agents/skills/sui/semi-trusted-roles in PlamenTSV/plamen) into .agents/skills/semi-trusted-roles in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PlamenTSV/plamen --skill semi-trusted-roles -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/semi-trusted-roles, .gemini/skills/semi-trusted-roles, .github/skills/semi-trusted-roles and .opencode/skills/semi-trusted-roles in your project.
SKILL.md names no scripts, command-line tools or credentials: Semi Trusted Roles is instructions for the agent only.
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.
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.
Semi Trusted Roles is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Semi Trusted Roles: Golang Patterns (affaan-m/ECC, 276k stars), Dotnet Patterns (affaan-m/ECC, 277k stars), Fastapi Patterns (affaan-m/ECC, 276k stars) and Flags (vercel/next.js, 143k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.