Agent skill · Audited from source
Code Simplifier
skill · rtk-ai/rtkApache-2.0 licenceAudited 28 Sep 2026 · source 7ecfb6c13649
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 7ecfb6c13649 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Review RTK Rust code for idiomatic simplification. Detects over-engineering, unnecessary allocations, verbose patterns. Applies Rust idioms without changing behavior.
Cite
Cite this page
ModelsAtlas. “Code Simplifier (rtk-ai/rtk)”. Retrieved 28 Sep 2026. https://modelsatlas.com/skills/rtk-ai/code-simplifier
3 skills are called “Code Simplifier”. You are viewing rtk-ai/rtk.
- rtk-ai/rtk★ 82k✓SAFE
- getsentry/skills★ 1.1k✓SAFE
- Ohh-889/skyroc-admin★ 795!CAUTION
Trust audit
Audit 0.4.1 · source read 28 Sep 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 7ecfb6c13649 · 28 Sep 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherrtk-ai GitHub organizationOwner of the repository this skill is read from
- Source folderrtk-ai/rtk/.claude/skills/code-simplifierThe exact folder we audited
- LicenceApache-2.0As the repository states it
- Commit pinned for this verdict7ecfb6c13649A new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Review RTK Rust code for idiomatic simplification. Detects over-engineering, unnecessary allocations, verbose patterns. Applies Rust idioms without changing behavior.
---
name: code-simplifier
description: Review RTK Rust code for idiomatic simplification. Detects over-engineering, unnecessary allocations, verbose patterns. Applies Rust idioms without changing behavior.
triggers:
- "simplify"
- "too verbose"
- "over-engineered"
- "refactor this"
- "make this idiomatic"
allowed-tools:
- Read
- Grep
- Glob
- Edit
effort: low
tags: [rust, simplify, refactor, idioms, rtk]
---
# RTK Code Simplifier
Review and simplify Rust code in RTK while respecting the project's constraints.
## Constraints (never simplify away)
- `LazyLock` regex — cannot be moved inside functions even if "simpler"
- `.context()` on every `?` — verbose but mandatory
- Fallback to raw command — never remove even if it looks like dead code
- Exit code propagation — never simplify to `Ok(())`
- `#[cfg(test)] mod tests` — never remove test modules
## Simplification Patterns
### 1. Iterator chains over manual loops
```rust
// ❌ Verbose
let mut result = Vec::new();
for line in input.lines() {
let trimmed = line.trim();
if !trimmed.is_empty() && trimmed.starts_with("error") {
result.push(trimmed.to_string());
}
}
// ✅ Idiomatic
let result: Vec<String> = input.lines()
.map(|l| l.trim())
.filter(|l| !l.is_empty() && l.starts_with("error"))
.map(str::to_string)
.collect();
```
### 2. String building
```rust
// ❌ Verbose push loop
let mut out = String::new();
for (i, line) in lines.iter().enumerate() {
out.push_str(line);
if i < lines.len() - 1 {
out.push('\n');
}
}
// ✅ join
let out = lines.join("\n");
```
### 3. Option/Result chaining
```rust
// ❌ Nested match
let result = match maybe_value {
Some(v) => match transform(v) {
Ok(r) => r,
Err(_) => default,
},
None => default,
};
// ✅ Chained
let result = maybe_value
.and_then(|v| transform(v).ok())
.unwrap_or(default);
```
### 4. Struct destructuring
```rust
// ❌ Repeated field access
fn process(args: &MyArgs) -> String {
format!("{} {}", args.command, args.subcommand)
}
// ✅ Destructure
fn process(&MyArgs { ref command, ref subcommand, .. }: &MyArgs) -> String {
format!("{} {}", command, subcommand)
}
```
### 5. Early returns over nesting
```rust
// ❌ Deeply nested
fn filter(input: &str) -> Option<String> {
if !input.is_empty() {
if let Some(line) = input.lines().next() {
if line.starts_with("error") {
return Some(line.to_string());
}
}
}
None
}
// ✅ Early return
fn filter(input: &str) -> Option<String> {
if input.is_empty() { return None; }
let line = input.lines().next()?;
if !line.starts_with("error") { return None; }
Some(line.to_string())
}
```
### 6. Avoid redundant clones
```rust
// ❌ Unnecessary clone
fn filter_output(input: &str) -> String {
let s = input.to_string(); // Pointless clone
s.lines().filter(|l| !l.is_empty()).collect::<Vec<_>>().join("\n")
}
// ✅ Work with &str
fn filter_output(input: &str) -> String {
input.lines().filter(|l| !l.is_empty()).collect::<Vec<_>>().join("\n")
}
```
### 7. Use `if let` for single-variant match
```rust
// ❌ Full match for one variant
match output {
Ok(s) => process(&s),
Err(_) => {},
}
// ✅ if let (but still handle errors in RTK — don't silently drop)
if let Ok(s) = output {
process(&s);
}
// Note: in RTK filters, always handle Err with eprintln! + fallback
```
## RTK-Specific Checks
Run these after simplification:
```bash
# Verify no regressions
cargo fmt --all && cargo clippy --all-targets && cargo test
# Verify no new regex in functions
grep -n "Regex::new" src/<file>.rs
# Fixed, reused patterns should be in `LazyLock<Regex>` statics
# Verify no new unwrap in production
grep -n "\.unwrap()" src/<file>.rs
# Should only appear inside #[cfg(test)] blocks
```
## What NOT to Simplify
- `static RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(...).unwrap());` — the `.unwrap()` here is acceptable, it's init-time
- `.context("description")?` chains — verbose but required
- The fallback match arm `Err(e) => { eprintln!(...); raw_output }` — looks redundant but is the safety net
- `std::process::exit(code)` at end of run() — looks like it could be `Ok(())`but it isn'tExcerpt, first 4,286 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 7ecfb6c
git clone https://github.com/rtk-ai/rtk git -C rtk checkout 7ecfb6c13649
The author documents no install command, so this uses the repository directly. Our verdict covers commit 7ecfb6c13649 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
7ecfb6c13649
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/rtk-ai/code-simplifier/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All coding & review skills →rtk-ai/rtk
Rust design patterns for RTK. Newtype, Builder, RAII, Trait Objects, State Machine. Applied to CLI filter modules. Use when designing new modules or refactoring existing ones.
rtk-ai/rtk
Issue triage: audit open issues, categorize, detect duplicates, cross-ref PRs, risk assessment, post comments. Args: "all" for deep analysis of all, issue numbers to focus (e.g. "42 57"), "en"/"fr" for language, no arg…
rtk-ai/rtk
CLI performance optimization - startup time, memory usage, token savings benchmarking
rtk-ai/rtk
Batch review des PRs RTK par ordre de complexité croissante (XS → S → M → L). Pour chaque PR : vérifie l'état (conflits, CLA, reviews), lit le diff complet, analyse le code en contexte, présente un résumé avec lien +…
rtk-ai/rtk
PR triage: audit open PRs, deep review selected ones, draft and post review comments. Args: "all" to review all, PR numbers to focus (e.g. "42 57"), "en"/"fr" for language, no arg = audit only in French.
rtk-ai/rtk
Generate a comprehensive repo recap (PRs, issues, releases) for sharing with team. Pass "en" or "fr" as argument for language (default fr).
Add this badge to your README
[](https://modelsatlas.com/skills/rtk-ai/code-simplifier/)
<a href="https://modelsatlas.com/skills/rtk-ai/code-simplifier/"><img src="https://modelsatlas.com/skills/rtk-ai/code-simplifier/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Code Simplifier
What does the Code Simplifier skill do?
Is Code Simplifier safe to install?
What can Code Simplifier access on my machine?
How current is this page?
Sources
- github.com/rtk-ai/rtk/tree/develop/.claude/skills/code-simplifie — the audited source at commit 7ecfb6c13649 and every finding aboveObserved · 28 Sep 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Code Simplifier skill do?
- Is Code Simplifier safe to install?
- What can Code Simplifier access on my machine?