Help us improve
Share bugs, ideas, or general feedback.
From smg
Enforces SMG Rust repository quality gates before commits or PRs: cargo fmt, clippy linting, tests, Python bindings, and conventional commit checks.
npx claudepluginhub lightseekorg/smg-dev-guide --plugin smgHow this skill is triggered — by the user, by Claude, or both
Slash command
/smg:contributeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```
Enforces structured PR reviews in SMG Rust repository: fetch diff, map files to subsystem checklists (layering, config, workers, routing, parsers, storage), check anti-patterns, summarize findings.
Enforces pre-commit checklist with dead code checks (vulture), linting (ruff, pyright), shellcheck, code health review, coverage (pytest-cov), and git commit message standards including co-authorship.
Enforces AI-SDLC governance: no-merge/force-push rules, pre-commit TypeScript/pnpm checks (build/test/lint/format), git rebase, conventional commits. Auto-loads at session start.
Share bugs, ideas, or general feedback.
NO PR WITHOUT PASSING ALL QUALITY GATES
If you haven't run the verification commands in this message, you cannot claim the code is ready.
Violating the letter of this rule is violating the spirit of this rule.
BEFORE claiming code is ready, opening a PR, or committing:
1. FORMAT
Run: cargo +nightly fmt --all
Expected: No output (silent success)
If fails: Fix formatting, re-run
2. LINT
Run: cargo clippy --all-targets --all-features -- -D warnings
Expected: No warnings, no errors
If fails: Fix all warnings, re-run
3. TEST
Run: cargo test
Expected: "test result: ok" with 0 failures
If fails: Fix failures, re-run
4. BINDINGS (if config/types.rs, protocols/, or bindings/ changed)
Run: make python-dev
Expected: Successful compilation
If fails: Update struct literals, re-run
5. COMMIT FORMAT
Verify: Conventional commit (feat/fix/docs/refactor/test/perf/chore/ci)
Verify: DCO sign-off present (git commit -s)
Verify: No AI attribution
Skip any step = not verified. Run ALL five.
| Rule | Meaning |
|---|---|
unwrap_used = "deny" | No .unwrap(). Use ?, .ok_or(), .unwrap_or_else() |
expect_used = "warn" | Prefer ? over .expect() |
print_stdout/print_stderr = "warn" | Use tracing crate, not println!/eprintln! |
todo/unimplemented/unreachable = "deny" | No placeholder code |
allow_attributes = "warn" | Use #[expect(lint, reason = "...")] not #[allow] |
Disallowed: tokio::task::spawn | Use project's task spawning utilities |
Disallowed: uuid::Uuid::new_v4 | Use now_v7 |
// 1. Standard library
use std::collections::HashMap;
// 2. External crates (alphabetically)
use serde::{Deserialize, Serialize};
use tokio::sync::Mutex;
// 3. Internal crates
use crate::config::types::RouterConfig;
use thiserror::Error;
use anyhow::Context;
#[derive(Error, Debug)]
pub enum MyError {
#[error("failed to parse config: {0}")]
ParseError(String),
}
// In functions: use ? with context
let value = parse(input).context("parsing model config")?;
| "I need to..." | Go to |
|---|---|
| Add CLI flag | model_gateway/src/main.rs (CliArgs) |
| Change config | model_gateway/src/config/types.rs |
| Change worker creation | model_gateway/src/core/steps/worker/local/ |
| Change service discovery | model_gateway/src/service_discovery.rs |
| Change API types | crates/protocols/src/ (careful — shared by all crates) |
| Add routing policy | model_gateway/src/core/routing/ |
| Add tool parser | crates/tool_parser/src/parsers/ |
| Add reasoning parser | crates/reasoning_parser/src/parsers/ |
| Update Python bindings | bindings/python/src/lib.rs |
| Update Go SDK | bindings/golang/ |
| Add storage backend | crates/data_connector/src/ |
| Add E2E tests | e2e_test/ |
| Add WASM middleware | crates/wasm/examples/ |
| Add MCP tool support | crates/mcp/src/ |
| Excuse | Reality |
|---|---|
| "Clippy is clean enough with a few warnings" | -D warnings means zero. One warning = not clean. |
| "I didn't change bindings, skip step 4" | If you touched config/types.rs or crates/protocols/, the struct literal in bindings/python/src/lib.rs may need a default. Check. |
| "Only touched one file, don't need full gate" | The two-path config rule means a one-file change can silently break propagation. Run all five. |
| "Tests are slow, I'll run them later" | "Later" means shipping untested code. Run them now. |
| "It's just a docs change" | Even docs PRs need clean formatting and conventional commits. Steps 1 and 5 still apply. |
-s (DCO sign-off)Before submitting, self-review with smg:review-pr.
When implementing features, use smg:implement for subsystem-specific guidance.