agentleFS
Baba01hacker666Baba01hacker666/tigerstyle/.agents/skills/tigerstyle/SKILL.md

tigerstyle

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Expert engineering methodology and coding standard based on TigerStyle (TigerBeetle). Enforces safety-critical principles (NASA Power of 10, >=2 assertions per function, static memory allocation at startup, explicit bounds on all loops and queues, zero technical debt), extreme performance (mechanical sympathy, primary colors, control/data plane separation, zero-copy, cache-line alignment), and developer experience (big-endian naming, 70-line function limit, 100-col rule, and explaining why). Use when designing, writing, refactoring, or reviewing mission-critical, high-performance, or safety-first software.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. thoriqakbar0/skills★ 2same name
    2. Yiorgoss/clanker_whips★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Explicit Bounds on Everything: Every loop must have an asserted upper iteration bound.

    line 61
  2. Distinctive:

    Assert Compile-Time Invariants: Check struct sizes, alignments, and constant relationships at compile time.

    line 67
  3. Very specific:

    Split Compound Assertions: Prefer assert(a); assert(b).

    line 68
  4. Very specific:

    Implication Pattern: Use single-line conditional asserts: if (condition) assert(property);.

    line 69
  5. Very specific:

    Simple, Explicit Control Flow: No recursion. Push if statements up to coordinator functions and for loops down into pure leaf workers.

    line 70
  6. Distinctive:

    Run the included verification scripts:

    line 122

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

TigerStyle Agent Skill

"Our design goals are safety, performance, and developer experience. In that order. All three are important. Good style advances these goals." — TigerStyle

TigerStyle is an engineering philosophy and coding standard born from TigerBeetle, designed for mission-critical, deterministic, and high-throughput systems. It blends NASA safety standards with mechanical sympathy and artistic craftsmanship ("biodigital jazz").


When to Apply This Skill

Activate TigerStyle when:

  1. Writing new code in systems programming (Zig, C, C++, Rust, Go) or high-reliability applications.
  2. Refactoring legacy code to eliminate technical debt, memory leaks, and latent bugs.
  3. Conducting code reviews & PR audits to enforce assertions, bounds, naming, and function constraints.
  4. Architecting high-throughput / low-latency systems where unpredictable GC pauses, dynamic allocations, or cache thrashing are unacceptable.

Core Tenets: The Three Axioms

   ┌─────────────────────────────────────────────────────────┐
   │  1. SAFETY                                              │
   │     Defense-in-depth, runtime assertions, static alloc  │
   │                                                         │
   │  2. PERFORMANCE                                         │
   │     Mechanical sympathy, primary colors, zero-copy      │
   │                                                         │
   │  3. DEVELOPER EXPERIENCE                                │
   │     Big-endian naming, 70-line limit, explaining why    │
   └─────────────────────────────────────────────────────────┘
  1. Zero Technical Debt Policy: "Code, like steel, is easier to change while it's hot." Solve showstoppers immediately in design or implementation. Never allow latent bugs or exponential complexity to pass.
  2. Zero External Dependencies: Beyond the native compiler toolchain and standard libraries, eliminate third-party dependencies to guard against supply chain vulnerabilities, performance degradation, and build friction.
  3. Simplicity is the Hardest Revision: Simplicity is not the first attempt. It is the result of multiple design passes to find the "super idea" that simultaneously resolves multiple constraints.

Quick Reference Rules

1. Safety & Correctness

  • Explicit Bounds on Everything: Every loop must have an asserted upper iteration bound. Every queue, buffer, and batch must have fixed maximum capacity.
  • Static Memory Allocation: Allocate 100% of memory at startup during initialization. Zero dynamic heap allocations (malloc, free, realloc) during steady state/data plane.
  • Relentless Assertions (Minimum 2 per function):
    • Assert function arguments, return values, preconditions, postconditions, and invariants.
    • Pair Assertions: Assert state at both ends (e.g. before disk write and immediately after disk read).
    • Assert Positive & Negative Space: Assert what is expected AND explicitly what is forbidden.
    • Assert Compile-Time Invariants: Check struct sizes, alignments, and constant relationships at compile time.
    • Split Compound Assertions: Prefer assert(a); assert(b); over assert(a and b);.
    • Implication Pattern: Use single-line conditional asserts: if (condition) assert(property);.
  • Simple, Explicit Control Flow: No recursion. Push if statements up to coordinator functions and for loops down into pure leaf workers.
  • Narrowest Variable Scope: Declare variables at the smallest possible scope. Never keep unused variables in scope (eliminates Place-of-Check to Place-of-Use bugs).
  • 70-Line Function Limit: Hard limit of 70 lines per function. Split functions into centralized coordinator functions (handling control flow) and pure leaf helpers.
  • 100% Error Handling: Handle every error explicitly. Never swallow errors.

2. Extreme Performance

  • The 4 Primary Colors: Model performance across Network, Storage, Memory, and Compute, evaluated by Bandwidth and Latency.
  • Bottleneck Hierarchy: Optimize for the slowest resource first: Network → Storage → Memory → Compute.
  • Control Plane vs. Data Plane:
    • Control Plane: Runs orchestration and extensive assertions.
    • Data Plane: Zero-copy, direct memory access, tight CPU loops, batching.
  • Zero-Copy & Zero-Deserialization: Direct wire-to-memory layouts. Align structs to cache lines (64B) and sort fields from largest to smallest to avoid padding holes.
  • In-Place Initialization: Construct large structs in place via out-pointers (target: *Struct) to eliminate stack copy/moves and prevent stack overflow.
  • Guard Against Buffer Bleeds: Explicitly zero unused padding and buffers to prevent data leaks and maintain determinism.

3. Developer Experience & Formatting

  • Big-Endian Naming: Most significant noun first, specific units/qualifiers last:
    • ✅ latency_ms_max, latency_ms_min, connection_count_limit
    • ❌ max_latency_ms, min_latency_ms, max_connections
  • Symmetrical Variable Names: Equal length for paired names so source lines align visually (e.g. source / target instead of src / dest).
  • Snake_case: Standard snake_case for functions, variables, and filenames.
  • Layout Structure: Top-down readability. Entry point / main() first. For structs: Fields → Types → Methods.
  • Style by the Numbers:
    • Maximum 100 columns per line.
    • 4 spaces indentation.
    • Explicit braces {} for multi-line control blocks.
  • Always Say Why: Comments must explain the rationale (why and how), written in full, punctuated English sentences.

Detailed References (Progressive Disclosure)

For in-depth explanations and domain deep-dives, consult:

  • 🛡️ Safety Guide: NASA Power of 10, assertion strategies, static memory, bounded loops.
  • ⚡ Performance Guide: Primary colors, mechanical sympathy, zero-copy, in-place init.
  • 📐 Developer Experience Guide: Big-endian naming, layout rules, function anatomy, 100 cols.
  • ✅ PR Review Checklist: Step-by-step checklist for TigerStyle compliance.

Reference Implementations

Explore canonical TigerStyle examples in multiple languages:

  • Zig Canonical Example
  • C Canonical Example
  • Rust Canonical Example
  • TypeScript Canonical Example

Automated Verification Tools

Run the included verification scripts:

  • Lint codebase for TigerStyle compliance:
    python3 scripts/tigerstyle_lint.py <path-to-source-files>
  • Review git diff / PR changes:
    python3 scripts/tigerstyle_review.py

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.