[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AFHR7R3FMF4B6ZPE1VJDCW":3,"skill-same:01M7AFHR7R3FMF4B6ZPE1VJDCW":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7AFHR7R3FMF4B6ZPE1VJDCW","trove-python",null,"Python\u002FFastAPI coding conventions and best practices. Auto-activates when working with Python files. Covers async patterns, type hints, SQLAlchemy, Pydantic, logging, and error handling.","bravew\u002Ftrove","bravew","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10855844?v=4","01M7ACJ91JZSQYHT81XPVYR7VA","Yong","01M7AFERNR92HDPGNGP5QA16DM",10,"MIT","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fplugins\u002Ftrove-dev\u002F.agents\u002Fskills\u002Ftrove-python\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: trove-python\ndescription: \"Python\u002FFastAPI coding conventions and best practices. Auto-activates when working with Python files. Covers async patterns, type hints, SQLAlchemy, Pydantic, logging, and error handling.\"\npaths:\n  - \"**\u002F*.py\"\nmetadata:\n  trove-category: code\n  trove-category-label: Code\n---\n\u003C!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->\n\u003C!-- Regenerate: bun run build:skills -->\n\n## Session Init\n\nThis skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict.\n\n# Python \u002F FastAPI Conventions\n\n## Imports\n\n- **Top-level imports only** — never inline imports inside functions\n- Organization: stdlib → third-party → local (isort-compatible)\n- Use `from __future__ import annotations` when needed for forward refs\n\n## Type Hints\n\n- All function signatures must have type hints (params + return)\n- Use `from typing import` for complex types (`Optional`, `Union`, etc.)\n- Pydantic models for all request\u002Fresponse schemas\n- Prefer `X | None` over `Optional[X]` (Python 3.10+)\n\n## Async Patterns (CRITICAL)\n\nNever call blocking I\u002FO in async functions:\n\n```python\n# BAD — blocks the event loop\nasync def get_user(user_id: str):\n    response = requests.get(f\"\u002Fusers\u002F{user_id}\")  # BLOCKING!\n    time.sleep(1)  # BLOCKING!\n\n# GOOD — non-blocking\nasync def get_user(user_id: str):\n    async with httpx.AsyncClient() as client:\n        response = await client.get(f\"\u002Fusers\u002F{user_id}\")\n    await asyncio.sleep(1)\n```\n\n- Use `httpx.AsyncClient` for HTTP (not `requests`)\n- Use `asyncio.sleep` for delays (not `time.sleep`)\n- Use `async with` for context managers (DB sessions, HTTP clients)\n\n## Logging\n\n```python\n# INFO\u002FDEBUG — f-strings are fine (fast path, no Sentry indexing needed)\nlogger.info(f\"Processing user {user_id}\")\n\n# WARNING\u002FERROR — static message + extra dict (enables Sentry grouping)\nlogger.warning(\"Payment failed\", extra={\"user_id\": user_id, \"amount\": amount})\n\n# EXCEPTION — use in except blocks (auto-captures stack trace)\ntry:\n    await process()\nexcept Exception:\n    logger.exception(\"Processing failed\", extra={\"user_id\": user_id})\n```\n\nNever use `sentry_sdk.capture_exception()` — use `logger.exception()` instead.\n\n## SQLAlchemy Async\n\n```python\n# Always use async session context manager\nasync with get_async_session() as session:\n    result = await session.execute(select(User).where(User.id == user_id))\n    user = result.scalar_one_or_none()\n\n# Eager loading to avoid N+1\nstmt = select(User).options(selectinload(User.posts)).where(User.id == user_id)\n```\n\n## Error Handling\n\n- Use specific exception types, not bare `except:`\n- FastAPI: raise `HTTPException` with appropriate status codes\n- Service layer: raise domain-specific exceptions\n- Never silently swallow exceptions\n\n## Pydantic Models\n\n```python\nclass UserResponse(BaseModel):\n    model_config = ConfigDict(from_attributes=True)\n\n    id: str\n    name: str\n    email: str | None = None\n    created_at: datetime\n```\n\n## AI Gotchas\n\n- **httpx vs requests**: Always use `httpx.AsyncClient` in async code\n- **datetime**: Use `datetime.now(tz=UTC)` not `datetime.utcnow()` (deprecated)\n- **Pydantic v2**: Use `model_config = ConfigDict(...)` not `class Config:`\n- **SQLAlchemy 2.0**: Use `select()` not `session.query()`\n","\u003C!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->\n\u003C!-- Regenerate: bun run build:skills -->\n\n## Session Init\n\nThis skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict.\n\n# Python \u002F FastAPI Conventions\n\n## Imports\n\n- **Top-level imports only** — never inline imports inside functions\n- Organization: stdlib → third-party → local (isort-compatible)\n- Use `from __future__ import annotations` when needed for forward refs\n\n## Type Hints\n\n- All function signatures must have type hints (params + return)\n- Use `from typing import` for complex types (`Optional`, `Union`, etc.)\n- Pydantic models for all request\u002Fresponse schemas\n- Prefer `X | None` over `Optional[X]` (Python 3.10+)\n\n## Async Patterns (CRITICAL)\n\nNever call blocking I\u002FO in async functions:\n\n```python\n# BAD — blocks the event loop\nasync def get_user(user_id: str):\n    response = requests.get(f\"\u002Fusers\u002F{user_id}\")  # BLOCKING!\n    time.sleep(1)  # BLOCKING!\n\n# GOOD — non-blocking\nasync def get_user(user_id: str):\n    async with httpx.AsyncClient() as client:\n        response = await client.get(f\"\u002Fusers\u002F{user_id}\")\n    await asyncio.sleep(1)\n```\n\n- Use `httpx.AsyncClient` for HTTP (not `requests`)\n- Use `asyncio.sleep` for delays (not `time.sleep`)\n- Use `async with` for context managers (DB sessions, HTTP clients)\n\n## Logging\n\n```python\n# INFO\u002FDEBUG — f-strings are fine (fast path, no Sentry indexing needed)\nlogger.info(f\"Processing user {user_id}\")\n\n# WARNING\u002FERROR — static message + extra dict (enables Sentry grouping)\nlogger.warning(\"Payment failed\", extra={\"user_id\": user_id, \"amount\": amount})\n\n# EXCEPTION — use in except blocks (auto-captures stack trace)\ntry:\n    await process()\nexcept Exception:\n    logger.exception(\"Processing failed\", extra={\"user_id\": user_id})\n```\n\nNever use `sentry_sdk.capture_exception()` — use `logger.exception()` instead.\n\n## SQLAlchemy Async\n\n```python\n# Always use async session context manager\nasync with get_async_session() as session:\n    result = await session.execute(select(User).where(User.id == user_id))\n    user = result.scalar_one_or_none()\n\n# Eager loading to avoid N+1\nstmt = select(User).options(selectinload(User.posts)).where(User.id == user_id)\n```\n\n## Error Handling\n\n- Use specific exception types, not bare `except:`\n- FastAPI: raise `HTTPException` with appropriate status codes\n- Service layer: raise domain-specific exceptions\n- Never silently swallow exceptions\n\n## Pydantic Models\n\n```python\nclass UserResponse(BaseModel):\n    model_config = ConfigDict(from_attributes=True)\n\n    id: str\n    name: str\n    email: str | None = None\n    created_at: datetime\n```\n\n## AI Gotchas\n\n- **httpx vs requests**: Always use `httpx.AsyncClient` in async code\n- **datetime**: Use `datetime.now(tz=UTC)` not `datetime.utcnow()` (deprecated)\n- **Pydantic v2**: Use `model_config = ConfigDict(...)` not `class Config:`\n- **SQLAlchemy 2.0**: Use `select()` not `session.query()`\n",{"name":5,"paths":24,"metadata":26,"description":7},[25],"**\u002F*.py",{"trove-category":27,"trove-category-label":28},"code","Code","main","f88db1f1cf0e0703dd962051ebc142db961d7799","plugins\u002Ftrove-dev\u002F.agents\u002Fskills\u002Ftrove-python",1,"https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove","https:\u002F\u002Fgithub.com\u002Fbravew","2026-11-12 07:56:32",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add bravew\u002Ftrove --skill trove-python",{"tool":42,"command":43},"bunx","bunx skills add bravew\u002Ftrove --skill trove-python",{"tool":45,"command":46},"pnpm","pnpm dlx skills add bravew\u002Ftrove --skill trove-python","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fplugins\u002Ftrove-dev\u002F.agents\u002Fskills\u002Ftrove-python\u002FSKILL.md",true,[],[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7AGJDHTQAS1VK6P7VJAV79G","using-trove","Skill discipline anchor for the Trove marketplace. Loaded once per session; routes the agent to the right trove-* skill before code, planning, review, or git actions.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fusing-trove\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7AGJAS4V4TXE6TV6F839BGZ","trove-write-skill","Skill authoring workflow. Use when creating or updating a Codex or Trove skill, including rubrics, tasks, metadata, and validation.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftrove-write-skill\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7AGJ87K41ZAC8DDBAV17QFW","trove-worktree","Git worktree workflow for spikes, risky experiments, and broad refactors that should not disturb the user's current branch.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftrove-worktree\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7AGJ32V58VYBFYMS9EMHRY4","trove-why","Reconstruct design rationale and decision history from evidence — source control, issue tracker (Linear), docs (Notion), chat (Slack), error tracking (Sentry) — with calibrated confidence. Use for \"why does X work this way\", \"why did we pick Y\", regressions, and postmortems. Use trove-explain for how it works now.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftrove-why\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7AGJ0FHJSRR8MMXC3V8XNHF","trove-verify","Completion verification workflow. Use before claiming done, fixed, complete, ready, or shipped.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftrove-verify\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7AGHWV4B9SDS60RH5W0B0K5","trove-unslop","Cut AI tells from writing — PR descriptions, release notes, specs, commit bodies, and replies. Use before finalizing prose, or when the user asks to clean up, de-slop, or make text sound human.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftrove-unslop\u002FSKILL.md",[],[]]