Borrowing it
Nothing to install: this file belongs to lucky-aeon/AgentX. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/lucky-aeon/AgentX/master/.claude/commands/rag-publish-requirements.mdgit clone --depth 1 https://github.com/lucky-aeon/AgentXWrote 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/commands/lucky-aeon/agentx/rag-publish-requirements)<a href="https://agentmods.dev/commands/lucky-aeon/agentx/rag-publish-requirements"><img src="https://agentmods.dev/badge/commands/lucky-aeon/agentx/rag-publish-requirements/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/commands/lucky-aeon/agentx/rag-publish-requirements"><img src="https://agentmods.dev/badge/commands/lucky-aeon/agentx/rag-publish-requirements.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.00000 | $0.05743 |
| Opus 5 | $0.00000 | $0.02871 |
| Sonnet 5 | $0.00000 | $0.01149 |
| Haiku 4.5 | $0.00000 | $0.00574 |
Grade A, and why
rag-publish-requirements 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 10d 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 — 637 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RAG 发布功能需求规划
1. 核心设计原则
1.1 快照机制设计
- 完整快照:
rag_versions表包含完整的文件数据快照,不依赖原始数据 - 数据独立:版本快照创建后,原始数据的任何变更都不会影响快照
- 文件复制:发布时需要复制所有文件内容、向量数据、文档单元等
1.2 审核机制设计
- 必须审核:知识库发布到市场必须经过管理员审核
- 内容审核:需要审核知识库的内容是否合规
- 审核状态:审核中、已发布、拒绝、已下架
2. 数据库设计
2.1 RAG 版本表 (rag_versions) - 完整快照
CREATE TABLE rag_versions (
id VARCHAR(36) PRIMARY KEY,
-- 基本信息(快照时的数据)
name VARCHAR(255) NOT NULL, -- 快照时的名称
icon VARCHAR(255), -- 快照时的图标
description TEXT, -- 快照时的描述
user_id VARCHAR(36) NOT NULL, -- 创建者
-- 版本信息
version VARCHAR(50) NOT NULL, -- 版本号 (如 "1.0.0")
change_log TEXT, -- 更新日志
labels JSONB, -- 标签
-- 原始数据集信息(仅用于标识,不依赖)
original_rag_id VARCHAR(36) NOT NULL, -- 原始RAG数据集ID(仅标识用)
original_rag_name VARCHAR(255), -- 原始RAG名称(快照时)
-- 快照统计信息
file_count INTEGER DEFAULT 0, -- 文件数量
total_size BIGINT DEFAULT 0, -- 总大小
document_count INTEGER DEFAULT 0, -- 文档单元数量
-- 发布状态(需要审核)
publish_status INTEGER DEFAULT 1, -- 1:审核中, 2:已发布, 3:拒绝, 4:已下架
reject_reason TEXT, -- 审核拒绝原因
review_time TIMESTAMP, -- 审核时间
published_at TIMESTAMP, -- 发布时间
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMP
);
2.2 RAG 版本文件表 (rag_version_files) - 文件快照
CREATE TABLE rag_version_files (
id VARCHAR(36) PRIMARY KEY,
rag_version_id VARCHAR(36) NOT NULL, -- 关联RAG版本
-- 文件信息快照
original_file_id VARCHAR(36) NOT NULL, -- 原始文件ID(仅标识)
file_name VARCHAR(255) NOT NULL, -- 文件名
file_size BIGINT DEFAULT 0, -- 文件大小
file_type VARCHAR(50), -- 文件类型
file_path VARCHAR(500), -- 文件存储路径
-- 处理状态快照
process_status INTEGER, -- 处理状态
embedding_status INTEGER, -- 向量化状态
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMP
);
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.
- 10d ago First seen · 637 lines · 0 tokens per session scan A b01d0f5432fc
rag-publish-requirements is a command published in the GitHub repository lucky-aeon/AgentX (839 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,743 tokens. 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 commands, from other repositories
ingest
Manually add knowledge to the Weaviate store.
tune-vector-index
Recommend and generate optimized HNSW or IVFFlat index configuration given row count and query latency target. Outputs DROP + CREATE INDEX SQL with tuned parameters, EXPLAIN ANALYZE template, and pgvector-specific query-time settings (efsearch, probes).
laravel-vector-search
Add semantic/vector search with pgvector (Laravel 13+); use the laravel:vector-search skill exactly as written.
vector-search
Generate Oracle Database 23ai Vector Search implementation.
vector.batch_exists
Check existence for multiple vector keys.
vector.batch_upsert
Upsert multiple vectors in one itemwise batch.