moon is a Rust-based build system and repository management tool for web projects, including monorepos, where multiple related packages live in one repository. It coordinates projects and tasks, standardizes language and package-manager versions, and reduces duplicated scripts. The catalogue skills and instructions support working with moon-managed repositories.
Borrowing it
Nothing to install: this file belongs to moonrepo/moon. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/moonrepo/moon/master/.agents/skills/improve-code-quality/SKILL.mdgit clone --depth 1 https://github.com/moonrepo/moonWrote 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.
[](https://agentmods.dev/skills/moonrepo/moon/improve-code-quality)<a href="https://agentmods.dev/skills/moonrepo/moon/improve-code-quality"><img src="https://agentmods.dev/badge/skills/moonrepo/moon/improve-code-quality/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.
<a href="https://agentmods.dev/skills/moonrepo/moon/improve-code-quality"><img src="https://agentmods.dev/badge/skills/moonrepo/moon/improve-code-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Excessive Agency · line 92 Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00116 | $0.01748 |
| Opus 5.5 | $0.00046 | $0.00699 |
| Sonnet 5.5 | $0.00023 | $0.00350 |
| Haiku 4.5 | $0.00012 | $0.00175 |
Grade A, and why
improve-code-quality 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 2mo 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.
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.
Improve Code Quality
Perform a structured code quality audit on a target path in the monorepo. The workflow is: run automated tools, do deeper manual analysis, present a report, then apply fixes only after the user approves.
Usage
/improve-code-quality <path>
The path can be a directory (e.g., crates/task-runner), a single file (e.g.,
crates/task-runner/src/lib.rs), or the name of a package (e.g., moon_task_runner).
Step 1: Validate and detect language
First, verify the target path exists. If it doesn't, tell the user and stop.
Then detect what languages are present:
- Rust: path is under
crates/,wasm/, orlegacy/, or contains.rsfiles or aCargo.toml
Tell the user what you detected before continuing.
If the target is a single file, skip the automated tool phase and go straight to manual analysis.
Step 2: Manual analysis
Read the source files in the target path and look for issues that automated tools miss. Organize findings by category:
Security
unsafeblocks without justification comments.unwrap()on user-facing code paths (not tests — unwrap is fine in tests)- Path traversal or injection risks
- Hardcoded secrets or credentials
- Use of
std::collections::HashMaporstd::collections::HashSet(refer to conventions below)
Performance
- Unnecessary
.clone()where borrowing would work - Unnecessary
.collect()in iterator chains - O(n^2) or worse algorithms with better alternatives
- Blocking calls inside async functions
- Large types on the stack that should be
Boxed - Avoid cloning in loops; use
.iter()instead of.into_iter()forCopytypes - Prefer iterators over manual loops (when applicable); avoid intermediate
.collect()calls - Detect memory leaks or dangling pointers
Readability & structure
- Functions longer than ~80 lines that should be split
- Deeply nested or complex match/if-else chains
- Dead code or unused imports
- Inconsistent naming
- Magic numbers that should be named constants
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2mo ago First seen · 235 lines · 116 tokens per session scan A e546e3232b1d
improve-code-quality is a skill published in the GitHub repository moonrepo/moon (4,171 stars, last pushed today), licensed MIT. It adds 116 tokens to every session and 1,748 once invoked, about $0.0005 per session on Opus 5.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-30.
Other skills, from other repositories
turborepo
Configure and troubleshoot Turborepo repositories. Use when working with turbo.json, task pipelines, caching, Remote Cache, the turbo CLI, filtering, environment variables, package boundaries, monorepo structure, or CI workflows.
triage-contributor-pr
Triage open pull requests from external contributors to prisma/orm and produce a per-PR verdict with evidence. Use when a maintainer asks to triage, evaluate, assess, or review the queue of incoming contributor PRs, to decide whether a fork PR is safe to run CI on, to check whether a PR is in scope for its version…
review-implement-phase
Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.
review-triage-phase
Produces canonical review actions from fetched review state and renders action markdown. Use when the user wants only triage/action-planning for the review-framework workflow.
no-bare-casts
Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.
product-direction
Judges feature requests, feature pull requests and your own proposals against a repository's written product direction, gives a cited verdict, and records each new no. Use when triaging, labelling or replying to a feature request or a feature pull request, including as an autonomous triage agent; when asked whether a…