coding-style
Skill1 starsChanged 4 days agoMITView on GitHub
Tsukini's coding style for every language other than C++ (derived from cpp-style and from his real Python, shell, Lua, YAML and CMake code) - naming, 4-space indentation, layout in sections, error handling, explicit types, English. Python, shell/bash, Lua, JavaScript/TypeScript, Rust, Go, Java/C#, C, assembly (NASM x86-64), YAML/JSON and a fallback for any language. Use whenever writing, editing, refactoring or reviewing non-C++ code for the user (C++: cpp-style; CMake: cmake-style; comments: comments).
- Pipes a download into a shell
14 other projects use a version of this.
Adopted by
Most recently taken up by
- quarkiverse/quarkus-langchain4jtheir own version, first seen Nov 16, 2026
- TsukiNi22/skillsword for word, first seen Nov 16, 2026
- static-web-server/static-web-servertheir own version, first seen Nov 9, 2026
- thunderstormwang/AgentSkillstheir own version, first seen Nov 6, 2026
- els0r/skillstheir own version, first seen Oct 13, 2026
- AltraMayor/f3their own version, first seen Oct 8, 2026
Other versions14 projects use a version of this.
Word for word · 1
- TsukiNi22/skills★ 1100% same
Edited · 0
None found.
Wrote their own version · 13
- quarkusio/quarkus★ 16ksame name
- AltraMayor/f3★ 3.4ksame name
- static-web-server/static-web-server★ 2.4ksame name
- quarkiverse/quarkus-langchain4j★ 325same name
- codetesla51/skills★ 32same name
- Fuwn/suckless-agent-skills★ 18same name
- RichieHakim/agent_skills★ 5same name
- 26zl/universal-agent-skills★ 3same name
- els0r/skills★ 1same name
- loboking/gemini-skills★ 1same name
3 more not listed
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 repository70 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ask-at-endSkill
- clarifySkill
- continue-workSkill
- exportSkill
- full-permissionSkill
- ideationSkill
- interactive-questionsSkill
- onboardSkill
- pauseSkill
- presentationSkill
- rtkSkill
- setup-contextSkill
- write-like-meSkill
- audit-bugsSkill
- audit-depsSkill
- audit-qualitySkill
- audit-securitySkill
- benchmarkSkill
- cmake-styleSkill
- cpp-classSkill
- cpp-commentsSkill
- cpp-projectSkill
- cpp-styleSkill
- better-explain-docSkill
- better-html-docSkill
- better-html-styleSkill
- better-protocol-docSkill
- docs-updateSkill
- explain-docSkill
- html-docSkill
- html-styleSkill
- protocol-docSkill
- readme-styleSkill
- reportSkill
- wiki-styleSkill
- ci-cdSkill
- git-commitSkill
- git-conventionsSkill
- pre-commitSkill
- legal-checkSkill
- legal-setupSkill
- licenseSkill
- libutils-exceptionSkill
- libutils-installSkill
- libutils-setupSkill
- libutilsSkill
- python-classSkill
- python-commentsSkill
- python-projectSkill
- python-styleSkill
- auditSkill
- cppSkill
- devSkill
- docSkill
- gitSkill
- legalSkill
- pythonSkill
- setup-projectSkill
- styleSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
2
Distinctive
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
- Distinctive: line 16
Explicit over implicit: write the types when the language allows it (TS types, Python type hints for parameters/returns, Rust/Go explicit …
- Very specific: line 23
Errors: never silent. Message on stderr naming the file/context, explicit exit code (0 ok, 1 error, 255 special/fatal), early returns, …
- Very specific: line 112
Always quote expansions ("$var", "$@"), [[ ]] for tests, command -v to check tools (require curl), errors on stderr (>&2) with Error: ..., …
- Very specific: line 176
Every function label carries the comment of its registers (.
- Distinctive: line 189
Follow the closest existing file of the project.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tsukini coding style (any language except C++)
The C++ rules (cpp-style) are the reference: the same spirit applies everywhere. When editing an existing file, its
local style wins. Comments: the comments skill. Everything (code, identifiers, comments, messages) in English.
Common rules
- 4 spaces, never tabs (except where the language requires them: Makefile recipes, Go
gofmt). No trailing whitespace, one empty line between blocks, never two. - Explicit over implicit: write the types when the language allows it (TS types, Python type hints for
parameters/returns, Rust/Go explicit types on public items); no
any/ untypedvar/ inferred public APIs unless the user asks (same rule as noautoin C++, iterators and destructuring excepted). - Naming: types
PascalCase, functions/methodscamelCase(Python, shell, Rust, C:snake_caseas the language wants), constantsUPPER_SNAKE, private members_namewhere the language has noprivate, special mode flagssnake_casewith a default value. - Layout in sections with the banner of the language (see below): imports / constants / tools / program.
- Errors: never silent. Message on stderr naming the file/context, explicit exit code (
0ok,1error,255special/fatal), early returns, failsafe options rather than crashes. - Short functions, early returns, no magic number (named constant with a trailing comment), no dead code (kept commented only when it is a real alternative).
- Alignment: columns only within a group of consecutive lines of the same category (the setters, the getters,
the cases of one switch), tight (the longest line of the group + one space, counted, never guessed: not a
space more on the longest line, no line padded past the column), every line of the group on that column.
Lengths far apart (a jump of more than ~12 columns): align by levels - the short lines together on their tight
column, the long ones on theirs, short level first, no blank line between (categories mixed if needed); a level
needs two lines or more, a lone line joins the closest level and takes its column (see
cpp-style, checked in C++ by xstyleCPP-ONELINER-ALIGN). Trailing comments are glued to the code, one space before the marker (timeout = 7 # seconds,int fd = -1; // closed), never on a shared column; the exceptions are the include / import comments (one column per block) and formats whose own convention aligns (CMake option lists, the trailing;comments of consecutive assembly lines). Imports / includes explicit (no wildcard import), always in this order (same rule as the C++ includes of
cpp-style):- what the personal libraries need before being imported (a C
#define, an environment variable, a path added tosys.path...); - the personal libraries (the user's own libraries / packages);
- the project modules, each with what it needs (define, setting) on the line just before it;
- the external and standard libraries, each with what it needs on the line just before it.
Inside each group: the longest module name first, down to the shortest; between names of the same length, the most complex / specialized module first. When the project enforces another order with a tool (
gofmt/goimports,rustfmt,isort/ruff, eslintimport/order), the tool's order wins.- what the personal libraries need before being imported (a C
Python (from libutils cmake/scripts/*.py)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" # Xartania header (comments skill)
...
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
##### Import #####
# Import that can't be in the try
from sys import exit, stderr
# Import that can be checked
try:
from pathlib import Path # Used to create & edit files
import json # Used to get the json data
except ImportError as e:
stderr.write(f"Import Error ({__file__}): {e}\n")
exit(255)
# Check if the program is call and not imported
if __name__ != "__main__":
stderr.write(f"The {__file__} can only be executed and not imported!\n")
exit(255)
##### Tools #####
def uint64_hash(s: str) -> int:
...
##### Program #####from module import nameexplicit, each import with a trailing# Used for ...; optional dependencies in atrywith an explicit error.- Constants in
@dataclass(frozen=True)classes (Return.OK,Error.FATAL), shared in aconst.py. snake_casefunctions/variables, f-strings,with open(..., encoding="utf-8"),stderr.write+exit(code)for errors (no bareprintfor errors), guard__main__(script) or the opposite (module only imported).- Type hints on new functions (
-> int), no docstrings in scripts (a trailing comment is enough); a class keeps a short indented docstring likeconst.py.
Shell / bash (from libutils / context-forge setup.sh, check_files.sh)
#!/bin/bash
set -euo pipefail
BASE_URL="https://..."
SUDO="sudo"
# =========================
# Parse arguments
# =========================
usage() {
echo "Usage: $0 [--no-sudo]"
exit 1
}
for arg in "$@"; do
case "$arg" in
--no-sudo) SUDO="" ;;
-h|--help) usage ;;
*) echo "Error: unknown argument '$arg'" >&2; usage ;;
esac
doneset -euo pipefail,#!/bin/bash(bash features used), configuration variablesUPPER_SNAKEat the top, functionssnake_case(install_rpm_repo,is_rpm_based), sections with the 3-line# =====banner.- Always quote expansions (
"$var","$@"),[[ ]]for tests,command -vto check tools (require curl), errors on stderr (>&2) withError: ...,usage()printing the help and exiting. - Long options
--name, a-h|--help,$SUDOvariable to allow--no-sudo; idempotent scripts (re-running changes nothing), markers# >>> name >>>/# <<< name <<<for blocks written in user files.
Lua (from ~/.config/nvim)
- 4 spaces,
localeverything,snake_case/camelCaselike the surrounding file,require 'module'for configs, a module returns a table or a function (return function() ... end). - Settings one per line with an aligned trailing comment (
-- What it does (default: x)).
JavaScript / TypeScript
- TypeScript preferred,
strict, explicit types on parameters/returns/exports, noany;constby default,camelCasefunctions,PascalCaseclasses/types,UPPER_SNAKEconstants, 4 spaces, semicolons, double quotes. - Errors: throw
Errorsubclasses with a context message, never swallow them;async/awaitover raw promises. - Self-contained HTML pages: inline script in an IIFE with
"use strict"(like the html-doc templates).
Rust / Go / Java / C#
- Language conventions for naming (
rustfmt,gofmt, ...) but the user's spirit: explicit types on public items, early returns, errors propagated with context (Result+?with a message, Gofmt.Errorf("...: %w", err)), no panic/exit in libraries, constants named.
C
- Same layout as the C++ (
cpp-style/cpp-classsections, include guardNAME_Hwith its content indented, braces, spacing, include order and comments,(void)for an empty parameter list), the same file header as the C++ (XARTANIA banner, none or a text, percomments); a.his C when the project has no C++ sources. - Pointer on the type, like the C++:
char* buf,node_t* new_node(void);. - Names: functions, parameters, variables
snake_case;struct name_s/union name_u/enum name_ewith theirtypedef ... name_t;; enum values, macros and global constantsUPPER_SNAKE. - Functions return
OK/KO(or an error code /NULL) and test their pointer parameters before using them (if (!data || !input) return KO;first); a result is never ignored silently: use it, or(void)f(x);on purpose. - A function body stays under 40 lines of code (empty and comment lines not counted) and 4 nested control
blocks (
if/for/while/switch/do/else, a bare{ }is not a level): early returns, or an inner function. - C / C++ preprocessor: a conditional (
#if/#ifdef/#else/#endif) at the indentation of the code around it, its content one level more, one conditional per section of a header (cpp-style"Indentation & braces").
Assembly (NASM x86-64)
- NASM (Intel) syntax,
.asm(.s/.Sread as NASM; GAS files keep their own syntax). Everything lower case (mnemonics, registers, sizes, directives) except the constants. - File: the C / C++ header in
;comments, thenexternat the top, the sections in the order.data,.rodata,.bss,.text, theglobalright aftersection .text(one per line, each defined in the file, no unusedextern). - Indentation:
sectionand the function labels at column 0, their content at 4; a local label (.loop) at the level of its block and its content one level more, up to its last backward jump (a loop), else up to the next label; a comment line at the level of the code under it.
section .text
global my_strlen
my_strlen: ; in: rdi | out: rax
xor rax, rax
.loop:
cmp byte [rdi + rax], 0
je .end
inc rax
jmp .loop
.end:
ret- Names: labels
snake_case, static functions (called, notglobal) prefixed by_(_my_helper), the global ones never (_startexcepted), the jump labels local (.name), data labelssnake_case(never a register name),equ/%define/%assign/%macroinUPPER_SNAKE. - Every function label carries the comment of its registers (
; in: rdi, rsi | out: rax); amov rax, Nbefore asyscallnames it (mov rax, 1 ; write); the trailing comments of consecutive lines on one column. - Functions: never fall through into the next one (end with
ret/jmp/ the exit syscall); a global function keepsrbx,rbp,r12-r15(System V:push/popthem); a stack frame (push rbp/mov rbp, rsp) only when the stack is used (push / pop,call,[rbp]/[rsp],sub rsp) and restored (pop rbp/leave) before everyret;xor reg, regrather thanmov reg, 0.
YAML / JSON / config
- YAML: 2 spaces (format constraint), keys
snake_caseor the tool's convention, GitHub workflows namedName - Kind (CI|CD), every step has aname:,set -e/set -euo pipefailin multi-linerun:. - JSON: 4 spaces, no trailing comma, keys
snake_case(or the format's convention).
Any other language
Follow the closest existing file of the project; otherwise the common rules above with the language's official formatter conventions, and say that no specific rule covers it.
Checking
xstyle (TsukiNi22/xstyle, curl -fsSL https://tsukini22.github.io/my-universe/install.sh | bash -s then sudo dnf|apt|pacman install xstyle (packages of my-universe, sources: TsukiNi22/xstyle; no curl: wget -qO- instead of curl -fsSL)) checks the generic rules of every language (tabs, trailing
spaces, empty lines, indentation by 4, TODO tags) the C ones (C-*: names, x_s / x_t, pointers tested before use, ignored results, 40 lines, 4 levels), the
assembly ones (ASM-*: layout, names, declarations, ABI, stack frame, fall through, syscall names) and the Python /
shell ones (wildcard imports, bare except:,
type hints, print to stderr, open without encoding, shebang, set -euo pipefail, [[ ]]) and the Rust ones
(unwrap / panic! / todo! outside the tests, glob imports, naming, unsafe without // SAFETY:, errors on
stdout, dbg!): when it is installed,
run xstyle --rtk <paths> -r on the files written or reviewed, xstyle --rtk --fix for the fixable ones.
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
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.

