Syntax rules
Apply language-specific coding standards, conventions, and syntax rules across 18 languages plus universal common rules. Use when writing, reviewing, or refactoring code in any language — enforces coding style, testing patterns, security practices, error handling, naming conventions, immutability principles, and project structure. Triggers on "coding standards", "code style", "syntax rules", "coding conventions", "apply rules", "follow conventions", "enforce style", "lint rules", or when writing code in any supported language. Covers TypeScript, JavaScript, Python, Rust, Go, Java, Kotlin, Swift, C++, C#, PHP, Dart, Angular, ArkTS, F#, Perl, web/frontend, and Chinese-language rules.From its SKILL.md
npx -y skills add NafisRayan/100x-Agent-Toolkit --skill syntax-rulesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
8.0 KB, ~1.8k tokens by cl100k_base, as published. Nobody here has run it
Syntax Rules — Language-Specific Coding Standards
A two-layer rules engine: common universal principles + 18 language-specific extensions that override common defaults where idioms differ.
Architecture
references/
├── common/ # 10 universal rule files (ALWAYS loaded)
│ ├── agents.md # Agent orchestration patterns
│ ├── code-review.md # Review checklist, severity levels, workflow
│ ├── coding-style.md # KISS/DRY/YAGNI, immutability, naming, file org
│ ├── development-workflow.md # Research -> Plan -> TDD -> Review -> Commit
│ ├── git-workflow.md # Conventional commits, PR process
│ ├── hooks.md # PreToolUse/PostToolUse/Stop hooks
│ ├── patterns.md # Repository pattern, API response envelope
│ ├── performance.md # Model selection, context window, extended thinking
│ ├── security.md # Pre-commit checks, secret management, response protocol
│ └── testing.md # 80% coverage, TDD (RED/GREEN/IMPROVE), AAA pattern
│
├── typescript/ # TS/JS: type safety, Zod validation, React props, Playwright E2E
├── angular/ # Angular: component patterns, RxJS, dependency injection
├── arkts/ # HarmonyOS/ArkTS: V2 state management, Navigation routing
├── cpp/ # C++: RAII, modern C++17/20/23, clang-format
├── csharp/ # C#: .NET conventions, async, nullable reference types
├── dart/ # Dart/Flutter: widget patterns, state management
├── fsharp/ # F#: functional idioms, computation expressions
├── golang/ # Go: interfaces, error wrapping, gofmt
├── java/ # Java: records, sealed types, Optional, streams
├── kotlin/ # Kotlin: null safety, sealed classes, coroutines, scope functions
├── perl/ # Perl: modern Perl patterns
├── php/ # PHP: PSR-12, strict types, readonly properties
├── python/ # Python: PEP 8, type annotations, pytest + FastAPI extension
├── rust/ # Rust: ownership, Result/?, thiserror/anyhow, iterators
├── swift/ # Swift: value semantics, Sendable, typed throws, actors
├── web/ # Web/Frontend: design quality, performance, accessibility
└── zh/ # Chinese translations of all common rules
When to Use
| Trigger | Action |
|---|---|
| Writing new code in any language | Load common/ + target language rules |
| Reviewing code | Load common/code-review.md + language rules |
| Fixing code style issues | Load language coding-style.md + common/coding-style.md |
| Setting up a new project | Load common/development-workflow.md + language rules |
| Security audit | Load common/security.md + language security.md |
| Writing tests | Load common/testing.md + language testing.md |
| Configuring hooks | Load common/hooks.md + language hooks.md |
Workflow
Step 1: Detect Language
Identify the target language(s) from:
- File extensions (
.ts,.py,.rs,.go,.java,.kt,.swift,.cpp,.cs,.php,.dart,.fs,.pl,.ets) - Project config files (
tsconfig.json,pyproject.toml,Cargo.toml,go.mod,pom.xml,build.gradle,Package.swift,CMakeLists.txt,composer.json,pubspec.yaml,.fsproj,angular.json) - User-specified language
Step 2: Load Rules
Always load references/common/ (10 files) — these are universal non-negotiable principles.
Then load the matching language directory:
- Each language has 5 core files:
coding-style.md,testing.md,patterns.md,security.md,hooks.md - Python has an extra:
fastapi.md - Web has two extras:
design-quality.md,performance.md
Priority: Language-specific rules override common rules when they conflict (specific > general).
Step 3: Apply Rules
Apply rules according to context:
When writing code:
- Follow language
coding-style.mdfor naming, formatting, immutability, error handling - Follow language
patterns.mdfor idiomatic design patterns - Follow
common/development-workflow.mdfor the implementation process - Validate input per
common/coding-style.mdand languagesecurity.md
When reviewing code:
- Use
common/code-review.mdchecklist (severity levels: CRITICAL/HIGH/MEDIUM/LOW) - Check security triggers from
common/security.md - Apply language-specific style checks from language
coding-style.md - Verify test coverage >= 80% per
common/testing.md
When writing tests:
- Follow TDD cycle from
common/testing.md: RED -> GREEN -> IMPROVE - Use AAA pattern (Arrange-Act-Assert)
- Apply language-specific test framework guidance from language
testing.md - Target 80%+ coverage minimum
Step 4: Report Violations
When violations are found, report them using the severity framework from common/code-review.md:
| Level | Meaning | Action |
|---|---|---|
| CRITICAL | Security vulnerability or data loss risk | BLOCK — Must fix immediately |
| HIGH | Bug or significant quality issue | WARN — Should fix before merge |
| MEDIUM | Maintainability concern | INFO — Consider fixing |
| LOW | Style or minor suggestion | NOTE — Optional |
Key Principles Summary
Immutability (CRITICAL — all languages)
- Create new objects, never mutate existing ones
- Language implementations: spread operator (TS), frozen dataclasses (Python),
letby default (Rust/Swift),val(Kotlin),record(Java),Readonly<>(C#)
Security (CRITICAL — all languages)
- Never hardcode secrets
- Always validate input at system boundaries
- Use parameterized queries
- No
console.log/printin production
Testing (MANDATORY — all languages)
- 80% minimum coverage
- TDD workflow: write test first, watch it fail, implement, refactor
- AAA pattern for test structure
- All three test types required: unit + integration + E2E
Error Handling (MANDATORY — all languages)
- Handle errors explicitly at every level
- Never silently swallow errors
- Use language-appropriate error types (Result, Either, exceptions, etc.)
File Organization (ALL languages)
- Many small files > few large files
- 200-400 lines typical, 800 max
- Organize by feature/domain, not by type
Multi-Language Projects
For projects using multiple languages (e.g., TypeScript frontend + Python backend):
- Load
common/rules once - Load each language's rules independently
- Apply each language's rules only to its respective files
- Cross-cutting concerns (security, testing, git workflow) use common rules
Rebuttals
| Excuse | Rebuttal |
|---|---|
| "I'll add tests later" | No. TDD is mandatory. Write the test first. |
| "This style is fine for now" | Consistency matters. Follow the language conventions. |
| "Immutable code is slower" | Immutability prevents bugs. Profile before optimizing. Correctness > performance. |
| "I don't need 80% coverage" | Yes you do. Coverage catches regressions and documents intent. |
| "I'll skip the security check just this once" | Security violations are CRITICAL. They block merges. Always. |
| "These rules are too strict" | Strict rules prevent production incidents. Every rule exists because a real bug happened. |
What ships with it: 104 files
208.6 KB alongside SKILL.md
references/
- angular/coding-style.md5.1 KB
- angular/hooks.md845 B
- angular/patterns.md6.4 KB
- angular/security.md2.8 KB
- angular/testing.md4.4 KB
- arkts/coding-style.md6.0 KB
- arkts/hooks.md2.5 KB
- arkts/patterns.md5.4 KB
- arkts/security.md4.6 KB
- arkts/testing.md3.7 KB
- common/agents.md1.6 KB
- common/code-review.md3.4 KB
- common/coding-style.md2.5 KB
- common/development-workflow.md2.2 KB
- common/git-workflow.md622 B
- common/hooks.md768 B
- common/patterns.md1022 B
- common/performance.md1.6 KB
- common/security.md862 B
- common/testing.md1.4 KB
- cpp/coding-style.md1.2 KB
- cpp/hooks.md734 B
- cpp/patterns.md1.3 KB
- cpp/security.md1.2 KB
- cpp/testing.md843 B
- csharp/coding-style.md2.0 KB
- csharp/hooks.md715 B
- csharp/patterns.md1.4 KB
- csharp/security.md1.7 KB
- csharp/testing.md1.1 KB
- dart/coding-style.md4.4 KB
- dart/hooks.md1.3 KB
- dart/patterns.md6.7 KB
- dart/security.md5.1 KB
- dart/testing.md5.3 KB
- fsharp/coding-style.md2.8 KB
- fsharp/hooks.md701 B
- fsharp/patterns.md3.3 KB
- fsharp/security.md2.1 KB
- fsharp/testing.md1.7 KB
64 more files not listed here. See all 104 in the repository.