anti-ai-slop/SKILL.md
After working on the code, ensure the branch contains only the minimal, idiomatic changes by removing AI-generated slop introduced on this branch.
npx skillsauth add deevsdeevs/agent-system anti-ai-slopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill reviews the diff against main and removes changes that are likely “AI slop”: unnecessary, non-idiomatic, or inconsistent additions that do not materially contribute to the intended feature/fix.
Guiding principle: keep the smallest change that accomplishes the goal, and match the local conventions of each touched file.
Operate only on changes introduced on this branch relative to main.
Determine the diff source in this order:
git diff --cached (if non-empty)git diff (if non-empty)git diff main..HEAD (fallback)main does not exist locally, use git diff master..HEAD.Do not refactor unrelated code outside the displayed diff hunks.
Remove comments/docstrings that merely narrate the code, restate names, or are inconsistent with the file’s comment density and tone.
Python (before):
def clamp(x: float, lo: float, hi: float) -> float:
# Ensure x is not less than lo and not greater than hi
if x < lo:
return lo
if x > hi:
return hi
return x
Python (after):
def clamp(x: float, lo: float, hi: float) -> float:
if x < lo:
return lo
if x > hi:
return hi
return x
Remove checks that are redundant because upstream validation/types/invariants already guarantee inputs.
Rust (before):
pub fn normalize_tag(tag: &str) -> String {
if tag.is_empty() {
return String::new();
}
tag.trim().to_ascii_lowercase()
}
If the rest of the codebase treats empty tags as impossible here (validated earlier), keep only the essential logic:
Rust (after):
pub fn normalize_tag(tag: &str) -> String {
tag.trim().to_ascii_lowercase()
}
Remove wrappers that only rethrow, add inconsistent logging, or hide errors without providing recovery.
C++ (before):
void SaveRow(Db& db, const Row& row) {
try {
db.Save(row);
} catch (const std::exception& e) {
std::cerr << "Error saving row: " << e.what() << std::endl;
throw;
}
}
If the repository does not use log-and-rethrow at this layer, prefer:
C++ (after):
void SaveRow(Db& db, const Row& row) {
db.Save(row);
}
Prefer inlining when it improves clarity and matches surrounding style.
Python (before):
clean = s.strip().lower()
return clean
Python (after):
return s.strip().lower()
Rust (before):
let key = format!("{}:{}", user.id, user.region);
cache.insert(key, value);
If key is not reused and inlining remains readable:
Rust (after):
cache.insert(format!("{}:{}", user.id, user.region), value);
If a caller guarantees an invariant, remove repeated checks in the callee unless the subsystem consistently enforces invariants at every boundary.
Python (before):
def handle(req: Request) -> Response:
user = parse_user(req) # guarantees user.id is present
return do_work(user)
def do_work(user: User) -> Response:
assert user.id is not None
return Response(user.id)
Python (after):
def do_work(user: User) -> Response:
return Response(user.id)
Remove or rewrite changes that introduce new patterns inconsistent with the file or repository norms, such as:
Result wrappers) where the module uses simple anyhow::Result (or vice versa).Remove logs that restate the line of code, are inconsistent with the module’s logging level, or spam hot paths.
Rust (before):
log::info!("Starting normalization");
let out = normalize_tag(tag);
log::info!("Finished normalization");
out
Rust (after):
normalize_tag(tag)
(Keep logs that support production debugging when the module’s convention calls for them.)
Remove “TODO: handle edge cases” style notes that add no actionable guidance and are not aligned with repository practices.
Remove suspicious or unnecessary Unicode in code and configs, including:
U+00A0)U+200B, U+200D)“ ” ‘ ’) in code/configPython (before):
# ✅ Done! 🚀
name = "abc" # zero-width space
Python (after):
name = "abc"
(Do not “sanitize” legitimate localized/user-facing content unless it appears to be accidental.)
Defensive checks are generally appropriate at untrusted boundaries, such as:
Defensive checks are often slop within trusted internal pipelines, such as:
When in doubt, follow existing patterns in the same module/subsystem.
main..HEAD).At the end, output only a 1–3 sentence summary describing what you changed. No bullet points. No emojis. No extended explanation.
Example acceptable summary:
Removed redundant input checks and log-and-rethrow blocks added in this branch, and inlined single-use helpers to match existing style. No functional behavior changes beyond the intended diff; all edits were confined to the branch’s modified hunks.
development
This skill should be used when the user asks about "market microstructure", "exchange mechanics", "order book", "auction", "NBBO", "Reg NMS", "trading venue", "halt", "LULD", "tick size", "maker-taker", "price-time priority", "SIP", "direct feed", "TRF", "wholesaler", "PFOF", "best execution", "trade-through", "ISO", "opening cross", "closing cross", "NOII", "ITCH", "OUCH", or mentions specific exchanges (Nasdaq, NYSE, CME, Binance, SHFE, DCE, CZCE, CFFEX, INE, etc.). For Chinese futures: "CTP", "综合交易平台", "夜盘", "night session", "看穿式监管", "position limits", "持仓限额", queue position in Chinese markets, or Chinese product codes (rb, cu, sc, if, ic, i, j, ta, ma, etc.). Provides hierarchical venue expertise for research and debugging trading systems.
development
This skill should be used when the user asks about Polars DataFrame library (Apache Arrow) for Python or Rust. Triggers: "polars expressions", "lazy vs eager", "scan_parquet streaming", "convert pandas to polars", "pyspark to polars", "kdb to polars", "group_by_dynamic", "rolling_mean", "polars window functions", "asof join", "polars GPU", "polars parquet", "LazyFrame". Time series: OHLCV resampling, rolling windows, financial data patterns. Performance: native expressions over map_elements, early projection, categorical types, streaming.
testing
Run research orchestration for data quality, factor geometry, hypothesis validation, and incident forensics. Use when you need SHIP/KILL/ITERATE decisions with strict validation. Triggers: mft-strategist, data-sentinel, factor-geometer, skeptic, forensic-auditor, research pipeline, hypothesis validation, post-mortem.
development
Use when building Go applications requiring concurrent programming, microservices architecture, or high-performance systems. Invoke for goroutines, channels, Go generics, gRPC integration.