[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78EYG69QMSBYDERF5AEH09Z":3,"skill-same:01M78EYG69QMSBYDERF5AEH09Z":65},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M78EYG69QMSBYDERF5AEH09Z","fastapi",null,"Implement and review FastAPI endpoints, validation, dependencies, lifecycle and Python I\u002FO behavior.","kok-o\u002Fcontextos-agents","kok-o","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F173567992?v=4","01M78EV59TFZZ32P2FNN27BHW5","Nurkhan Esenbek","01M78EV5AFG9E8PEC10N3W7JNH",10,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Fcatalog\u002Fskills\u002Ffastapi\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: fastapi\ndescription: Implement and review FastAPI endpoints, validation, dependencies,\n  lifecycle and Python I\u002FO behavior.\n---\n\n# fastapi\n\n## Overview\n\nImplement and review FastAPI endpoints, validation, dependencies, lifecycle and Python I\u002FO behavior. Match guidance to the actual task and project; this document does not implement an automatic enforcer.\n\n## When to Use\n\nThe project actually uses FastAPI or the task asks for it. A Python script or ML experiment alone is not a reason to add a web framework.\n\n## Rules & Patterns\n\nInspect Python, FastAPI, Pydantic and database\u002FHTTP library versions. Follow existing settings, dependencies and application layout; avoid prescribing a full repository\u002Fservice architecture for a small endpoint.\n\nUse request and response models for their intended boundary. Validate allowed fields and authorize protected objects independently of Pydantic validation. Keep secrets and internal errors out of responses.\n\nChoose async def with genuinely awaitable libraries; synchronous path operations and dependencies are supported by FastAPI's execution model. Do not run blocking I\u002FO directly on the event loop or assume adding async makes a synchronous library nonblocking.\n\nOwn database sessions and clients at a deliberate lifecycle boundary with cleanup on failure. Lightweight in-process background tasks are not durable job delivery; use the existing durable mechanism when work must survive process loss.\n\nUse the project's maintained authentication and password libraries after checking their actual APIs. JWT is not required for every API; token validation and object-level authorization are separate.\n\n## Code Examples\n\nFor a create-user endpoint, test invalid fields, a denied caller, the persisted response and failure cleanup. The examples below are partial patterns with stated fixtures\u002Fconfiguration, not an assembled production authentication service.\n\n```\napp\u002F\n├── main.py              # App entry, CORS, middleware\n├── config.py            # App settings (version-specific library)\n├── database.py          # Database session, engine\n├── models\u002F              # SQLAlchemy models\n│   ├── __init__.py\n│   └── user.py\n├── schemas\u002F             # Pydantic schemas (request\u002Fresponse)\n│   ├── __init__.py\n│   └── user.py\n├── api\u002F                 # Route handlers\n│   ├── __init__.py\n│   ├── deps.py          # Dependency injection\n│   └── v1\u002F\n│       ├── __init__.py\n│       └── users.py\n├── services\u002F            # Business logic\n│   └── user_service.py\n├── repositories\u002F        # Database access\n│   └── user_repo.py\n└── tests\u002F\n    └── test_users.py\n```\n\n```python\nfrom pydantic import BaseModel, EmailStr, Field, ConfigDict\n\nclass UserCreate(BaseModel):\n    email: EmailStr\n    name: str = Field(..., min_length=1, max_length=100)\n    \nclass UserResponse(BaseModel):\n    id: int\n    email: str\n    name: str\n    \n    model_config = ConfigDict(from_attributes=True)\n```\n\n```python\nfrom collections.abc import AsyncIterator\nfrom sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker\n\n# SQLAlchemy 2.x pattern: configure the factory at app setup, then supply\n# the returned dependency through the application's actual Depends wiring.\ndef make_db_dependency(session_factory: async_sessionmaker[AsyncSession]):\n    async def get_db() -> AsyncIterator[AsyncSession]:\n        async with session_factory() as session:\n            yield session\n    return get_db\n```\n\n```python\nfrom fastapi import HTTPException\n\nclass AppException(HTTPException):\n    def __init__(self, status_code: int, detail: str, code: str):\n        super().__init__(status_code=status_code, detail={\"code\": code, \"message\": detail})\n```\n\n```python\nimport pytest\nfrom httpx import AsyncClient\n\n@pytest.mark.asyncio\nasync def test_create_user(client: AsyncClient):\n    response = await client.post(\"\u002Fapi\u002Fv1\u002Fusers\", json={\n        \"email\": \"test@example.com\",\n        \"name\": \"Test User\"\n    })\n    assert response.status_code == 201\n```\n\n## Validation Checklist\n\n- [ ] Run the app's actual endpoint tests when available; distinguish AST parsing from HTTP execution.\n- [ ] Check validation, authorization, dependency cleanup and error behavior.\n\n## Common Mistakes\n\nForcing an async ORM or JWT stack on every project; claiming model validation proves authorization; presenting copied parser fixtures as live API tests.\n\n## Integration Notes\n\nOptional companion guidance: api-design, security, testing. Use it only when relevant and available; the skill does not install tools or authorize external actions.\n","# fastapi\n\n## Overview\n\nImplement and review FastAPI endpoints, validation, dependencies, lifecycle and Python I\u002FO behavior. Match guidance to the actual task and project; this document does not implement an automatic enforcer.\n\n## When to Use\n\nThe project actually uses FastAPI or the task asks for it. A Python script or ML experiment alone is not a reason to add a web framework.\n\n## Rules & Patterns\n\nInspect Python, FastAPI, Pydantic and database\u002FHTTP library versions. Follow existing settings, dependencies and application layout; avoid prescribing a full repository\u002Fservice architecture for a small endpoint.\n\nUse request and response models for their intended boundary. Validate allowed fields and authorize protected objects independently of Pydantic validation. Keep secrets and internal errors out of responses.\n\nChoose async def with genuinely awaitable libraries; synchronous path operations and dependencies are supported by FastAPI's execution model. Do not run blocking I\u002FO directly on the event loop or assume adding async makes a synchronous library nonblocking.\n\nOwn database sessions and clients at a deliberate lifecycle boundary with cleanup on failure. Lightweight in-process background tasks are not durable job delivery; use the existing durable mechanism when work must survive process loss.\n\nUse the project's maintained authentication and password libraries after checking their actual APIs. JWT is not required for every API; token validation and object-level authorization are separate.\n\n## Code Examples\n\nFor a create-user endpoint, test invalid fields, a denied caller, the persisted response and failure cleanup. The examples below are partial patterns with stated fixtures\u002Fconfiguration, not an assembled production authentication service.\n\n```\napp\u002F\n├── main.py              # App entry, CORS, middleware\n├── config.py            # App settings (version-specific library)\n├── database.py          # Database session, engine\n├── models\u002F              # SQLAlchemy models\n│   ├── __init__.py\n│   └── user.py\n├── schemas\u002F             # Pydantic schemas (request\u002Fresponse)\n│   ├── __init__.py\n│   └── user.py\n├── api\u002F                 # Route handlers\n│   ├── __init__.py\n│   ├── deps.py          # Dependency injection\n│   └── v1\u002F\n│       ├── __init__.py\n│       └── users.py\n├── services\u002F            # Business logic\n│   └── user_service.py\n├── repositories\u002F        # Database access\n│   └── user_repo.py\n└── tests\u002F\n    └── test_users.py\n```\n\n```python\nfrom pydantic import BaseModel, EmailStr, Field, ConfigDict\n\nclass UserCreate(BaseModel):\n    email: EmailStr\n    name: str = Field(..., min_length=1, max_length=100)\n    \nclass UserResponse(BaseModel):\n    id: int\n    email: str\n    name: str\n    \n    model_config = ConfigDict(from_attributes=True)\n```\n\n```python\nfrom collections.abc import AsyncIterator\nfrom sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker\n\n# SQLAlchemy 2.x pattern: configure the factory at app setup, then supply\n# the returned dependency through the application's actual Depends wiring.\ndef make_db_dependency(session_factory: async_sessionmaker[AsyncSession]):\n    async def get_db() -> AsyncIterator[AsyncSession]:\n        async with session_factory() as session:\n            yield session\n    return get_db\n```\n\n```python\nfrom fastapi import HTTPException\n\nclass AppException(HTTPException):\n    def __init__(self, status_code: int, detail: str, code: str):\n        super().__init__(status_code=status_code, detail={\"code\": code, \"message\": detail})\n```\n\n```python\nimport pytest\nfrom httpx import AsyncClient\n\n@pytest.mark.asyncio\nasync def test_create_user(client: AsyncClient):\n    response = await client.post(\"\u002Fapi\u002Fv1\u002Fusers\", json={\n        \"email\": \"test@example.com\",\n        \"name\": \"Test User\"\n    })\n    assert response.status_code == 201\n```\n\n## Validation Checklist\n\n- [ ] Run the app's actual endpoint tests when available; distinguish AST parsing from HTTP execution.\n- [ ] Check validation, authorization, dependency cleanup and error behavior.\n\n## Common Mistakes\n\nForcing an async ORM or JWT stack on every project; claiming model validation proves authorization; presenting copied parser fixtures as live API tests.\n\n## Integration Notes\n\nOptional companion guidance: api-design, security, testing. Use it only when relevant and available; the skill does not install tools or authorize external actions.\n",{"name":5,"description":7},"main","7fb8666fa73d9b8f9707a47505553f0f1af474ea","catalog\u002Fskills\u002Ffastapi",1,"https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents","https:\u002F\u002Fgithub.com\u002Fkok-o","nurkhan.space","Software engineer focused on AI tooling and ML infrastructure. \r\n\r\n","2026-11-11 02:56:50",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add kok-o\u002Fcontextos-agents --skill fastapi",{"tool":39,"command":40},"bunx","bunx skills add kok-o\u002Fcontextos-agents --skill fastapi",{"tool":42,"command":43},"pnpm","pnpm dlx skills add kok-o\u002Fcontextos-agents --skill fastapi","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Fcatalog\u002Fskills\u002Ffastapi\u002FSKILL.md",true,[47,53,57,61],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"EXAMPLES.md","REFERENCE","参考文档",646,"https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Fcatalog\u002Fskills\u002Ffastapi\u002FEXAMPLES.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"skill.yaml",424,"https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Fcatalog\u002Fskills\u002Ffastapi\u002Fskill.yaml",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"TROUBLESHOOTING.md",316,"https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Fcatalog\u002Fskills\u002Ffastapi\u002FTROUBLESHOOTING.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"VALIDATION.json",198,"https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Fcatalog\u002Fskills\u002Ffastapi\u002FVALIDATION.json",[66,73,80,87,94,100],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M78F25RVZVK4KYXZZKW42DZH","scoped-frontend","Frontend component design and React guidelines","https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fadapter-contracts\u002F.agents\u002Fcore\u002Fskills\u002Fscoped-frontend\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M78F23169Y0R4CB819166JZP","scoped-backend","Backend service architecture and API endpoints","https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fadapter-contracts\u002F.agents\u002Fcore\u002Fskills\u002Fscoped-backend\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M78F1ZSMZAMY7S2ECNB065QR","engineering-workflow","Core software engineering lifecycle workflow","https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fadapter-contracts\u002F.agents\u002Fcore\u002Fskills\u002Fengineering-workflow\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M78F1WWD36GB27TAS4TSM3MJ","team-auth","ContextOS skill for team-auth","https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Fscripts\u002Freadme-gif\u002Fevidence\u002Fexports\u002Fcodex\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M78F1TEZPGE4NCTPZRC7Q1KK","claude","https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Fscripts\u002Freadme-gif\u002Fevidence\u002Fexports\u002Fclaude\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M78F1Q8JG229RWD6ESVKT9R9","team-order","Team conventions for createOrder and item name normalization in src\u002Forder.ts.","https:\u002F\u002Fgithub.com\u002Fkok-o\u002Fcontextos-agents\u002Fblob\u002Fmain\u002Fexamples\u002Freadme-demo\u002Fteam-order\u002FSKILL.md",[],[]]