Skip to main content

Publishing Rules to the Hub

The SigmaShake Rules Hub is a public registry where anyone can publish .rules governance files. Once published, rules are discoverable by all users and installable with one command.

There are five ways to publish:

MethodBest forTime
ssg pushDevelopers with ssg installed<1 minute
ssg dashboardGUI-first, no extra CLI needed1–2 minutes
MCP toolAI agents (Claude Code, Codex, etc.)Programmatic
REST APIScripts and custom toolingProgrammatic
Manual formOne-off submissions2–3 minutes

ssg push​

The fastest path. One command pushes your local .rules files to the Hub API. It does not use GitHub or the gh CLI, and it does not create a GitHub repository. There is no ssg publish command (dated note 2026-10-14: this section replaces an earlier ssg publish section for a command the shipped CLI does not have).

Prerequisites​

  • ssg installed — see Getting Started (Pro subscription required)
  • Signed in: ssg auth login
  • .rules files in .sigmashake/rules/ (or another directory you give with --path)

Steps​

# 1. Go to your project with .rules files
cd your-project

# 2. Push the rules to the Hub
ssg push

ssg push will:

  1. Check that you are signed in (it stops with Not authenticated if not)
  2. Read the .rules files in .sigmashake/rules/
  3. Show the visibility and ask you to confirm a public push (--yes skips the question)
  4. Upload the rules in chunks of 10 and finalize the ruleset

Flags​

ssg push --path ./my-rules --desc "Team governance rules" # non-default rules directory and title
ssg push --private --org acme --name team-policies # private, org-scoped ruleset
ssg push --public --yes # public, skip the confirmation
ssg push --kind=workflows # Hub v2 pack kind

See ssg push in the CLI reference for every flag.

Without --public or --private, the plan sets the visibility: a paid plan pushes a private, org-scoped ruleset by default. A private push needs --org and --name. Create an org first with ssg orgs create <slug>.

Example output​

Pushing 3 rules in 1 chunk(s) to SigmaShake Hub [public]...
Uploading chunk 1/1... ✓
Finalizing ruleset...

────────────────────────────────────────────────────────────
Successfully published to SigmaShake Hub!
ID: <ruleset-id>
Rules: 3
URL: <hub-url>
────────────────────────────────────────────────────────────

For a private push, the output also shows Access: Private (org members only) and the command to install the ruleset on another machine. On an error, the command prints the reason on stderr and exits with a non-zero code.


ssg dashboard​

With ssg serve running, publish directly from the browser — no extra CLI commands needed.

Prerequisites​

  • ssg serve running (http://localhost:5599)
  • GitHub CLI (gh) authenticated — OR — SSG_GITHUB_CLIENT_ID env var set for Device Flow

Steps​

  1. Open http://localhost:5599/hub/publish
  2. If not connected, click Connect with GitHub — the dashboard uses gh auth token automatically, or falls back to GitHub Device Flow
  3. Enter your GitHub repository URL and rules path
  4. Click Publish — your ruleset is submitted to the hub API

This is useful when you prefer a GUI workflow or when working on a machine where ssg push isn't convenient.


MCP Tool​

AI agents (Claude Code, GitHub Copilot, Codex) can publish rules directly using the sigmashake_hub_submit MCP tool — no browser required.

Setup​

Add the MCP server to your AI client config:

{
"mcpServers": {
"sigmashake": {
"url": "https://mcp.sigmashake.com/sse"
}
}
}

Generate a GitHub token​

Go to github.com/settings/tokens and create a fine-grained or classic token with public_repo scope (read access to public repos is sufficient).

Tool call​

{
"name": "sigmashake_hub_submit",
"arguments": {
"repo_url": "https://github.com/alice/rules-typescript",
"path": ".sigmashake/rules",
"github_token": "ghp_xxxxxxxxxxxxxxxxxxxx"
}
}

Response:

{
"ok": true,
"ruleset_id": "a1b2c3d4-...",
"hub_url": "https://hub.sigmashake.com/ruleset/a1b2c3d4-...",
"rule_count": 13,
"technologies": ["ts"]
}

REST API (direct)​

You can also call the hub API directly without MCP:

curl -X POST https://hub.sigmashake.com/api/submit \
-H "Authorization: Bearer ghp_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"repo": "https://github.com/alice/rules-typescript",
"path": ".sigmashake/rules"
}'

Error responses:

StatusMeaning
401Missing or invalid GitHub token
400Invalid repo URL or path
422No .rules files found at the specified path
200Success — ruleset_id in response

Manual Form​

  1. Visit hub.sigmashake.com/submit
  2. Click Manual submit tab
  3. Sign in with GitHub
  4. Enter your repository URL and rules path
  5. Click Submit Ruleset

Creating rules for publication​

If you haven't written rules yet:

ssg init # scaffold .sigmashake/rules/ for your AI client
ssg lint # validate syntax
ssg check . # scan your project for violations

Rules must follow the .rules DSL format. See Rule Syntax for the full reference.

File naming convention: {technology}_{capability}_{description}.rules

ts_write_safety.rules # TypeScript write-safety rules
bash_exec_hygiene.rules # Bash execution hygiene
git_exec_destructive.rules # Git destructive-op guards

Minimum requirements for hub submission​

  • At least one .rules file with valid syntax (ssg lint passes)
  • Rules in a public GitHub repository
  • Each rule has a descriptive MESSAGE field

After publishing​

Once submitted, your ruleset is immediately live. Users can install it with:

ssg hub pull rules-typescript # by repo name
ssg hub pull github.com/alice/rules-typescript # by full URL

The hub re-syncs rulesets from GitHub weekly. To force a re-sync, visit your ruleset page and click Re-sync.