clean-comments
Remove comments that fail ~/.claude/rules/comments.md from source files.
Skill by O-Marsters-1997
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/o-marsters-1997-clean-comments
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/clean-comments
What's inside
- Skill name
clean-comments- Description
- Remove comments that fail ~/.claude/rules/comments.md from source files. Use when user wants to clean comments, remove redundant comments, strip obvious comments, or run /clean-comments on staged files before committing.
- License
- MIT
- Instructions
- 59 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Clean comments ## The standard `~/.claude/rules/comments.md` decides what earns a comment. It is the only copy. Read it before editing a file and apply it as written. Do not restate it here, and do not work from memory of it. A subagent running this skill may not have it loaded, so read the file. If a case it does not cover comes up, the fix belongs in `comments.md`, not in this skill. Deleting a load-bearing directive is the one unrecoverable mistake this skill can make. Leave these alone: `//go:build`, `// +build`, `//go:generate`, `// prettier-ignore`, `# fmt:`, `# -*- coding:`, shebangs. Suppressions are not on that list. `@ts-ignore`, `eslint-disable`, `# type: ignore`, `//nolint` are debt under `comments.md` § Suppressions. Report them and say what each is silencing. Never delete one in this pass: removing a suppression breaks the build or the lint run, which is a code change, and this skill does not make those. ## Quick start Run on staged files before a commit: ``` /clean-comments ``` Run on specific files: ``` /clean-comments src/foo.ts src/bar.go ``` ## Workflow 1. Read `~/.claude/rules/comments.md` 2. If arguments are provided, treat them as file paths to clean 3. If no arguments, get staged files: `git diff --cached --name-only --diff-filter=ACM` 4. Filter to code files (`.go`, `.ts`, `.tsx`, `.js`, `.jsx`, `.py`, `.rs`) 5. For each file, read it, remove the comments that fail the standard, write it back 6. Re-stage any modified files: `git add <file>` 7. Report what was removed and from which files; if nothing needed removing, say so Comment-only edits. Never change code in the same pass. ## The commit hook `~/.claude/hooks/check-staged-comments.sh` runs on `PreToolUse` for Bash and blocks `git commit` when the staged diff adds comment lines. It ignores directives, and reads `#` as a comment marker in Python only. Trimming a long doc comment counts as adding lines, so a cleanup pass trips it. When every remaining comment earns its place, say so and commit with: ``` CC_COMMENTS_REVIEWED=1 git commit ... ```
From O-Marsters-1997/my-claude-code, MIT.
More from O-Marsters-1997/my-claude-code
- 0.570score
go-testing
O-Marsters-1997
How Go tests are written in these repos: assertions, tables, test doubles, helpers, async waits, golden files, fuzzing, benchmarks, and integration tests…
SkillAFreshness: AClaude Code +9 - 0.570score
frontend-best-practices
O-Marsters-1997
Frontend engineering standards — component architecture, state, async, forms, accessibility, performance and TypeScript discipline.
SkillAFreshness: AClaude Code +9 - 0.570score
go-idiomatic
O-Marsters-1997
Go engineering standards for this repo — package layout, error handling, logging, testing, concurrency and design patterns.
SkillAFreshness: AClaude Code +9 - 0.570score
htmx-go-templates
O-Marsters-1997
htmx on Go html/template: how a handler picks page, fragment or redirect, how templates carry hx-* attributes, where client JS lives, and how errors and…
SkillAFreshness: AClaude Code +9 - 0.566score
postgres-best-practices
O-Marsters-1997
Postgres schema and query rules, independent of the calling language.
SkillAFreshness: AClaude Code +9 - 0.565score
record-decision
O-Marsters-1997
Capture a design or architecture decision as an ADR in docs/adr/ and update CONTEXT.md if terminology is affected.
SkillAFreshness: AClaude Code +9 - 0.539score
tdd
O-Marsters-1997
Use when implementing any feature or fixing any bug.
SkillAFreshness: AClaude Code +9 - 0.539score
testing-policy-creator
O-Marsters-1997
Writes, or brings up to date, a repo's own testing-policy skill at .claude/skills/testing-policy/SKILL.md: which code gets which kind of test, with which…
SkillAFreshness: AClaude Code +9 - 0.539score
code-review
O-Marsters-1997
Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".
SkillAFreshness: AClaude Code +9 - 0.539score
codebase-design
O-Marsters-1997
Shared vocabulary for designing deep modules.
SkillAFreshness: AClaude Code +9 - 0.529score
tailwind-design-system
O-Marsters-1997
Tailwind CSS v4 design system architecture: CSS-first `@theme` configuration, the brand/semantic/component token hierarchy, OKLCH colour, CVA component…
SkillBFreshness: BClaude Code +9 - 0.529score
architecture-review
O-Marsters-1997
Use when the user wants an architecture review, a design health check, a staff-level read on architectural risk, or an assessment of coupling and cohesion…
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 10
- Last commit (this folder)
- Sep 27, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from O-Marsters-1997
- 0.570score
go-testing
O-Marsters-1997
How Go tests are written in these repos: assertions, tables, test doubles, helpers, async waits, golden files, fuzzing, benchmarks, and integration tests…
SkillAFreshness: AClaude Code +9 - 0.570score
frontend-best-practices
O-Marsters-1997
Frontend engineering standards — component architecture, state, async, forms, accessibility, performance and TypeScript discipline.
SkillAFreshness: AClaude Code +9 - 0.570score
go-idiomatic
O-Marsters-1997
Go engineering standards for this repo — package layout, error handling, logging, testing, concurrency and design patterns.
SkillAFreshness: AClaude Code +9 - 0.570score
htmx-go-templates
O-Marsters-1997
htmx on Go html/template: how a handler picks page, fragment or redirect, how templates carry hx-* attributes, where client JS lives, and how errors and…
SkillAFreshness: AClaude Code +9 - 0.566score
postgres-best-practices
O-Marsters-1997
Postgres schema and query rules, independent of the calling language.
SkillAFreshness: AClaude Code +9 - 0.565score
record-decision
O-Marsters-1997
Capture a design or architecture decision as an ADR in docs/adr/ and update CONTEXT.md if terminology is affected.
SkillAFreshness: AClaude Code +9
Cite this page
clean-comments skill. Agent Mart. https://agentmart.dev/skills/o-marsters-1997-clean-comments (last updated 2026-10-24)