name: coding-best-practices description: "The default coding-quality baseline — load for essentially ALL code work in ANY language, framework, or paradigm. Invoke PROACTIVELY whenever about to write new code, implement a feature, fix a bug, edit/refactor existing code, or review code — EVEN IF the user never says 'best practices', 'clean code', or 'review'. Treat writing and reviewing code as automatic triggers. Covers naming, SRP, DRY, KISS, YAGNI, guard clauses, error handling, edge cases, immutability, concurrency/race safety, resource lifecycle, testability, evidence-gated abstraction (SOLID), performance shape + budgets, security (secrets/injection/least-privilege), backend/data-access safety, modern-idiom/API currency, and surgical-change discipline. TRIGGER on: 'implement', 'add feature', 'build', 'write a…', 'fix this bug', 'refactor', 'clean up', 'improve', 'optimize', 'modernize', 'review this', 'is this good', 'PR', and any Edit/Write of source. Skip only pure prose/docs with no code and trivia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.PriorityQueue | |
| const val DEPOT = 0 | |
| const val NO_DUE_TIME = Int.MAX_VALUE | |
| enum class RouteMode { RETURN_TO_DEPOT, OPEN } | |
| data class Stop( | |
| val id: Int, | |
| val demand: Int = 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/services.dart'; | |
| /// Drop-in replacement for [Scaffold] that enforces: | |
| /// - Transparent status bar (never takes AppBar background color) | |
| /// - Transparent system navigation bar on Android with correct icon brightness | |
| /// - Correct status bar icon brightness on both iOS and Android | |
| /// - Body extends behind bottom navigation bar (use [EdgePaddedListView] | |
| /// inside body to ensure list content is not hidden) | |
| class AppScaffold extends StatelessWidget { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * MIT License | |
| * | |
| * Copyright (c) 2018 Markus Deutsch | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.apnamart.apnaconsumer.core_app_framework.retrofit | |
| import android.util.Log | |
| import okhttp3.Interceptor | |
| import okhttp3.Response | |
| import okio.Buffer | |
| import java.io.IOException | |
| class CurlLoggingInterceptor(private val tag: String = "AppLogger") : Interceptor { | |
| allowed-tools | Bash(git:*), Bash(mkdir:*), Bash(open:*), Bash(gnome-terminal:*), Bash(xterm:*), Bash(konsole:*) |
|---|---|
| description | Create git worktree in adjacent directory and open terminal with claude |
Creates a git worktree in an adjacent directory structure and opens a new terminal with claude running.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Title: Senior Engineer Task Execution Rule | |
| Applies to: All Tasks | |
| Rule: | |
| You are a senior engineer with deep experience building production-grade AI agents, automations, and workflow systems. Every task you execute must follow this procedure without exception: | |
| 1.Clarify Scope First | |
| •Before writing any code, map out exactly how you will approach the task. | |
| •Confirm your interpretation of the objective. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| font-family = BerkeleyMono Nerd Font | |
| #font-family = Iosevka Nerd Font | |
| # font-family = SFMono Nerd Font | |
| font-size = 20 | |
| theme = GruvboxDarkHard | |
| shell-integration-features = no-cursor,sudo,no-title | |
| cursor-style = block | |
| adjust-cell-height = 35% | |
| # background-opacity = 0.96 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Complete mapping for 0-99 in Hindi | |
| hindi_numbers_0_99 = [ | |
| 'शून्य', 'एक', 'दो', 'तीन', 'चार', 'पाँच', 'छह', 'सात', 'आठ', 'नौ', | |
| 'दस', 'ग्यारह', 'बारह', 'तेरह', 'चौदह', 'पंद्रह', 'सोलह', 'सत्रह', 'अठारह', 'उन्नीस', | |
| 'बीस', 'इक्कीस', 'बाईस', 'तेईस', 'चौबीस', 'पच्चीस', 'छब्बीस', 'सत्ताईस', 'अट्ठाईस', 'उनतीस', | |
| 'तीस', 'इकतीस', 'बत्तीस', 'तैंतीस', 'चौंतीस', 'पैंतीस', 'छत्तीस', 'सैंतीस', 'अड़तीस', 'उनतालीस', | |
| 'चालीस', 'इकतालीस', 'बयालीस', 'तैंतालीस', 'चवालीस', 'पैंतालीस', 'छियालीस', 'सैंतालीस', 'अड़तालीस', 'उनचास', | |
| 'पचास', 'इक्यावन', 'बावन', 'तिरेपन', 'चौवन', 'पचपन', 'छप्पन', 'सत्तावन', 'अट्ठावन', 'उनसठ', | |
| 'साठ', 'इकसठ', 'बासठ', 'तिरसठ', 'चौंसठ', 'पैंसठ', 'छियासठ', 'सड़सठ', 'अड़सठ', 'उनहत्तर', | |
| 'सत्तर', 'इकहत्तर', 'बहत्तर', 'तिहत्तर', 'चौहत्तर', 'पचहत्तर', 'छिहत्तर', 'सत्तहत्तर', 'अठहत्तर', 'उन्यासी', |
NewerOlder