lustra
Use when the user wants to clean up AI slop, harden a codebase, or run technical due diligence: review code for security flaws and vulnerable or wrongly-licensed dependencies, find and remove dead code, audit dependency health, run and triage linters, type checkers, test suites and formatters, evaluate design principles (SOLID and the cohesion/coupling equivalents for non-OO stacks), audit logging and observability, find performance smells, check documentation and CI health, scaffold baseline configs for the detected stack, do a structured code review, guide a one-major-at-a-time dependency migration, fix project structure, or produce one aggregated health report across all of these. Triggers on phrases like clean this up, find security issues, remove dead code, check dependencies, lint, typecheck, run the tests, format, review my code, check the design, check logging, is this slow, migrate a dependency, fix the project structure, set up the project, audit everything, due diligence, or this looks like AI slop. Wraps the detected stack's real tooling — dependency auditor, linter, type checker, test runner, formatter, dead-code and license scanners — and triages its output. Not for UI/visual design work.
- License 许可
- Unlicense
- 所属仓库
- saski/arnesto
- 最近更新
- 2026-11-12
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- lustra
- description
- Use when the user wants to clean up AI slop, harden a codebase, or run technical due diligence: review code for security flaws and vulnerable or wrongly-licensed dependencies, find and remove dead code, audit dependency health, run and triage linters, type checkers, test suites and formatters, evaluate design principles (SOLID and the cohesion/coupling equivalents for non-OO stacks), audit logging and observability, find performance smells, check documentation and CI health, scaffold baseline configs for the detected stack, do a structured code review, guide a one-major-at-a-time dependency migration, fix project structure, or produce one aggregated health report across all of these. Triggers on phrases like clean this up, find security issues, remove dead code, check dependencies, lint, typecheck, run the tests, format, review my code, check the design, check logging, is this slow, migrate a dependency, fix the project structure, set up the project, audit everything, due diligence, or this looks like AI slop. Wraps the detected stack's real tooling — dependency auditor, linter, type checker, test runner, formatter, dead-code and license scanners — and triages its output. Not for UI/visual design work.
- allowed-tools
- Bash Read Edit Grep Glob
- argument-hint
- [audit|baseline|review|types|tests|analyze|format|security|license|deadcode|deps|design|observability|perf|docs|migrate|ci|structure] [target]
- user-invocable
- true
02 资源文件 18
- 参考文档reference/analyze.md1.9 KB
- 参考文档reference/audit.md2.0 KB
- 参考文档reference/baseline.md1.6 KB
- 参考文档reference/ci.md1.7 KB
- 参考文档reference/deadcode.md1.6 KB
- 参考文档reference/deps.md2.2 KB
- 参考文档reference/design.md1.7 KB
- 参考文档reference/docs.md1.4 KB
- 参考文档reference/format.md1.5 KB
- 许可证reference/license.md2.1 KB
- 参考文档reference/migrate.md1.6 KB
- 参考文档reference/observability.md1.7 KB
- 参考文档reference/perf.md1.7 KB
- 参考文档reference/review.md1.6 KB
- 参考文档reference/security.md1.8 KB
- 参考文档reference/structure.md1.5 KB
- 参考文档reference/tests.md1.5 KB
- 参考文档reference/types.md1.3 KB
03 SKILL.md 正文
Lustra
Lustra wraps real code-hygiene tooling and applies judgment on top of it. It does not guess where a tool would. It runs the tool, filters false positives, ranks what matters, and applies only the changes the user approves.
Dispatch
$1 is the command. $2 and beyond are the target (a path or glob). When no target is
given, default to the whole repository.
- If
$1is empty orhelp, print the command list below and stop. - Otherwise read
${CLAUDE_SKILL_DIR}/reference/$1.mdand follow it exactly, scoped to the target. Ifreference/$1.mddoes not exist, say so and print the command list.
Commands
Grouped by lifecycle phase. audit runs the diagnostic ones together.
Assess / start
audit— meta-command: one graded health report across every dimension (due diligence).baseline— scaffold the guardrail configs a project should have, for the detected stack.
Iterate
review— structured correctness / design / slop review of a diff or path.types— type-checker triage; catchany/@ts-ignore-style evasion.tests— run the suite, coverage on the diff, catch fake/empty tests.analyze— the linter's findings plus AI-slop smells that no rule catches.format— formatting drift, fixed mechanically.
Polish
security— vulnerabilities: secrets, injection, broken authorization, vulnerable deps.license— dependency license compatibility and IP risk.deadcode— unused files, exports, and dependencies; deletes only what is confirmed.deps— dependency health and upgrades: outdated, deprecated, duplicated. Reports unused deps and advisories but defers deletion todeadcodeand vuln fixes tosecurity.design— module/package design quality: SOLID, or cohesion/coupling/composition for non-OO stacks. Module-scoped, unlike diff-scopedreviewor layout-scopedstructure.observability— logging and instrumentation quality so failures are diagnosable.perf— performance smells: N+1, blocking IO, unbounded growth, bundle weight.docs— documentation drift and undocumented public surface.
Maintain
migrate— guided one-major-at-a-time dependency migration: changelog, codemods, suite.ci— pipeline soundness: real gates, CI security, reproducibility.structure— detect the stack, then report or reorganize project structure.
Rules that override every reference file
These come from the project's own engineering guidelines and are not negotiable:
- Surgical. Every changed line must trace to the requested command. Never "improve" adjacent code, comments, or formatting that the command did not target.
- No silent changes — ever. Nothing is auto-applied, not even mechanically-safe formatting or an unambiguously unused import. Every change is presented as an itemized checklist with its evidence/diff, and only the items the user approves are applied.
- Report honestly. If a tool is missing, a step was skipped, or a finding is low-confidence, say so plainly. Do not present a partial pass as a clean one.
- English only, in all output and any code or config you write.
- Confirm before any file or dependency change. Not just destructive or hard-to-reverse ones — every edit goes through the Confirmation flow below as a staged, explicitly-confirmed checklist, never a bulk rewrite.
Confirmation flow
The single flow every command follows (the deadcode pattern). Reference files do not
redefine it:
- Run the read-only detect/triage steps automatically — these never need confirmation.
- Present every proposed change as an itemized checklist: the
file/target, the exact action (command or diff), and the evidence/reason per item. - Apply only the items the user approves, in one reviewable change.
- Re-run the relevant check to confirm clean, then report what was applied, what was skipped, and why.
Read-only detection is exempt. Changing files or dependencies is not.
Stack detection
Every command that runs a tool first identifies the stack. Reference files point here and do not redefine this:
- Read the manifests at the target root to identify language and framework:
package.json(and the framework),pyproject.toml/setup.py,go.mod,Cargo.toml,pom.xml/build.gradle,Gemfile,composer.json. - State the detected stack explicitly before running anything. If detection is ambiguous or the repo is polyglot, ask rather than assume.
- Pick the tool from the reference file's per-ecosystem table. If no tool exists for the detected stack, say so and fall back to static reading — mark that result lower-confidence. Never run a stack's tool against a project that is not that stack.
04 同仓库更多 Skills
visualize
Use /visualize for creating compact charts, diagrams, or other visuals inline as part of the conversation itself. It chooses among Markdown tables, Mermaid, inline HTML, and other supported in-transcript forms. Use Canvas for durable artifacts outside the transcript that users may revisit, refine, or share.
update-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
update-cli-config
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
statusline
Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.
split-to-prs
Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.
shell
Runs the rest of a /shell request as a literal shell command. Use only when the user explicitly invokes /shell and wants the following text executed directly in the terminal.