joplin-llm-wiki: Command for Claude Code

.cursor/commands/spectra-audit.md

/spectra-audit is a command for Claude Code, Cursor from gcake119/joplin-llm-wiki. It costs 23 tokens per session (2,024 once invoked), scanned A, original, MIT.

A command that reviews changed code for security problems, including unsafe defaults, confusing data types, and failures that happen without clear warnings.

In plain words
What is it for?
Use it to inspect the current code changes, especially API designs and other code where incorrect use could expose data or weaken protections.
Why use it?
It helps find mistakes that could make an interface easy to misuse or cause security issues without being noticed.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

This is gcake119/joplin-llm-wiki's own configuration. It tells Claude Code and Cursor how to work on joplin-llm-wiki itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything joplin-llm-wiki configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gcake119/joplin-llm-wiki. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gcake119/joplin-llm-wiki/main/.cursor/commands/spectra-audit.md
Clone the repo
git clone --depth 1 https://github.com/gcake119/joplin-llm-wiki

Made for: Claude Code, Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for /spectra-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/gcake119/joplin-llm-wiki/spectra-audit/github.svg)](https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-audit)
Your own site
<a href="https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-audit"><img src="https://agentmods.dev/badge/commands/gcake119/joplin-llm-wiki/spectra-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for /spectra-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-audit"><img src="https://agentmods.dev/badge/commands/gcake119/joplin-llm-wiki/spectra-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,024 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.02024
Opus 5 $0.00012 $0.01012
Sonnet 5 $0.00005 $0.00405
Haiku 4.5 $0.00002 $0.00202

Measured 11d ago against content hash e80dc367faca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

/spectra-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/commands/spectra-audit.md · 235 lines

How it starts

The opening of the file, as written. The whole thing — 235 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Audit changed code for security sharp edges — API design traps, dangerous defaults, and interfaces that make it easy to do the wrong thing.

Good APIs don't require developers to "be careful" to stay secure. If the correct usage requires reading docs, remembering rules, or understanding cryptography, the API has failed.

Core principle: Security should be the path of least resistance. Insecure usage should be harder than secure usage.

Two Modes

This skill operates in two modes depending on how it's invoked:

  • Standalone (/spectra:audit): Full 3-agent parallel analysis on current git diff. See Standalone Mode.
  • Discipline (via /spectra:apply when audit: true): Condensed checklist applied during implementation. See Discipline Mode.

Both modes share the same Core Framework.


Standalone Mode

When invoked directly as /spectra:audit:

Phase 1: Gather Changes

Run git diff HEAD to get the full diff of current modifications.

If there are no changes, report "No changes to audit" and stop.

Phase 2: Parallel 3-Agent Analysis

Launch 3 agents in parallel (one message, 3 tool calls). Each agent receives the full diff and analyzes it through one adversary lens.

Agent 1 — The Scoundrel (壞蛋)

A malicious developer or attacker deliberately manipulating configuration.

Search the diff for:

  • Config options that can disable security mechanisms
  • Algorithm parameters that accept downgrades (e.g., "none", "md5")
  • Values that can be injected to bypass validation
  • Dangerous config combinations (e.g., auth_required: true + bypass_auth_for_health: true + health_check_path: "/")
  • String concatenation in security-critical paths (permissions, queries, paths)

Agent 2 — The Lazy Developer (懶惰的開發者)

A developer who copy-pastes examples and skips documentation.

Search the diff for:

  • Unsafe defaults: verify: false, timeout: 0, empty strings as keys
  • Zero/nil/empty behavior: what does timeout=0, max_attempts=0, key="" mean?
  • Error messages that don't guide toward secure usage
  • The "first example found" test: is the most obvious usage secure?
  • Path of least resistance: does the simplest way to use this API produce secure results?

Read the full file on GitHub · 235 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 235 lines · 23 tokens per session scan A e80dc367faca

Subscribe to this mod's changes

/spectra-audit is a command published in the GitHub repository gcake119/joplin-llm-wiki (2 stars, last pushed 3mo ago), licensed MIT. It adds 23 tokens to every session and 2,024 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.