用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Objective-Arts/lens-dist --skill clarity命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | clarity |
| description | Clarity and simplicity |
| allowed-tools | [] |
Brian Kernighan's core belief: code is read far more often than it is written. Every decision should favor the reader over the writer.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
If you cannot debug it, you wrote it wrong. Cleverness is a cost, not a benefit.
Write the clearest code that does the job. If there's a straightforward way and a clever way, choose straightforward.
Not this:
result = data and data[0] or default
This:
result = data[0] if data else default
The compiler doesn't care about clarity. Your future self does. Your teammates do.
Every clever trick is a future debugging session. Ask: "Will I understand this in six months? Will a new teammate?"
If the answer is uncertain, rewrite it simply.
"Controlling complexity is the essence of computer programming." — Brian Kernighan
Names are documentation. A well-chosen name eliminates the need for comments.
Not this:
def proc(d, f):
return [f(x) for x in d if x]
This:
def filter_and_transform(items, transform_fn):
return [transform_fn(item) for item in items if item]
Every literal value should have a name that explains its purpose.
Not this:
if retry_count > 3:
time.sleep(60)
This:
MAX_RETRIES = 3
RETRY_DELAY_SECONDS = 60
if retry_count > MAX_RETRIES:
time.sleep(RETRY_DELAY_SECONDS)
Comments should explain why, not what. If you need a comment to explain what code does, the code is too complex.
Not this:
# Increment counter by one
counter += 1
This:
# Retry count tracks attempts for circuit breaker pattern
retry_count += 1
Before committing any code, ask:
Apply these checks:
Use a different skill when:
data-first (kernel style) or simplicity (Go/systems)optimization (optimization, data-oriented design)design-patterns (design patterns) or java (defensive OO)composition (Unix philosophy, composition)correctness (formal reasoning)Kernighan is for general application code clarity—not specialized domains.
"The most effective debugging tool is still careful thought, coupled with judiciously placed print statements." — Brian Kernighan
基于 SOC 职业分类