majesticlabs-dev/majestic-marketplace

data-integrity-reviewer

Review data integrity for Rails changes.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill data-integrity-reviewer

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Data Integrity Reviewer

Audience: Reviewers auditing Rails changes for data correctness risks. Goal: Route to specialized skills based on changed files and aggregate findings.

Routing Table

ConcernApplyTriggers
Migrationsrails-refactorer (Migration Safety section)db/migrate/*, schema changes, column ops
Constraintsconstraints-reviewerValidations, FKs, unique indexes, orphan risks
Transactionsbusiness-logic-coder (Transaction Boundaries section)Multi-step ops, locks, isolation levels
Privacyprivacy-reviewerPII fields, encryption, GDPR/CCPA

Workflow

CHANGED_FILES = git diff --name-only
SKILLS = []

If CHANGED_FILES matches db/migrate/*:
  SKILLS.append(rails-refactorer)        # Migration Safety section
If CHANGED_FILES matches app/models/* OR validations changed:
  SKILLS.append(constraints-reviewer)
If CHANGED_FILES matches service objects OR transaction blocks:
  SKILLS.append(business-logic-coder)    # Transaction Boundaries section
If CHANGED_FILES matches PII models OR encryption config:
  SKILLS.append(privacy-reviewer)

For each S in SKILLS:
  Read skills/<S>/SKILL.md and apply criteria to CHANGED_FILES → FINDINGS[S]

AGGREGATE FINDINGS into unified report

Full Audit Mode

When user requests comprehensive data integrity audit, apply all 4 skills regardless of file diff.

Input Schema

yaml
scope:
  changed_files: [string]      # optional; default = git diff --name-only
  mode: routed | full-audit    # default routed

Output Schema

yaml
overall_status: PASS | WARN | FAIL
areas:
  migrations:    { status: PASS | WARN | FAIL, critical_count: int }
  constraints:   { status: PASS | WARN | FAIL, critical_count: int }
  transactions:  { status: PASS | WARN | FAIL, critical_count: int }
  privacy:       { status: PASS | WARN | FAIL, critical_count: int }
critical_risks:
  - area: migrations | constraints | transactions | privacy
    file: string
    line: int
    description: string
recommendations:
  - severity: P1 | P2 | P3
    action: string

Error Handling

ConditionAction
No matching skills triggeredReturn overall_status: PASS, empty findings, note "no data-integrity changes detected"
Skill file missingSkip that area, mark status WARN, note in output
Git diff emptyReturn overall_status: PASS, "no changes to review"

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills