code-clean

Featured

Cut dead code and over-long comments from termio's Swift, verifying every deletion against a build. Knows this repo's real failure mode (essay-length doc comments, not restated-code slop) and periphery's four known false-positive shapes. Invoke when the user says 'clean dead code', 'clean up the comments', 'the comments are too long', 'remove unused code', 'tighten this file', '清理死代码', '注释太啰嗦', '精简一下注释'.

AI & Automation 436 stars 36 forks Updated today MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
88
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Code Clean Two passes over termio's Swift: **dead code** (symbols nothing reaches) and **over-long comments** (prose that outgrew what it explains). Both end in a build. Neither is a refactor. This is not a generic AI-slop sweep. Run one on this repo and it finds nothing: a 2026-08 survey of all 69k tracked Swift lines turned up **1 TODO** (a false match on an `mktemp` template), **0 commented-out code blocks**, and **1 deliberate debug print**. Don't spend the pass hunting those. The bloat here is shaped differently, and §2 is where it lives. ## Scope Default to the current branch's diff against `origin/main`. A whole-tree pass is a standing request only — say so, and expect it to take real time. Never touch: - `Sources/termio/Editor/Highlightr/` — vendored; upstream API surface is kept intact on purpose (AGENTS.md). - Anything under `skills/` recorded in `skills-lock.json` — re-pull from upstream instead of hand-editing. - `ios/build/`, `ios/build-sim/` — Xcode artifacts, not tracked source. They hold ~100k lines of SPM checkouts that will swamp any tree-wide grep. Scope greps with `git ls-files`, never bare `find ios`. ## 1. Dead code `periphery scan --targets termio` (SPM; no config file needed). It is installed at `/opt/homebrew/bin/periphery`. **Roughly three of every four hits are false.** Four shapes account for nearly all of them — clear each before deleting anything: 1. **Retain-holders.** `private var toolbarDelegate / menuBar / hookListener / ...

Details

Author
termio-sh
Repository
termio-sh/termio
Created
3 months ago
Last Updated
today
Language
Swift
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

clean-code

Remove dead code, fix duplication, enforce naming conventions, and optimize imports in modified files

1 Updated 2 days ago
AnotherSava
Code & Development Listed

cleanup

Removes dead code in the area the current prompt is about, verifying every callsite of what it touches first so nothing regresses. Read the ask, find what's actually unreachable, prove it, then delete. Use when the user says "cleanup", "remove dead code", or "tidy this up".

0 Updated 5 days ago
LinardsLiepenieks
Code & Development Listed

spring-clean

Deep-clean and simplify a whole repo or codebase, then leave guardrails so it stays clean. Delete dead surfaces, gitignore build artifacts, relocate dev docs, notes, clones and dumps to the project's workspace repo (the assistant-dev home base), split oversized files and functions, unify duplicated logic, draw package boundaries, run a clean-code pass (naming, function size, DRY, KISS, magic numbers, linter-warning burn-down), and encode the rules as architecture tests. Use when the user asks to clean up, declutter, tidy, simplify, restructure, or modularize a repo, asks for clean code or SOLID, wants dev docs moved out of the code tree, says "spring clean", "housekeeping", "خونه تکونی", "تمیزکاری", "کلین کد", "ساده‌سازی کدبیس", "ریپو رو مرتب کن", complains that the repo is a mess or a file is huge, or wants dead code removed and LoC reduced. Repo-scale work on the whole tree or a subtree, not a single diff.

11 Updated yesterday
smk-labs