Back to list
davidgaribay-dev

coding-standards

by davidgaribay-dev

0🍴 0📅 Jan 23, 2026

SKILL.md


name: coding-standards description: Project coding standards and conventions. Preload into agents that write code. user-invocable: false

Coding Standards

Backend Python

Exception Chaining (REQUIRED)

try:
    result = operation()
except ValueError as e:
    raise ValidationError(str(e)) from e  # ALWAYS chain
else:
    return result

Typed Dependencies (REQUIRED)

from backend.api.deps import SessionDep
from backend.auth.deps import CurrentUser
from backend.rbac.deps import OrgContextDep, TeamContextDep

Domain Exceptions (REQUIRED)

# Use these, not HTTPException or ValueError
raise ResourceNotFoundError("Team", team_id)
raise ValidationError("email", "Invalid format")
raise AuthorizationError("Cannot delete")

Timestamps (REQUIRED)

from datetime import UTC, datetime
now = datetime.now(UTC)  # ALWAYS use UTC

Constants (REQUIRED)

MAX_RETRIES = 3  # Use constants, not magic numbers

Frontend TypeScript

i18n (REQUIRED)

const { t } = useTranslation()
<Button>{t("com_save")}</Button>  // NEVER hardcode strings

Path Aliases (REQUIRED)

import { Button } from "@/components/ui/button"  // Use @/ prefix

Error Display (REQUIRED)

{mutation.isError && <ErrorAlert error={mutation.error} />}

Form State (REQUIRED)

form.setValue("field", value, { shouldDirty: true })

Test IDs (REQUIRED)

import { testId } from "@/lib/test-id"

// ALL interactive elements MUST have test IDs
<Button {...testId("feature-submit-button")} onClick={handleSubmit}>{t("com_save")}</Button>
<Input {...testId("feature-name-input")} {...form.register("name")} />
<DialogContent {...testId("confirm-delete-dialog")}>...</DialogContent>

Naming Convention: {component}-{element}-{type} in kebab-case

  • Buttons: create-team-submit-button, delete-prompt-confirm-button
  • Inputs: login-email-input, settings-name-input
  • Dialogs: edit-prompt-dialog, delete-org-alert-dialog
  • Lists: document-list, document-item-${id}
  • Tables: configured-models-table, model-row-${id}

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon