Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/zuoyebang/aiweavenpx agentmods add skills/zuoyebang/aiweave/new-mq-consumerWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/zuoyebang/aiweave/new-mq-consumer)<a href="https://agentmods.dev/skills/zuoyebang/aiweave/new-mq-consumer"><img src="https://agentmods.dev/badge/skills/zuoyebang/aiweave/new-mq-consumer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/zuoyebang/aiweave/new-mq-consumer"><img src="https://agentmods.dev/badge/skills/zuoyebang/aiweave/new-mq-consumer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.01072 |
| Opus 5 | $0.00019 | $0.00536 |
| Sonnet 5 | $0.00008 | $0.00214 |
| Haiku 4.5 | $0.00004 | $0.00107 |
Grade A, and why
new-mq-consumer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
生成 MQ 消费者。
公共步骤模板见 skills-spec/01_skill_authoring_guide.md §A-§E。本 Skill 特定内容如下。
第 0 步:拒绝规则与依赖前置
- ⛔ 拒绝(§A.1):topic 命中
BUILD_STATUS.md§0 中 🚫 模块时立即拒绝 - 状态检查(§A.2):读
BUILD_STATUS.md§3 与 §6.2 - 依赖(§A.3):Consumer Client 基础设施可能不存在,首次运行必须先:
- 检查
helpers/kafka_consumer.go是否存在;不存在 → 先生成(按docs/architecture/helpers_api.md§3.2):var {Topic}SubClient *kafka.SubClient func InitKafkaConsumer(engine *gin.Engine) { {Topic}SubClient = kafka.InitKafkaSub(engine, conf.RConf.KafkaSub["{topic}"]) if {Topic}SubClient == nil { panic("init kafka consumer failed!") } } - 检查
conf/mount/resource.yaml有对应 kafkaSub 节 - 检查 cobra 子命令
{topic}-consumer在router/command.go::Commands注册并调helpers.InitKafkaConsumer(engine)
- 检查
第 1 步:读取设计文档(公共必读见 §B)
- 主文档:
docs/service/scheduled_tasks_design.md§3 - 额外必读:
docs/schema/database_design.md(落库表 / 按月分片)docs/architecture/pkg_api.md§kafka.SubClientdocs/cache/cache_design.md§2.x(Redis 联动 Hash 字段映射)
第 2 步:生成消费者代码
文件:controllers/mq/{topic}_consumer.go
package mq
import (
"{project}/helpers"
"{project}/models/db_xxx_call_log"
"{project}/pkg/gin"
"{project}/pkg/golib/v2/tlog"
)
type {Topic}Msg struct {
// 字段定义(与 Producer 侧 struct 一致)
}
func Start{Topic}Consumer(engine *gin.Engine) {
helpers.{Topic}SubClient.Subscribe(handle{Topic}Message)
select {} // block
}
func handle{Topic}Message(ctx *gin.Context, msg interface{}) error {
// 1. 反序列化
// 2. 攒批(200 条 / 5s)
// 3. 按时间月份分组 → 分表名
// 4. 批量 INSERT
// 5. HINCRBY 更新 Redis 日统计
// 6. 提交 offset
// 7. 失败 → 重试 3 次 → DLQ
}
第 3 步:注册消费者
router/mq.go:
package router
import (
mq_ctrl "{project}/controllers/mq"
"{project}/pkg/gin"
)
func Mq(engine *gin.Engine) {
go mq_ctrl.Start{Topic}Consumer(engine)
}
第 4 步:文档同步(公共项见 §C)
- 确认
scheduled_tasks_design.md§3 与实现一致 - 确认
database_design.md§4.5 MQ 链路一致 - 确认
routing.md§7 MQ 路由已登记 - 更新 BUILD_STATUS §6.2 状态
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 113 lines · 38 tokens per session scan A 4930807dd53f
new-mq-consumer is a skill published in the GitHub repository zuoyebang/aiweave (20 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 38 tokens to every session and 1,072 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
goframe-v2
GoFrame development skill. TRIGGER when writing/modifying Go files, implementing services, creating APIs, or database operations. DO NOT TRIGGER for frontend/shell scripts.
go
Use when writing, reviewing, testing, or shipping Go code and HTTP services: idioms, %w error wrapping, goroutine/context/errgroup concurrency, net/http 1.22 routing, log/slog, project layout, table-driven tests, Go hardening. NOT language-agnostic threat modeling (that is secure-coding), NOT Dockerfile/CI shipping…
go-services
Build Go HTTP services with contextual cancellation, middleware, tests, and compact deployable binaries.
new-feature-go
Pre-flight checklist for adding a new feature to a Go 1.22+ service. Load when creating a new endpoint, internal package, external integration, or background worker. Forces "accept interfaces, return structs", context.Context propagation, error wrapping, and bulkhead-per-provider from line one — prevents the most…
skill-go-gin-api
Padrões DARE para APIs REST em Go + Gin (ou stdlib net/http) + sqlc + PostgreSQL. Handlers, services, repositories, middleware, validação com go-playground/validator, JWT, rate limit, swag (OpenAPI), testes com testify e httptest.
golang-pro
Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming…