Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/Objective-Arts/lens-dist --skill data-firstコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SKILL.md を表示中
SOC 職業分類に基づく
| name | data-first |
| description | Kernel style and good taste |
| allowed-tools | [] |
Linus Torvalds' core belief: Good taste is recognizing the difference between ugly code that works and beautiful code that works. Both function. One is maintainable.
"Talk is cheap. Show me the code."
Don't explain what you're going to do. Do it. Let the code speak. If your code needs extensive explanation, it's probably wrong.
From Linus's TED talk, the canonical example of taste:
No taste (works, but ugly):
void remove_list_entry(list *entry) {
list *prev = NULL;
list *walk = head;
while (walk != entry) {
prev = walk;
walk = walk->next;
}
// Special case for head
if (!prev)
head = entry->next;
else
prev->next = entry->next;
}
Good taste (works, and beautiful):
void remove_list_entry(list *entry) {
list **indirect = &head;
while (*indirect != entry)
indirect = &(*indirect)->next;
*indirect = entry->next;
}
The second version has no special cases. No if statement. The edge case (removing the head) is handled by the structure of the code, not by explicit logic.
"I don't want you to understand why it doesn't have the if statement. I want you to understand that this is how I want you to design your code."
"Bad programmers worry about the code. Good programmers worry about data structures and their relationships."
Get the data structures right. The code will follow naturally. If your code is complicated, you probably have the wrong data structures.
Not this:
// Complex algorithm to work around poor data structure
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
if (matrix[i][j].type == TYPE_A &&
matrix[i][j].state == STATE_ACTIVE &&
/* 10 more conditions */) {
// Finally found it
}
}
}
This:
// Right data structure makes code trivial
struct active_type_a *item = lookup_table[id];
"I don't like debuggers. Never have, probably never will."
Debuggers encourage a bad workflow: write code, run debugger, fix symptom, repeat. Instead:
printk/printf strategically to verify assumptionsIf you need a debugger to understand your code, your code is too complex.
"Abstraction is powerful. But abstraction is also evil."
Every abstraction has a cost. Layers of indirection make code harder to understand and debug. Sometimes the "ugly" direct approach is actually better.
Not this:
// Over-abstracted
interface->vtable->operations->read(interface->context,
buffer_manager_get_buffer(mgr),
size_calculator_compute(calc));
This:
// Direct
read(fd, buf, size);
"C++ is a horrible language... designed to be a way to shoot yourself in the foot."
Linus's view: C++ encourages abstraction for abstraction's sake. It hides what the machine is actually doing. For systems code, you need to see the machine.
This doesn't mean C++ is always wrong. It means: know what your code is doing at the machine level.
From Documentation/process/coding-style.rst:
8-character tabs. Not 4. Not 2. 8.
"Tabs are 8 characters. If you need more than 3 levels of indentation, you're screwed anyway and should fix your program."
Deep nesting is a code smell. If you need 4+ levels, refactor.
80 characters. Not 100. Not 120. 80.
This forces you to:
K&R style. Opening brace at end of line, closing brace on its own line:
if (condition) {
do_something();
} else {
do_other();
}
Exception: functions have opening brace on new line:
int function(int x)
{
return x + 1;
}
get_page_count()i, tmp, plpszFoo nonsense"Local variable names should be short, and to the point. If you have a random integer loop counter, it should probably be called 'i'."
Should be short and do one thing. If your function scrolls off the screen, it's too long.
"Functions should be short and sweet, and do just one thing."
Maximum: ~48 lines as a general guideline.
Comment the why, not the what:
Not this:
// Increment i
i++;
This:
// Skip the header row which contains column names, not data
i++;
Avoid them for structures. They hide what things are:
Not this:
typedef struct {
int x, y;
} Point;
This:
struct point {
int x, y;
};
Exception: Opaque types, integer types, and sparse annotations.
Linus is famous for harsh feedback. But there's a method:
Before committing code, ask:
Apply these checks:
Use a different skill when:
simplicity (Go Proverbs, Go idioms, small interfaces)optimization (functional core, cache optimization, profiling)clarity (general clarity, language-agnostic principles)distributed (NFS principles, statelessness, scale)composition (Unix philosophy, pipes, composition)correctness (formal methods, invariants)Linus is the Linux kernel skill—use it for kernel-style C, data structure design, and eliminating special cases.
"I'm a bastard. I have absolutely no languge of any kind." — Linus Torvalds
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." — Linus Torvalds