Agent skill

Cs Clean Code

by ChenShuo2004 in ChenShuo2004/cs-skills

整理代码、重构、审查实现、修复已定位问题或同步开发文档时使用。聚焦需求与业务行为、最小修改和本地验证;Git 或部署收尾由 cs-ending-time 处理。

MITAuto-check passedDevelopment

Install Cs Clean Code

skills CLI
$ npx skills add ChenShuo2004/cs-skills --skill cs-clean-code -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ChenShuo2004/cs-skills cs-clean-code --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ChenShuo2004/cs-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cs-clean-code .claude/skills/cs-clean-code && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cs-clean-code
GitHub stars
191
Token cost
~267 tokens
SKILL.md length
30 words
Files
3 (incl. references)
Skills in repo
25
Repo updated
First seen
Licence
MIT

At a glance

整理代码、重构、审查实现、修复已定位问题或同步开发文档时使用。聚焦需求与业务行为、最小修改和本地验证;Git 或部署收尾由 cs-ending-time 处理。

  • Tasks that involve Code quality
  • SKILL.md covers 先定位再修改, 按风险选择工作量, 修改与验证 and 交付
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cs Clean Code is an agent skill from ChenShuo2004/cs-skills. 整理代码、重构、审查实现、修复已定位问题或同步开发文档时使用。聚焦需求与业务行为、最小修改和本地验证;Git 或部署收尾由 cs-ending-time 处理。

Its SKILL.md is about 270 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `agents/openai.yaml` and `references/review-checklist.md`).

It sits in Development, covering Code quality. It works with Git. The repository describes itself as: 陈硕的 Codex Skills 与 AI 工作流手册:把产品、内容、调研与交付沉淀为可复用的智能工作流。 The licence is MIT.

When your agent uses it

  • Tasks that involve Code quality

Example prompts

  • “/cs-clean-code”

What it can do on your machine

Read from SKILL.md and the folder at commit 9b4f19e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cs Clean Code loads about 267 tokens when it runs, and up to ~1.1k if it reads all its reference files. Until then it costs about 24 tokens; SKILL.md has 30 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~267
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ChenShuo2004/cs-skills at commit 9b4f19e, republished under its MIT licence (© ChenShuo2004). 30 words, ~267 tokens.

Download SKILL.mdSave it as .claude/skills/cs-clean-code/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
cs-clean-code
description
整理代码、重构、审查实现、修复已定位问题或同步开发文档时使用。聚焦需求与业务行为、最小修改和本地验证;Git 或部署收尾由 cs-ending-time 处理。
<!-- CS Skills · 陈硕 | https://github.com/ChenShuo2004/cs-skills -->

CS Clean Code

让实现符合需求,降低维护成本。保留现有框架、公共接口与用户改动;不为风格一致重写可用模块。

先定位再修改

读取拥有该行为的代码、相关项目指令、测试和错误证据。Bug 先复现或找到可追溯的失败路径,再解释原因和最小修复。

明确请求是审查还是修改:只要求 review 时给发现,不自动修复;要求整理、修复时直接执行。可推断的命名、目录和实现细节自行决定。

按风险选择工作量

  • 小范围重命名、删重复、文案或注释调整:直接修改并检查 diff,不强制计划卡或新增测试。
  • 行为修改:从输入、状态变化到输出追踪一条业务路径,覆盖本次缺陷与相关失败条件;复用已有测试。
  • 跨模块重构、迁移或多项验收:用简短诊断记录说明原因、影响范围、接口约束和验证方案。需要时参考 review checklist。

公共接口变化若已在用户要求内,继续实现兼容或迁移方案;只有会超出约定范围、损失用户数据或破坏他人工作且无法隔离时才需要决定。请求确认之前先完成不依赖该决定的工作。

修改与验证

沿用现有组件和依赖。修复真正拥有逻辑的模块;更新因本次行为变化失效的文档、命令或示例,不写无关历史说明。

