← スキル一覧に戻る

coding-standards
by davidgaribay-dev
⭐ 0🍴 0📅 2026年1月23日
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}
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓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
レビュー
💬
レビュー機能は近日公開予定です