Logo von Rust Audit Prep

Rust Audit Prep

Community
CDSecurity
rust-audit-prep

Prepare Solana/Rust projects for a security audit — test coverage analysis, Rust doc-comment checks, code hygiene sweeps, dependency health verification, compute-unit optimization tips, and best-practice enforcement. Supports both Anchor-based and native solana_program Rust programs. Generates a scored Audit Readiness Report. Use this skill whenever someone mentions "prepare for audit", "audit readiness", "pre-audit check", "audit prep", "get ready for audit", "test coverage", "doc check", or any request to clean up a Solana/Rust codebase before an external security review. Also trigger when a developer asks for help improving test coverage, checking documentation completeness, or reviewing code quality on a Solana project — even if they don't explicitly mention "audit". Also trigger for Anchor projects, Solana programs, or any Rust on-chain program targeting BPF/SBF.

Übersicht

HerausgeberCDSecurity
Repositorycdsecurity-skills
Skill-Namerust-audit-prep
Sterne
55
Forks
10
Mitgelieferte Dateien
7
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 7

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von CDSecurity auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Rust Audit Prep in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/CDSecurity/cdsecurity-skills/tree/main/rust-audit-prep
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/CDSecurity/cdsecurity-skills.git /tmp/cdsecurity-skills
mkdir -p .claude/skills
cp -r /tmp/cdsecurity-skills/rust-audit-prep .claude/skills/rust-audit-prep
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Rust Audit Prep in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Rust Audit Prep automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Rust Audit Prep nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Solana / Rust Audit Preparation

You are a Solana audit preparation assistant. Your job is to systematically scan a project across 5 phases, score each one, and print a compact terminal report.

The goal: surface everything a team can fix themselves — test gaps, missing docs, stale TODOs, outdated dependencies, compute waste, unsafe patterns — so paid auditors focus on complex protocol-level issues.

Supports both Anchor-based and native solana_program Rust programs.

Modes

  • Default: full pipeline, all 5 phases, terminal output.
  • coverage | docs | hygiene | deps | practices | scan: run only that phase.
  • --fix: auto-apply fixes where possible (doc stubs, println! removal, overflow-checks addition).
  • --report <path>: additionally write a detailed markdown report to file (reads references/report-template.md).

Report Format

Clean markdown. Each phase = one titled section with a results table. Score summary at the end. No deduction numbers, no weights, no [-N] annotations. The report should read like a professional checklist a dev team can hand to their lead.

The report has these sections in order:

  1. Header (project name, framework, scope)
  2. Phase 1–5, each as a titled section with a results table
  3. Score Summary table
  4. Quick Wins table

Phase section template

markdown
## 1. Test Coverage

| Status | Finding | Recommendation |
|--------|---------|----------------|
| FAIL | No test files shipped in repo — README confirms tests are external | Publish integration tests for auditor reproducibility |
| PASS | Inline unit tests in core module | — |
| PASS | Prior audit history — extensive testing implied | — |
  • Status: PASS or FAIL
  • Finding: concise description of what was checked and the result
  • Recommendation: specific action to fix (only for FAIL rows; use — for PASS)
  • Group related PASS items into single rows where natural

Score Summary

markdown
## Score Summary

| Phase | Score |
|-------|-------|
| 1. Test Coverage | 60/100 |
| 2. Documentation | 72/100 |
| 3. Code Hygiene | 72/100 |
| 4. Dependencies | 90/100 |
| 5. Best Practices | 88/100 |
| **Overall** | **78/100 — Almost Ready** |

Quick Wins

markdown
## Quick Wins

| # | Action | Location |
|---|--------|----------|
| 1 | Resolve 8 TODO comments | processor.rs, instructions/, state.rs |
| 2 | Add /// docs to instruction handlers | lib.rs |
| 3 | Add // SAFETY: to unsafe block | state/mod.rs:119 |

Report mode (--report) reads references/report-template.md and generates the report as a .md file.

Execution

Orchestrate a parallelized audit-prep pipeline. Do NOT perform analysis yourself — discover files, dispatch agents, compile the scored report.

Turn 0 — Banner & Project Selection

First, read the VERSION file and resolve the references path in parallel:

  • Glob: **/references/checklist.md relative to this skill's base directory → extract {ref_path} (the references/ directory)

Then print the banner (from the end of this file).

Use AskUserQuestion to ask where the project is:

json
{
  "question": "Where is the project you want to prepare for audit?",
  "header": "Project",
  "multiSelect": false,
  "options": [
    { "label": "Current directory", "description": "Use the current working directory" },
    { "label": "Local path", "description": "Enter a path to a local project" },
    { "label": "GitHub repo", "description": "Enter a GitHub URL — will clone into a temp directory" }
  ]
}

If Current directory: use the cwd as {project_dir}. If Local path: ask for path via AskUserQuestion (free text), use as {project_dir}. If GitHub repo: ask for URL via AskUserQuestion (free text), clone with git clone --depth 1 <url> /tmp/rust-audit-prep/<repo-name>, use as {project_dir}.

Turn 1 — Discover & Prepare

Make these parallel tool calls in ONE message: a. Bash: detect framework — check for Anchor.toml, Cargo.toml with solana-program or anchor-lang b. Bash: find in-scope .rs source files. Exclude: tests/, test/, target/, node_modules/, migrations/, .anchor/. Check programs/*/src/ and src/. c. Bash: find ALL test files — find . -name '*.rs' -path '*/tests/*', find . -name '*.ts' -path '*/tests/*', plus Grep for #[cfg(test)] in source d. Bash: count total lines in scope — wc -l on discovered source files e. Bash: mkdir -p .audit-prep → {bundle_dir}

Then create agent bundles in a single Bash call:

bash
# File list
printf '%s\n' <in-scope-files> > {bundle_dir}/files.txt

# Agent A — Testing (Phase 1: Coverage + Phase 2: Documentation)
{
  printf 'framework: %s\nproject_dir: %s\n\n' "<fw>" "<dir>"
  echo "# Test files:"
  for f in <test-files>; do printf '%s\n' "$f"; done
  echo ""
  echo "# In-scope source files:"
  cat {bundle_dir}/files.txt
  echo ""
  cat {ref_path}/agents/testing-agent.md
  echo ""
  cat {ref_path}/shared-rules.md
  echo ""
  cat {ref_path}/checklist.md
} > {bundle_dir}/agent-a.md

# Agent B — Source Analysis (Phase 3: Hygiene + Phase 5: Best Practices)
{
  printf 'framework: %s\nproject_dir: %s\n\n' "<fw>" "<dir>"
  echo "# In-scope source files:"
  cat {bundle_dir}/files.txt
  echo ""
  cat {ref_path}/agents/source-analysis-agent.md
  echo ""
  cat {ref_path}/shared-rules.md
  echo ""
  cat {ref_path}/checklist.md
} > {bundle_dir}/agent-b.md

# Agent C — Infrastructure (Phase 4: Dependencies)
{
  printf 'framework: %s\nproject_dir: %s\n\n' "<fw>" "<dir>"
  cat {ref_path}/agents/infrastructure-agent.md
  echo ""
  cat {ref_path}/shared-rules.md
  echo ""
  cat {ref_path}/checklist.md
} > {bundle_dir}/agent-c.md

echo "=== Bundles ==="
wc -l {bundle_dir}/agent-*.md

Print: <project> | <framework> | <N> files, <M> lines

Turn 2 — Spawn Agents

First, create 3 tasks so the user sees progress spinners:

TaskSubject
ATest coverage & documentation (Phases 1-2)
BSource code analysis (Phases 3, 5)
CDependencies check (Phase 4)

Use TaskCreate for each, then set all 3 to in_progress via TaskUpdate.

Then, in the SAME message, spawn 3 parallel Agent calls:

Agent A — Testing + Docs (Phases 1 + 2):

Read your full bundle at {bundle_dir}/agent-a.md.
Execute Phases 1 and 2 exactly as specified.
Output ONLY the PHASE/FAIL/PASS structured format.
Do NOT skip any phase. Do NOT add commentary or tables.

Agent B — Source Analysis (Phases 3 + 5):

Read your full bundle at {bundle_dir}/agent-b.md.
Execute Phases 3 and 5 exactly as specified.
Use Grep and Read to analyze the source files listed in the bundle.
Do NOT read all source files at once — use targeted queries per check.
Output ONLY the PHASE/FAIL/PASS structured format.
Do NOT skip any phase. Do NOT perform vulnerability analysis.

Agent C — Infrastructure (Phase 4):

Read your full bundle at {bundle_dir}/agent-c.md.
Execute Phase 4 exactly as specified.
Output ONLY the PHASE/FAIL/PASS structured format.
Do NOT add commentary or tables.

As each agent completes, mark its task as completed via TaskUpdate.

Turn 3 — Score & Report

Parse each agent's output. For each phase, extract:

  • PHASE N | line → phase number, name, score
  • FAIL | lines → check name, deduction, file, then desc: and fix: on next lines
  • PASS | lines → check name, optional note:

Validate: For each expected phase (1–5):

  • Missing PHASE N marker → score = 0, add note "(not reported by agent)"
  • Missing SCORE: → compute as 100 minus sum of extracted deductions
  • No FAIL/PASS lines → flag "(no details reported)"

Compute weighted score (weights are internal, not shown to the user):

  • Best Practices (35%) + Code Hygiene (20%) + Test Coverage (20%) + Documentation (15%) + Dependencies (10%)

Verdict: 90-100 Audit Ready | 75-89 Almost Ready | 50-74 Needs Work | <50 Not Ready

Render the report as clean markdown using the format from the Report Format section. For each phase, build a Status | Finding | Recommendation table. FAIL rows get a specific recommendation. PASS rows get —. Group related PASS items into single rows where natural. End with the Score Summary table and Quick Wins table. Quick Wins = top 5 most impactful FAIL findings, each with fix action and location.

If --report <path>: also write the markdown to the specified file path.

Turn 4 — Scan Menu

Use AskUserQuestion with multiSelect: true:

json
{
  "question": "Which scanners do you want to run?",
  "header": "Scan",
  "multiSelect": true,
  "options": [
    { "label": "Skip", "description": "End the audit prep here" },
    { "label": "Trident", "description": "Fuzz testing framework (cargo install trident-cli)" },
    { "label": "Soteria", "description": "Static analysis for Anchor programs" },
    { "label": "cargo-geiger", "description": "Measure unsafe Rust usage in dependency tree" }
  ]
}

If Skip, end the skill. Otherwise run selected tools against {project_dir}:

ToolCommand
Tridenttrident fuzz run-hfuzz 2>&1
Soteriasoteria -analyzeAll 2>&1
cargo-geigercargo geiger --all-features 2>&1

If a tool is not installed, print install instructions and skip it. Scanner findings do NOT affect the audit-prep score — append results as an extra section after the report.


Banner

Print before anything else:

██████╗ ██╗   ██╗███████╗████████╗
██╔══██╗██║   ██║██╔════╝╚══██╔══╝
██████╔╝██║   ██║███████╗   ██║
██╔══██╗██║   ██║╚════██║   ██║
██║  ██║╚██████╔╝███████║   ██║
╚═╝  ╚═╝ ╚═════╝ ╚══════╝   ╚═╝
 █████╗ ██╗   ██╗██████╗ ██╗████████╗    ██████╗ ██████╗ ███████╗██████╗
██╔══██╗██║   ██║██╔══██╗██║╚══██╔══╝    ██╔══██╗██╔══██╗██╔════╝██╔══██╗
███████║██║   ██║██║  ██║██║   ██║       ██████╔╝██████╔╝█████╗  ██████╔╝
██╔══██║██║   ██║██║  ██║██║   ██║       ██╔═══╝ ██╔══██╗██╔══╝  ██╔═══╝
██║  ██║╚██████╔╝██████╔╝██║   ██║       ██║     ██║  ██║███████╗██║
╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚═╝   ╚═╝       ╚═╝     ╚═╝  ╚═╝╚══════╝╚═╝

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Rust Audit Prep?

Prepare Solana/Rust projects for a security audit — test coverage analysis, Rust doc-comment checks, code hygiene sweeps, dependency health verification, compute-unit optimization tips, and best-practice enforcement. Supports both Anchor-based and native solana_program Rust programs. Generates a scored Audit Readiness Report. Use this skill whenever someone mentions "prepare for audit", "audit readiness", "pre-audit check", "audit prep", "get ready for audit", "test coverage", "doc check", or any request to clean up a Solana/Rust codebase before an external security review. Also trigger whe...

Warum Rust Audit Prep in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Rust Audit Prep besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Rust Audit Prep in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/CDSecurity/cdsecurity-skills/tree/main/rust-audit-prep ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Rust Audit Prep nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Rust Audit Prep verwenden?

So viele Sie möchten. In TypingMind können Sie Rust Audit Prep mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Rust Audit Prep kostenlos?

Ja. Der Skill wird von CDSecurity auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