每个行为修改保留“需求 → 修改 → 验证”的证据,可以是一段说明,不强制表格。按影响运行针对性测试、类型检查或构建;UI 行为需要真实交互证据。通过必需检查后即交付,只有新改动、失败或未解假设才扩大检查。

测试应能发现实际回归,不为可逆的小改动编写重复实现的测试。不因工具缺失冒充通过:报告失败命令、原因及仍未验证的行为。

交付

说明改了什么、原因、实际验证和剩余阻塞。Bug 修复补一句如何避免再次发生。审查以有证据的发现及文件位置开头。

只请求本地整理时不扩大为发布。若用户已要求“整理后提交/推送”,本地验证完成后继续 $cs-ending-time,沿用已有授权;若用户明确“确认后再提交”,在该处停下。

© ChenShuo2004, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in cs-clean-code of ChenShuo2004/cs-skills.

  • SKILL.md
  • agents/openai.yaml
  • references/review-checklist.md

Open the folder on GitHubat commit 9b4f19e

Compare with similar skills

Cs Clean Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cs Clean Code compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cs Clean Code this skillChenShuo2004/cs-skills191—~267Automated safety check: PassMIT
Qt C++ Code Reviewx-tools-author/x-tools1.1k2 repos~4.3kAutomated safety check: PassBSD-3-Clause
Skill Doctorwarpdotdev/common-skills6062 repos~2.6kAutomated safety check: PassMIT
Worktrunk CLI Output Rulesmax-sixty/worktrunk8.9k—~12kAutomated safety check: PassCustom licence
Adversarial Reviewer302ai/302-AI-Studio1321 repos~3kAutomated safety check: PassMIT
WebRTC Include Cleanerwebrtc-sdk/webrtc4461 repos~545Automated safety check: PassBSD-3-Clause

Similar skills

  • Qt C++ Code Review

    x-tools-author/x-tools

    Read-only review of Qt6 C++ code that combines a deterministic lint script with six parallel analysis agents and reports only high-confidence issues.

    1.1k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed
  • Skill Doctor

    warpdotdev/common-skills

    Grades agent skills by scoring agent conversations for efficiency, code quality, procedure compliance, and verbosity, then drafts concrete skill edits and a shareable report.

    606 GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Worktrunk CLI Output Rules

    max-sixty/worktrunk

    CLI output standards for worktrunk: message functions, ANSI color nesting and the shell integration that changes directory after the wt command exits.

    8.9k GitHub stars~12k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Adversarial Reviewer

    302ai/302-AI-Studio

    Adversarial code review that breaks the self-review monoculture.

    132 GitHub starsUsed in 1 repo~3k tokens
    DevelopmentAuto-check passed
  • WebRTC Include Cleaner

    webrtc-sdk/webrtc

    Runs the WebRTC include-cleaner tool to add missing and remove unused C++ include directives before uploading a CL or after refactoring.

    446 GitHub starsUsed in 1 repo~545 tokens
    DevelopmentAuto-check passed
  • Codex

    potatoqualitee/kbupdate

    Run the Codex CLI as an independent, read-only reviewer for kbupdate commits, staged changes, uncommitted changes, or selected files.

    393 GitHub stars~724 tokensUpdated 27 days ago
    DevelopmentAuto-check passed

More from ChenShuo2004/cs-skills

