data-first

Guide C code design with data structures and Linux kernel style.

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/Objective-Arts/lens-dist --skill data-first-objective-arts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-first
Source: https://github.com/Objective-Arts/lens-dist/tree/main/canon/data-first
Command: npx skills add https://github.com/Objective-Arts/lens-dist --skill data-first-objective-arts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write cleaner, more maintainable C code by adhering to Linus Torvalds' principles of good taste, focusing on data structures, simplicity, and eliminating unnecessary complexity.

Core Features & Use Cases

  • Data Structure Design: Prioritize data structures over algorithms for simpler code.
  • Code Style Enforcement: Adhere to Linux kernel coding style (indentation, line length, braces, naming).
  • Eliminate Special Cases: Refactor code to handle edge cases through structure, not if statements.
  • Use Case: Reviewing a complex C function and refactoring it to be more readable and robust by applying Linus's principles, or ensuring new code follows kernel style guidelines.

Quick Start

Apply the data-first skill to refactor the provided C code snippet to eliminate special cases and improve data structure design.

Frequently Asked Questions about data-first

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor C code to eliminate special cases and reduce nesting?

Refactor C code by prioritizing data structure design over algorithms to eliminate special cases and reduce deep nesting. This approach handles edge cases through structural definitions rather than complex if statements, producing more maintainable systems code.

What is the best way to enforce Linux kernel coding style in my project?

Enforce Linux kernel coding style by applying guidelines for indentation, line length, braces, and naming conventions. This ensures your C code adheres to standard kernel practices, improving readability and consistency across your software engineering project.

Why does prioritizing data structures over algorithms improve C code maintainability?

Prioritizing data structures over algorithms improves C code maintainability because well-designed structures inherently eliminate edge cases and reduce special handling. This creates elegant, understandable systems code that requires fewer conditional branches and less complex logic.

Can I use this refactoring approach for general C code or only Linux kernel development?

You can use this refactoring approach for general C code development, not just Linux kernel development. While it enforces kernel coding style guidelines, the principles of data structure design and eliminating over-abstraction apply to any maintainable C systems programming project.

How do I fix over-abstraction in complex C functions?

Fix over-abstraction in complex C functions by refactoring to prioritize simplicity and data structure design. Eliminate unnecessary special case handling and reduce deep nesting by restructuring data models to handle edge cases inherently.

When should I avoid adding special case if statements in C code?

Avoid adding special case if statements in C code when you can refactor the underlying data structures to handle those edge cases inherently. Eliminating special cases through structural design reduces deep nesting and produces cleaner, more maintainable systems code.