[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79GRWMT4CC0MEQNWPJF3MA3":3,"skill-same:01M79GRWMT4CC0MEQNWPJF3MA3":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M79GRWMT4CC0MEQNWPJF3MA3","scaffold-service",null,"Scaffold a thin FastAPI router or gRPC servicer under services\u002F{domain}\u002Fv{n}\u002F with AppUtils bootstrap. Use for \"add an endpoint\u002Froute\u002FAPI\", \"expose via REST\u002FgRPC\", or \"new API version\".","SyntaxArc\u002Farchipy-plugin","SyntaxArc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F199446442?v=4","01M79GPX74Y0R3C1MTXHETZZYF","01M79GPX7S33ZRJ5935EQ3JRPN",3,"MIT","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-service\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: scaffold-service\ndescription: >-\n  Scaffold a thin FastAPI router or gRPC servicer under services\u002F{domain}\u002Fv{n}\u002F with\n  AppUtils bootstrap. Use for \"add an endpoint\u002Froute\u002FAPI\", \"expose via REST\u002FgRPC\", or\n  \"new API version\".\n---\n\n# Scaffold ArchiPy Service\n\n## Read first\n\nRead these plugin rules in full before generating files (paths relative to this skill directory; Claude Code: `${CLAUDE_SKILL_DIR}\u002F..\u002F..\u002Frules\u002F`):\n\n- `..\u002F..\u002Frules\u002Farchitecture-for-apps.mdc`\n- `..\u002F..\u002Frules\u002Fusing-archipy-utils.mdc`\n- `..\u002F..\u002Frules\u002Fusing-archipy-services.mdc`\n- `..\u002F..\u002Frules\u002Fconfig-and-di.mdc`\n\n## Before writing files\n\n1. Inspect existing transports, domain DTOs\u002Flogics, app bootstrap, DI wiring, and service tests.\n2. Infer domain, API version, framework, and sync\u002Fasync style when established by the repository.\n3. Ask only for unresolved choices. Default to `v1` and FastAPI only when no project convention exists.\n4. Preserve existing routes, servicers, and bootstrap code; integrate without overwriting.\n\n## Prefer ArchiPy\n\n```bash\nuv add \"archipy[fastapi]\"   # HTTP\nuv add \"archipy[grpc]\"      # gRPC\n```\n\n## Generate\n\n```text\nservices\u002F\u003Cdomain>\u002Fv{n}\u002F\n└── \u003Cdomain>_service.py\n```\n\n### FastAPI\n\n- Thin router: request → domain `*InputDTO` → logic → `*OutputDTO`.\n- Export `create_\u003Cdomain>_v{n}_router(container)` for `manage.py` \u002F app factory.\n- Paths follow the REST resource rule in `using-archipy-services.mdc`: `\u002Fapi\u002Fv1\u002Fusers\u002F{user_uuid}\u002Fcampaigns\u002F{campaign_uuid}\u002F...`\n  — kebab-case literal segments, plural collections, `UUID`-typed `snake_case` path params, `APIRouter(prefix=\"\u002Fapi\u002Fv1\")`.\n- JWT auth (Keycloak or other): compute `actor_uuid` = actor (`current_actor.id` \u002F `act`) first, else token subject (`user_id` \u002F `sub`); pass it in the\n  input DTO for `created_by*`\u002F`updated_by*`. Never use a path owner uuid (customer, merchant, admin, user…) as the actor (see `using-archipy-services.mdc`).\n- Map domain errors to HTTP status; no business rules \u002F atomic UoW decorators here.\n\n### gRPC\n\n- Thin servicer calling logic; sync servicers with `AppUtils.create_grpc_app`, async with `create_async_grpc_app`.\n- Export `register_\u003Cdomain>_v{n}_servicers(server, container)` that adds the servicers to a server built by\n  `AppUtils`; the entrypoint and the BDD harness (`\u002Fscaffold-bdd`) both call it, so neither binds a port inside it.\n- Do not mix sync\u002Fasync servicer styles on one server.\n- Request\u002Fresponse DTOs extend `BaseProtobufDTO` (`_proto_class`, `from_proto` \u002F `to_proto`); `from_proto` is the\n  validation boundary. Catch `ValidationError` and raise `InvalidArgumentError ... from e`; keep proto types out of\n  logics. See `rules\u002Fusing-archipy-models.mdc`.\n\n## Bootstrap (entrypoint)\n\nPrefer AppUtils — do not hand-roll bare `FastAPI()` \u002F `grpc.server()`:\n\n```python\nfrom archipy.helpers.utils.app_utils import AppUtils\nfrom archipy.configs.base_config import BaseConfig\n\napp = AppUtils.create_fastapi_app()\napp.include_router(create_\u003Cdomain>_v1_router(container))\n```\n\nuvicorn in `manage.py` with `**AppUtils.uvicorn_config(config)`: host and port from `config.FASTAPI` (`SERVE_HOST`,\n`SERVE_PORT`), the server settings (`RELOAD`, `PROXY_HEADERS`, `FORWARDED_ALLOW_IPS`, timeouts, workers, TLS) from\n`config.UVICORN` (archipy >= 5.25.0).\n\n## Do not\n\n- Version in path (`v1`, `v2`), not in business logic.\n- Do not re-implement CORS\u002Fexception handlers\u002Fstock gRPC interceptors AppUtils already wires.\n- Wire logic via DI container.\n- Never hardcode host\u002Fport.\n\n## Verify\n\n1. Run the repository's formatter and linter on generated Python.\n2. Run the Behave scenarios that exercise the route\u002Fservicer through the BDD harness (`\u002Fscaffold-bdd`); add one\n   when the endpoint is new.\n3. Confirm route\u002Fservicer registration, DTO mapping, domain-error mapping, and DI resolution.\n4. Run the `archipy-reviewer` subagent on the changes and fix every **Must fix** finding it reports.\n5. Report files, dependency changes, and commands run.\n\n## Docs\n\n- https:\u002F\u002Fsyntaxarc.github.io\u002FArchiPy\u002Fgetting-started\u002Fproject_structure\u002F\n- https:\u002F\u002Fsyntaxarc.github.io\u002FArchiPy\u002Ftutorials\u002Fhelpers\u002F\n","# Scaffold ArchiPy Service\n\n## Read first\n\nRead these plugin rules in full before generating files (paths relative to this skill directory; Claude Code: `${CLAUDE_SKILL_DIR}\u002F..\u002F..\u002Frules\u002F`):\n\n- `..\u002F..\u002Frules\u002Farchitecture-for-apps.mdc`\n- `..\u002F..\u002Frules\u002Fusing-archipy-utils.mdc`\n- `..\u002F..\u002Frules\u002Fusing-archipy-services.mdc`\n- `..\u002F..\u002Frules\u002Fconfig-and-di.mdc`\n\n## Before writing files\n\n1. Inspect existing transports, domain DTOs\u002Flogics, app bootstrap, DI wiring, and service tests.\n2. Infer domain, API version, framework, and sync\u002Fasync style when established by the repository.\n3. Ask only for unresolved choices. Default to `v1` and FastAPI only when no project convention exists.\n4. Preserve existing routes, servicers, and bootstrap code; integrate without overwriting.\n\n## Prefer ArchiPy\n\n```bash\nuv add \"archipy[fastapi]\"   # HTTP\nuv add \"archipy[grpc]\"      # gRPC\n```\n\n## Generate\n\n```text\nservices\u002F\u003Cdomain>\u002Fv{n}\u002F\n└── \u003Cdomain>_service.py\n```\n\n### FastAPI\n\n- Thin router: request → domain `*InputDTO` → logic → `*OutputDTO`.\n- Export `create_\u003Cdomain>_v{n}_router(container)` for `manage.py` \u002F app factory.\n- Paths follow the REST resource rule in `using-archipy-services.mdc`: `\u002Fapi\u002Fv1\u002Fusers\u002F{user_uuid}\u002Fcampaigns\u002F{campaign_uuid}\u002F...`\n  — kebab-case literal segments, plural collections, `UUID`-typed `snake_case` path params, `APIRouter(prefix=\"\u002Fapi\u002Fv1\")`.\n- JWT auth (Keycloak or other): compute `actor_uuid` = actor (`current_actor.id` \u002F `act`) first, else token subject (`user_id` \u002F `sub`); pass it in the\n  input DTO for `created_by*`\u002F`updated_by*`. Never use a path owner uuid (customer, merchant, admin, user…) as the actor (see `using-archipy-services.mdc`).\n- Map domain errors to HTTP status; no business rules \u002F atomic UoW decorators here.\n\n### gRPC\n\n- Thin servicer calling logic; sync servicers with `AppUtils.create_grpc_app`, async with `create_async_grpc_app`.\n- Export `register_\u003Cdomain>_v{n}_servicers(server, container)` that adds the servicers to a server built by\n  `AppUtils`; the entrypoint and the BDD harness (`\u002Fscaffold-bdd`) both call it, so neither binds a port inside it.\n- Do not mix sync\u002Fasync servicer styles on one server.\n- Request\u002Fresponse DTOs extend `BaseProtobufDTO` (`_proto_class`, `from_proto` \u002F `to_proto`); `from_proto` is the\n  validation boundary. Catch `ValidationError` and raise `InvalidArgumentError ... from e`; keep proto types out of\n  logics. See `rules\u002Fusing-archipy-models.mdc`.\n\n## Bootstrap (entrypoint)\n\nPrefer AppUtils — do not hand-roll bare `FastAPI()` \u002F `grpc.server()`:\n\n```python\nfrom archipy.helpers.utils.app_utils import AppUtils\nfrom archipy.configs.base_config import BaseConfig\n\napp = AppUtils.create_fastapi_app()\napp.include_router(create_\u003Cdomain>_v1_router(container))\n```\n\nuvicorn in `manage.py` with `**AppUtils.uvicorn_config(config)`: host and port from `config.FASTAPI` (`SERVE_HOST`,\n`SERVE_PORT`), the server settings (`RELOAD`, `PROXY_HEADERS`, `FORWARDED_ALLOW_IPS`, timeouts, workers, TLS) from\n`config.UVICORN` (archipy >= 5.25.0).\n\n## Do not\n\n- Version in path (`v1`, `v2`), not in business logic.\n- Do not re-implement CORS\u002Fexception handlers\u002Fstock gRPC interceptors AppUtils already wires.\n- Wire logic via DI container.\n- Never hardcode host\u002Fport.\n\n## Verify\n\n1. Run the repository's formatter and linter on generated Python.\n2. Run the Behave scenarios that exercise the route\u002Fservicer through the BDD harness (`\u002Fscaffold-bdd`); add one\n   when the endpoint is new.\n3. Confirm route\u002Fservicer registration, DTO mapping, domain-error mapping, and DI resolution.\n4. Run the `archipy-reviewer` subagent on the changes and fix every **Must fix** finding it reports.\n5. Report files, dependency changes, and commands run.\n\n## Docs\n\n- https:\u002F\u002Fsyntaxarc.github.io\u002FArchiPy\u002Fgetting-started\u002Fproject_structure\u002F\n- https:\u002F\u002Fsyntaxarc.github.io\u002FArchiPy\u002Ftutorials\u002Fhelpers\u002F\n",{"name":5,"description":7},"main","60b791bf9902a80e9a0bbac9d7cf04ea5c559af0","skills\u002Fscaffold-service",1,"https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin","https:\u002F\u002Fsyntaxarc.github.io\u002FArchiPy\u002F","https:\u002F\u002Fgithub.com\u002FSyntaxArc","A structured, modern approach to development.","2026-11-07 21:30:40",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add SyntaxArc\u002Farchipy-plugin --skill scaffold-service",{"tool":38,"command":39},"bunx","bunx skills add SyntaxArc\u002Farchipy-plugin --skill scaffold-service",{"tool":41,"command":42},"pnpm","pnpm dlx skills add SyntaxArc\u002Farchipy-plugin --skill scaffold-service","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-service\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M79GRZRMZGQ4N8DZY0JQ1TYC","scaffold-utils","Add or wire pure helpers\u002Futils, preferring ArchiPy utils (datetime, JWT, password, file, string). Use for \"add a helper\u002Futil function\", \"format dates\", \"hash passwords\", or \"generate tokens\".","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-utils\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M79GRSR9RZBGFSHY8F0G4Z95","scaffold-observability","Configure ArchiPy 5.x OpenTelemetry traces, metrics, logs, and instrumentation. Use for \"add tracing\u002Fmetrics\u002FOTel\", \"Prometheus\u002FPushgateway\", or migrating off Sentry, Elastic APM, or old Prometheus.","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-observability\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M79GRPK6B0S157614VXJCW5Y","scaffold-models","Scaffold ArchiPy models under models\u002F: domain\u002Frepository DTOs, errors, optional entities and types. Use for \"add DTO\u002Fschema\u002Frequest\u002Fresponse model\", \"new error type\", or \"SQLAlchemy entity\".","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-models\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M79GRK8F6RZPX6V4EA24379G","scaffold-logic","Scaffold an ArchiPy logic (use case) under logics\u002F{domain}\u002F with a unit-of-work decorator and DTO I\u002FO. Use for \"add business logic\", \"new use case\", \"transactional operation\", or \"service layer method\".","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-logic\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M79GRF6HFDN1RZMPZJM54TGR","scaffold-interceptor","Add or wire cross-cutting FastAPI\u002FgRPC interceptors or middleware, preferring ArchiPy's. Use for \"add middleware\", \"request ID\u002Flogging\u002Fauth interceptor\", or \"gRPC interceptor\".","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-interceptor\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M79GRAZBDYDTX9JMBX171KEK","scaffold-health-checks","Scaffold FastAPI\u002FgRPC liveness, readiness, and startup health checks, graceful shutdown, and optional Kubernetes probes. Use for \"health endpoint\", \"readiness\u002Fliveness probe\", or \"k8s probes\".","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-health-checks\u002FSKILL.md",[],[]]