query-sub-agent
專責處理 IDF (Information Display Frame) 類型的需求。讀取規格目錄結構,生成/審查 Query Side 設計與實作。支援 Java、TypeScript、Go 多語言。
npx skills add majiayu000/claude-skill-registry --skill query-sub-agent-knowlet-pf-skills --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Query Sub-agent Skill ## 觸發時機 - analyze-frame 判定 frame_type=InformationDisplayFrame 時 - 需要建立/修改 Query Side (讀模型) 的查詢、投影時 - saga-orchestrator 分派 Query 類型任務時 ## 核心任務 1. 讀取規格目錄結構(frame.yaml, machine/) 2. 設計/驗證 CQRS Query Side 的查詢處理器與讀模型 3. 產出程式碼骨架或審查既有實作 4. 確保查詢效能與快取策略 --- ## 規格目錄讀取 本 Skill 讀取以下規格檔案: ``` docs/specs/{feature-name}/ ├── frame.yaml # 讀取 frame_concerns ├── requirements/ # 讀取查詢需求 │ └── req-{n}-{feature}.yaml ├── machine/ # 讀取 Query 規格 │ ├── query.yaml # Query Handler 規格 │ └── read-model.yaml # Read Model 規格 └── cross-context/ # 若需跨 BC 查詢 └── {context}.yaml ``` --- ## machine/query.yaml 格式 ```yaml # docs/specs/{feature-name}/machine/query.yaml query: name: "{FeatureName}Query" type: "single" # | list | paginated | aggregated # Input 定義 input: name: "{FeatureName}QueryInput" fields: - name: "id" type: "string" required: true # 分頁參數 (若 type=paginated) - name: "page" type: "number" default: 1 - name: "pageSize" type: "number" default: 20 # Output 定義 output: name: "{FeatureName}QueryOutput" type: "single" # | list | paginated fields: - name: "id" type: "string" - name: "name" type: "string" # 分頁輸出 (若 type=paginated) pagination: total: "number" page: "number" pageSize: "number
- 觸發時機
- 核心任務
- 規格目錄讀取
- machine/query.yaml 格式
- Claude Code Sub-agent 整合
- 被分派時的輸入格式
- TypeScript 範例
- Query Handler
- Paginated Query
- Read Model
- Go 範例
- 快取失效策略
- 品質檢查清單
- 常見錯誤防範
What does the query-sub-agent skill do?
專責處理 IDF (Information Display Frame) 類型的需求。讀取規格目錄結構,生成/審查 Query Side 設計與實作。支援 Java、TypeScript、Go 多語言。
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill query-sub-agent-knowlet-pf-skills --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