All 25 skills in this repo
  • Cs Checkpoint Version

    ChenShuo2004/cs-skills

    A skill your agent uses when the user asks to save the current repository version, create a rollback point, checkpoint dirty worktree changes, preserve staged/unstaged/untracked files before risky…

    191 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Cs Code Video

    ChenShuo2004/cs-skills

    用代码做动画视频:页面暴露 render(t),Playwright 逐帧截图 + FFmpeg 合成 mp4,可接合成配乐、出图和配音。通用模式先明确主题、规格、风格和声音,出风格卡、分镜与关键帧后逐镜制作;Vibe知识大赏模式额外查证来源、记录真实素材许可、先渲 10 秒样片。触发词包括…

    191 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Cs Knowledge Film

    ChenShuo2004/cs-skills

    制作明确要求暗夜星空、衬线双语字幕与金色光点风格的知识解说片,或用户显式调用 $cs-knowledge-film:从概念与画面隐喻设计,到口播、场景 spec、配音和 1080p 渲染。普通科普视频不默认套用这一视觉模板;网页产品演示、ChatCut 策划和电商视频复刻各用对应 skill。

    191 GitHub stars~806 tokensUpdated yesterday
    Auto-check passed
  • Cs Auto Videl

    ChenShuo2004/cs-skills

    A skill your agent uses when the user types $cs-auto-videl or asks for Douyin/TikTok ecommerce video workflows, including competitor replication, strong-Hook nine-grid promptimage.md to image2…

    191 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • 当用户要把产品事实、口播、数字人、产品界面和 CTA 制作成可验收的数字人产品介绍视频时使用:统一预检 ChatCut、FFmpeg、ComfyUI、Fish/TTS 与 Remotion,按 plan、sample、batch 三种模式编排,先完成可审批样片再批量或出成片。用于有明确产品包的横版/竖版产品视频流水线;不要用于通用自动剪辑、电商短视频复刻、纯视频选题策划或未经确认的批量生成与发布。

    191 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Cs Code Story Video

    ChenShuo2004/cs-skills

    把中文口播、角色和参考素材制作成可验收的 16:9 代码叙事视频:A-roll 角色讲述、全屏场景 B-roll、真实音频时码、Remotion 样片与成片、3:4/4:3 杂志风封面。仅用于代码驱动的叙事视频,不替代 ChatCut 剪辑、数字人产品片或电商复刻。

    191 GitHub stars~541 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Cs Clean Code

What does Cs Clean Code do?

整理代码、重构、审查实现、修复已定位问题或同步开发文档时使用。聚焦需求与业务行为、最小修改和本地验证;Git 或部署收尾由 cs-ending-time 处理。. Cs Clean Code is an agent skill from ChenShuo2004/cs-skills.

When should I use Cs Clean Code?

Cs Clean Code fits situations like: tasks that involve Code quality.

How do I install Cs Clean Code in Claude Code?

Run `npx skills add ChenShuo2004/cs-skills --skill cs-clean-code -a claude-code`. Or copy the skill folder (cs-clean-code in ChenShuo2004/cs-skills) into .claude/skills/cs-clean-code in your project. Claude Code loads it when a task matches its description.

How do I install Cs Clean Code in Codex?

Run `npx skills add ChenShuo2004/cs-skills --skill cs-clean-code -a codex`. Or copy the skill folder (cs-clean-code in ChenShuo2004/cs-skills) into .agents/skills/cs-clean-code in your project. Codex loads it when a task matches its description.

Can I use Cs Clean Code in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ChenShuo2004/cs-skills --skill cs-clean-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cs-clean-code, .gemini/skills/cs-clean-code, .github/skills/cs-clean-code and .opencode/skills/cs-clean-code in your project.

What does Cs Clean Code need to run?

SKILL.md names no scripts, command-line tools or credentials: Cs Clean Code is instructions for the agent only.

Does Cs Clean Code access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cs Clean Code safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cs Clean Code use?

Cs Clean Code is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cs Clean Code use?

About 267 tokens (SKILL.md is roughly 1.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 821 tokens, read only when the agent opens those files.

What are the alternatives to Cs Clean Code?

Skills that share tags, products or a category with Cs Clean Code: Qt C++ Code Review (x-tools-author/x-tools, 1.1k stars), Skill Doctor (warpdotdev/common-skills, 606 stars), Worktrunk CLI Output Rules (max-sixty/worktrunk, 8.9k stars) and Adversarial Reviewer (302ai/302-AI-Studio, 132 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cs Clean Code?

ChenShuo2004 (a GitHub user) maintains it in ChenShuo2004/cs-skills, which has 191 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 6, 2026.

Source: ChenShuo2004/cs-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.