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:
| Method | Best for | Time |
|---|---|---|
| ssg push | Developers with ssg installed | <1 minute |
| ssg dashboard | GUI-first, no extra CLI needed | 1–2 minutes |
| MCP tool | AI agents (Claude Code, Codex, etc.) | Programmatic |
| REST API | Scripts and custom tooling | Programmatic |
| Manual form | One-off submissions | 2–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
ssginstalled — see Getting Started (Pro subscription required)- Signed in:
ssg auth login .rulesfiles 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:
- Check that you are signed in (it stops with
Not authenticatedif not) - Read the
.rulesfiles in.sigmashake/rules/ - Show the visibility and ask you to confirm a public push (
--yesskips the question) - 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 serverunning (http://localhost:5599)- GitHub CLI (
gh) authenticated — OR —SSG_GITHUB_CLIENT_IDenv var set for Device Flow
Steps
- Open
http://localhost:5599/hub/publish - If not connected, click Connect with GitHub — the dashboard uses
gh auth tokenautomatically, or falls back to GitHub Device Flow - Enter your GitHub repository URL and rules path
- 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:
| Status | Meaning |
|---|---|
| 401 | Missing or invalid GitHub token |
| 400 | Invalid repo URL or path |
| 422 | No .rules files found at the specified path |
| 200 | Success — ruleset_id in response |
Manual Form
- Visit hub.sigmashake.com/submit
- Click Manual submit tab
- Sign in with GitHub
- Enter your repository URL and rules path
- 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
.rulesfile with valid syntax (ssg lintpasses) - Rules in a public GitHub repository
- Each rule has a descriptive
MESSAGEfield
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.