agentleFS
vSkyfallvSkyfall/sky/skills/sky-code-style/SKILL.md

sky-code-style

Skill8 starsChanged 6 days agoMITView on GitHub

Kod stili ve otomatik kalite araçları: Biome vs ESLint (flat config) + Prettier seçimi, önerilen kural setleri (typescript-eslint, react-hooks, jsx-a11y, import sırası), EditorConfig, husky + lint-staged ile commit öncesi kontroller, commitlint, VS Code ayarları, Python (ruff), Go (gofmt, golangci-lint), Rust (rustfmt, clippy), isimlendirme ve dosya düzeni kuralları, mevcut projeye kademeli ekleme. "Lint kur", "Prettier", "Biome", "kod stili", "pre-commit" dendiğinde kullan.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Commit mesajı: commitlint + @commitlint/config-conventional (.husky/commit-msg) (bkz.

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Sky · Kod Stili & Araçlar

İlke: stil tartışılmaz, araca bırakılır. İnsanlar mantığı inceler; boşluklar, tırnaklar, import sırası otomatik.

JS/TS: seçim

SeçenekNe zaman
Biomeyeni proje, tek araç (lint + format), çok hızlı, sıfıra yakın yapılandırma
ESLint (flat) + Prettiergeniş eklenti ekosistemi gerekiyor (özel kurallar, framework eklentileri), mevcut proje

Biome

{
  "$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
  "formatter": { "indentStyle": "space", "lineWidth": 100 },
  "linter": { "rules": { "recommended": true, "correctness": { "noUnusedImports": "error" }, "suspicious": { "noConsole": "warn" } } },
  "assist": { "actions": { "source": { "organizeImports": "on" } } }
}

biome check --write . (lint + format + import düzenleme). Şema sürümünü kurulu Biome sürümüne göre ayarla.

ESLint flat config

// eslint.config.mjs
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import reactHooks from "eslint-plugin-react-hooks";
import jsxA11y from "eslint-plugin-jsx-a11y";
export default tseslint.config(
  { ignores: ["dist", ".next", "coverage"] },
  js.configs.recommended,
  ...tseslint.configs.strictTypeChecked,
  { languageOptions: { parserOptions: { projectService: true } } },
  reactHooks.configs["recommended-latest"],
  jsxA11y.flatConfigs.recommended,
  { rules: { "@typescript-eslint/consistent-type-imports": "error", "no-console": ["warn", { allow: ["warn", "error"] }] } },
);

Next.js'te eslint-config-next ekle. Prettier ile çakışan stil kurallarını kapat (eslint-config-prettier). Prettier: { "printWidth": 100 } + prettier-plugin-tailwindcss (sınıf sıralama).

Commit öncesi

// package.json
"lint-staged": { "*.{ts,tsx,js,json,css,md}": ["biome check --write --no-errors-on-unmatched"] }

npx husky init → .husky/pre-commit: npx lint-staged. Yalnızca değişen dosyalar → hızlı. Tip kontrolü ve testler pre-commit'te yavaş olabilir → pre-push veya CI. Commit mesajı: commitlint + @commitlint/config-conventional (.husky/commit-msg) (bkz. sky-git).

EditorConfig ve editör

# .editorconfig
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

.vscode/settings.json: kaydederken format, varsayılan formatter, "editor.codeActionsOnSave": { "source.fixAll": "explicit" }; .vscode/extensions.json önerilen eklentiler. .gitattributes: * text=auto eol=lf (Windows satır sonu karmaşasını bitirir).

Diğer diller

  • Python: ruff check --fix + ruff format (bkz. sky-python), pre-commit framework (.pre-commit-config.yaml).
  • Go: gofmt/goimports + golangci-lint run. Rust: cargo fmt + cargo clippy -- -D warnings.
  • PHP: Pint / PHP-CS-Fixer + PHPStan. Ruby: RuboCop. C#: dotnet format + analyzers. Kotlin: ktlint/detekt. Swift: swift-format/SwiftLint.

İsimlendirme ve düzen (dil bağımsız ilkeler)

  • İsim niyeti söyler: upcomingBookings, isEligibleForRefund; kısaltma yok (usr, bkg), tek harf yalnızca kısa döngüde.
  • Boolean: is/has/can/should öneki. Fonksiyon: fiil (calculateTotal). Sabit: MAX_RETRY.
  • Dosya adları projede tek biçim (kebab-case.ts veya bileşenler PascalCase.tsx).
  • Fonksiyon ~40 satırı, dosya ~300 satırı geçiyorsa bölmeyi düşün (bkz. sky-refactor).
  • Yorumlar neden'i anlatır; ne yaptığını kod anlatsın. Eskimiş yorum yanlış yorumdur.

Mevcut projeye ekleme

Tüm kodu tek seferde biçimlendir → ayrı commit (chore: format with biome) + .git-blame-ignore-revs dosyasına SHA ekle (blame bozulmaz). Kuralları kademeli sıkılaştır: önce warn, temizlik, sonra error.

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.