ワンクリックで
query-layer-discipline
Keep reads in selectors/querysets and keep write logic in services without using jig.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Keep reads in selectors/querysets and keep write logic in services without using jig.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
When the user wants to codify a repeatable code generation pattern into a jig recipe — design variables, choose operations (create/inject/patch/replace), write Jinja templates, and validate the result. Use when someone says "I keep writing this same boilerplate", "make a recipe for X", or wants to turn a manual edit into an automated pattern.
When the user needs to chain multiple jig recipes into a multi-step workflow with conditional execution and shared variables. Use when a pattern spans multiple files that need coordinated creation and modification, like scaffolding an entire endpoint or a full feature slice.
Scaffold queryset/manager/selector layers and wire view reads through selector entrypoints with jig.
Generate two-step rollout-safe Django migrations plus model-field patching using jig.
Insert consistent method/step structured logging lines into target functions using jig.
Write deterministic service tests with stable fixtures and boundary mocks without using jig.
| name | query-layer-discipline |
| description | Keep reads in selectors/querysets and keep write logic in services without using jig. |
Use this skill when introducing new read patterns. Implement the file edits directly. Do not return a checklist-only response.
model_namequeryset_namemanager_nameselector_nameselector_fileview_namemodels.py, selectors.py, and views.py.models.py, define class EntityQuerySet(models.QuerySet) with an active(self) method returning self.filter(status="active").models.py, define class EntityManager(models.Manager) with:get_queryset(self) returning EntityQuerySet(self.model, using=self._db)active(self) returning self.get_queryset().active()class Entity(models.Model), assign objects = EntityManager() before the field declarations.selectors.py, import Entity from .models.selectors.py, define def select_active_entities(): returning a parenthesized chained expression:Entity.objects.active().select_related()views.py, import select_active_entities from .selectors.entity_list, assign records = select_active_entities() and preserve return {"results": []}.