kid-sid/claude-spellbook/coding-standards
Claude Code and agent skill by kid-sid/claude-spellbook
- community
Checking that the SKILL.md file is still in the repository.
Use when reviewing code for quality, naming a class or function, choosing a design pattern, refactoring a code smell, or establishing coding conventions for a new project.
Install
npx vskill@latest install kid-sid/claude-spellbook/coding-standardsSKILL.md
Coding Standards
A comprehensive reference for writing clean, consistent, maintainable code across Python, TypeScript, and Go.
When to Activate
- Reviewing a pull request for code quality
- Refactoring legacy or unclear code
- Naming a class, function, variable, or file
- Deciding which design pattern to apply
- Setting up coding standards for a new project
- Identifying code smells and their root causes
Naming Conventions
| Construct | Python | TypeScript | Go | |
|---|---|---|---|---|
| Variables | snake_case | camelCase | camelCase | |
| Functions / methods | snake_case | camelCase | PascalCase (exported), camelCase (unexported) | |
| Classes / types | PascalCase | PascalCase | PascalCase | |
| Constants | UPPER_SNAKE_CASE | UPPER_SNAKE_CASE or camelCase | PascalCase (exported), camelCase (unexported) | |
| Interfaces | N/A | IFoo (avoid) or just Foo (preferred) | Foo (no I prefix) | |
| Files | snake_case.py | kebab-case.ts or camelCase.ts | snake_case.go | |
| Test files | test_*.py | *.test.ts / *.spec.ts | *_test.go |
Naming Heuristics
- Be specific:
user_registration_datenotdate;payment_amount_centsnotamount - Avoid meaningless suffixes:
UserManager,DataHelper,Utils— what does it manage/help/do? - Boolean names: use
is_,has_,can_,should_prefix:is_active,has_permission - Functions: verb phrases —
calculate_tax(),send_email(),validate_schema() - Avoid abbreviations except universally understood ones (
id,url,http,db) - Length proportional to scope: loop variable
iis fine; module-level variable needs a full name
SOLID Principles
S — Single Responsibility
A class should have one reason to change.
O — Open/Closed
Open for extension, closed for modification.
L — Liskov Substitution
Subtypes must be substitutable for their base type.
I — Interface Segregation
Many specific interfaces are better than one general interface.
D — Dependency Inversion
Depend on abstractions, not concretions.
Design Patterns Quick Reference
| Pattern | Category | One-line use case | When to avoid | |
|---|---|---|---|---|
| Factory | Creational | Create objects without specifying concrete class | When you only have one type | |
| Abstract Factory | Creational | Create families of related objects | Overkill for simple factories | |
| Singleton | Creational | One shared instance (config, logger) | When it becomes global mutable state | |
| Builder | Creational | Step-by-step construction of complex objects | Simple objects with few fields | |
| Strategy | Behavioral | Swap algorithms at runtime | When you only have one algorithm | |
| Observer | Behavioral | Notify dependents when state changes | When observers outlive the subject | |
| Command | Behavioral | Encapsulate a request as an object (undo/redo) | Simple one-off calls | |
| Template Method | Behavioral | Define skeleton, let subclasses fill steps | Deep inheritance hierarchies | |
| Repository | Structural | Isolate data access from domain logic | When ORM already provides this | |
| Adapter | Structural | Wrap incompatible interface | When both interfaces are yours (just fix one) | |
| Decorator | Structural | Add behavior to objects dynamically | When subclassing is simpler | |
| Facade | Structural | Simplified interface to complex subsystem | Over-used to hide bad design |
Full Code Examples
Factory
Strategy
Observer
Repository
Code Smells Catalog
| Smell | Symptom | Refactoring | |
|---|---|---|---|
| Long Method | Function > 30 lines | Extract Method | |
| Long Class / God Class | Class > 300 lines or too many responsibilities | Extract Class | |
| Data Clump | Same 3+ params appear together everywhere | Introduce Parameter Object | |
| Primitive Obsession | Using strings/ints for domain concepts (money, email) | Introduce Value Object | |
| Feature Envy | Method uses data from another class more than its own | Move Method | |
| Shotgun Surgery | One change requires edits in many classes | Move Method/Field, consolidate | |
| Divergent Change | Class changes for multiple unrelated reasons | Extract Class | |
| Duplicate Code | Same logic in multiple places | Extract Method/Function | |
| Magic Numbers | Unexplained literals in code | Replace with Named Constant | |
| Switch/Match on Type | Repeated instanceof or type checks | Replace with Polymorphism |
Smell Examples
Language-Specific Idioms
Python
TypeScript
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/coding-standards/skill.md
Popularity
- Repository stars
- 186
- Repository forks
- 15
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kid-sid/claude-spellbook/coding-standards)