Agent Skills › civitai/civitai › generation-gate-rules

generation-gate-rules

GitHub

管理生成模型的门控规则,支持添加、移除和列出规则,使新模型对非管理员隐藏,用于部署前保护及发布时解除限制。

.claude/skills/generation-gate-rules/SKILL.md civitai/civitai

Trigger Scenarios

新模型代码部署前隐藏 发布时解除门控限制 查询当前门控规则状态

Install

npx skills add civitai/civitai --skill generation-gate-rules -g -y
More Options

Non-standard path

npx skills add https://github.com/civitai/civitai/tree/main/.claude/skills/generation-gate-rules -g -y

Use without installing

npx skills use civitai/civitai@generation-gate-rules

指定 Agent (Claude Code)

npx skills add civitai/civitai --skill generation-gate-rules -a claude-code -g -y

安装 repo 全部 skill

npx skills add civitai/civitai --all -g -y

预览 repo 内 skill

npx skills add civitai/civitai --list

SKILL.md

Frontmatter
{
    "name": "generation-gate-rules",
    "description": "Hide a generator ecosystem or model version from everyone except moderators — always \"available to moderators, hidden\" — and lift that gate again. Reads and writes the same generation gate rules the \/moderator\/generation-config page edits. Use before a new generator model's code deploys, and to remove the gate at launch. Called by onboard-generator-model; usable on its own."
}

Generation Gate Rules

node .claude/skills/generation-gate-rules/gate.mjs <command> [flags]

The rules model is described in docs/features/generation-gating-rules-model.md.

What add writes

The rule is always available to moderators, hidden, and that isn't configurable. Moderators see and can generate with the target. Everyone else never sees it. A hidden rule also blocks canGenerate across the whole site, so a version published while its rule is in place still can't be generated by non-mods.

Gate targets:

  • a new ecosystem: --ecosystem <EcosystemRecord.key>. The key is case-sensitive. A misspelled key has no effect, and nothing reports the mistake.
  • a new version in an existing ecosystem: --version <id>.

Adding the rule before the code deploys is safe. A rule that names something the running code doesn't know yet has no effect.

Commands

Command What it does
list [--json] Every rule on the site.
add --ecosystem <key> or add --version <id> [--message <m>] [--writable] Adds a rule this skill owns, with the id onboard-eco-<key> or onboard-mv-<id>.
remove --ecosystem <key> or remove --version <id> [--from-rule <id>] [--writable] Removes this skill's rule. With --from-rule, removes the target from a rule someone set by hand.
  • add is idempotent. If the rule already exists, it does nothing. If another rule already covers the target, it says so.
  • remove never edits a rule it doesn't own unless you pass --from-rule. Without the flag, it lists the hand-made rules that gate the target.
  • Writes touch one rule at a time (saveGateRule / deleteGateRule), so they never overwrite someone else's rules. remove --from-rule still reads the rule first, so an edit made to that rule in between is lost.

Another rule on the same target can override this one. "Available to nobody, hidden" is the kill switch: it hides the target from moderators too, and hidden from any rule that applies wins. Point that out to the user instead of editing their rule.

Setup

  • It uses CIVITAI_API_KEY from .claude/skills/mod-actions/.env, and it must belong to a moderator.
  • Every write is a dry run unless you pass --writable. Ask the user before each --writable call. Rules take effect on the live site immediately.

Version History

  • c706944 Current 2026-09-23 10:05

Same Skill Collection

.claude/skills/add-ecosystem/SKILL.md
.claude/skills/add-generation-support/SKILL.md
.claude/skills/add-prompt-enhancement-guide/SKILL.md
.claude/skills/add-training-support/SKILL.md
.claude/skills/axiom/SKILL.md
.claude/skills/browser-automation/SKILL.md
.claude/skills/civitai-orchestration/SKILL.md
.claude/skills/civitai-review/SKILL.md
.claude/skills/cleanup/SKILL.md
.claude/skills/clickhouse-query/SKILL.md
.claude/skills/clickup/SKILL.md
.claude/skills/cloudflare/SKILL.md
.claude/skills/component-preview/SKILL.md
.claude/skills/deploy-status/SKILL.md
.claude/skills/dev-server/SKILL.md
.claude/skills/discord/SKILL.md
.claude/skills/feature-walkthrough/SKILL.md
.claude/skills/feedback-triage/SKILL.md
.claude/skills/flipt/SKILL.md
.claude/skills/form-graph-port/SKILL.md
.claude/skills/freshdesk/SKILL.md
.claude/skills/generation-coverage/SKILL.md
.claude/skills/generator-launch/SKILL.md
.claude/skills/listing-media/SKILL.md
.claude/skills/meilisearch-admin/SKILL.md
.claude/skills/metabase/SKILL.md
.claude/skills/mod-actions/SKILL.md
.claude/skills/moderator-page-migration/SKILL.md
.claude/skills/onboard-generator-model/SKILL.md
.claude/skills/postgres-query/SKILL.md
.claude/skills/quick-mockups/SKILL.md
.claude/skills/redis-inspect/SKILL.md
.claude/skills/retool-migration/SKILL.md
.claude/skills/retool-query/SKILL.md
.claude/skills/scaffold-civitai-app/SKILL.md
.claude/skills/stripe/SKILL.md
.claude/skills/svelte-review/SKILL.md
.claude/skills/ux-design/SKILL.md
.claude/skills/write-model-description/SKILL.md
.claude/skills/xguard-manager/SKILL.md
apps/event-engine/.claude/skills/agent-review/SKILL.md
apps/event-engine/.claude/skills/clickhouse-query/SKILL.md
apps/event-engine/.claude/skills/clickup/SKILL.md
apps/event-engine/.claude/skills/postgres-query/SKILL.md
apps/event-engine/.claude/skills/redis-inspect/SKILL.md
.claude/skills/add-trainer-model/SKILL.md
.claude/skills/app-capture/SKILL.md
.claude/skills/app-taste/SKILL.md
.claude/skills/ecosystem-seo-page/SKILL.md

Metadata

Files
0
Version
b735b6b
Hash
0d1ed922
Indexed
2026-09-23 10:05

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-30 01:24
浙ICP备14020137号-1