/gloria:checking-coding-standardsfrom gloria
Use to check code against a project's registered gloria Coding Standards. Fires for plain requests to compare code with the rules — "check this against our standards", "does this drift from our rules/conventions", "are we following our own standards", "review this for standards compliance", "check this PR against our standards", "run a standards check", "audit the repo for drift", "has our code drifted from the rules" — including before or after implementing a change in a project that has registered standards. Runs diff-scoped checks (the per-PR workhorse), cheap metadata checks (render stamp + rule-evidence staleness), or a full audit (snippet staleness included), and reports findings to the gloria drift ledger via report_check_run. Read-only: findings, never edits.
Ships in gloria. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When the user asks to check, audit, or compare code against the project's
standards / rules / conventions — or asks whether code drifts from them —
that is this skill, driven by gloria's registered library (get_standards), not
an ad-hoc code review from memory. Reporting the findings — the sync half —
means calling the gloria MCP tool report_check_run, which records them to
gloria's drift ledger; it is not just printing a summary in chat. Load the
standards, evaluate, then report_check_run (even when findings are empty).
The probe half of gloria Coding Standards: evaluate code against the project's registered rules and snippet library, and report what has drifted to the backend ledger. The agent is the probe; the backend is the ledger — this skill never edits source, it only observes and reports.
Core principle: every finding traces to a specific rule or snippet id. A finding that can't name what it violates is a vibe, and vibes-based findings poison the ledger — they train people to dismiss it.
Don't use for: fixing the violations (report first; fixing is a separate, explicitly
requested task); repos with no registered standards — confirm with get_standards and stop if
version is null.
get_standards { projectSlug } → version N, rules[]
If version is null, there is nothing to check against — say so and suggest
extracting-coding-standards. Record startedAt (Unix seconds) now; every finding this run
produces must cite a ruleId or snippetId from what this call returned.
<!-- gloria:standards v<M> --> may live in CLAUDE.md,
AGENTS.md, or a standalone file either of those points to (e.g. CODING-STANDARDS.md) —
check all three and take the highest M found. M < N, or no stamp found anywhere, → one
render_stale finding, detail naming both versions and which locations were checked.evidence.sources files
changed since the rule's updatedAt (git log -1 --format=%ct -- <file>). Changed →
rule_stale finding for that ruleId. The rule may still be right — staleness means
"re-derive and confirm", not "wrong".git diff <last-checked>..HEAD when invoked
outside a PR. This is the workhorse — cheap enough to run per-PR.For each changed (or in-audit) file, against each rule whose scope covers it:
rule_violation — the code does what the instruction forbids (or omits what it
requires). Finding: ruleId, file, line, and a detail quoting the offending shape.unattributed_duplication — the code re-implements a pattern that has a canonical
snippet, with no gloria:snippet marker. Finding: snippetId, file, line.gloria:snippet <project>/<id> (verbatim|adapted) marker
exists: the id must resolve (via find_snippets or get_standards) and the code must be a
faithful adoption — structure matching, placeholders filled. A (verbatim) claim over a
structurally changed body, or a marker pointing at a nonexistent snippet, is a
rule_violation-grade finding against the snippet's linked rules (cite those ruleIds).snippet_stale — for each snippet, compare its structure to the repo's current dominant
instances of that pattern. If the living code has moved on (new field conventions, changed
layering) the exemplar is stale: finding with snippetId and what diverged.Before reporting, drop any finding that:
observed-authority rule. That's intent, not drift.
(enforced rules get no such exemption.)report_check_run {
projectSlug, kind: "diff" | "audit" | "metadata",
triggeredBy: "pr" | "manual" | "cron",
standardsVersionChecked: N,
scopeDetail: { diffRange?, prRef? },
startedAt, completedAt,
findings: [{ type, ruleId?, snippetId?, file?, line?, detail }]
}
Report even when findings are empty — a clean run resolves previously-open findings in its scope and refreshes last-checked for the staleness cron. Then summarize for the user: counts by type, the specific findings with file:line, and what auto-resolved.
| Mistake | Fix |
|---|---|
| Findings with no rule/snippet id | Guardrail 1: drop them; if the concern is real, propose a new rule instead |
| Flagging documented divergence | Read the adjacent comment; observed/snippet divergence with a reason is intent |
| Flagging uncovered languages/patterns | No coverage → no finding |
| Fixing violations in the same run | Read-only; report, then fix only on explicit request |
| Skipping the report because findings were empty | Empty reports resolve stale findings and feed last-checked |
| Diff runs re-reporting old, unchanged findings | Diff scope evaluates changed code; the ledger dedups by key, but keep detail current |
| Treating rule_stale as "rule is wrong" | It means "evidence changed — re-derive and confirm" |
get_standards loaded first; run aborted cleanly if no standards registeredreport_check_run submitted (even if empty) and the result summarizedWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub sandgardenhq/plugins --plugin gloria12 skills in this plugin
/debugging-production-errorsUse to investigate production problems through gloria's log debugging tools. Fires for plain requests about live behavior — "why is X failing in production", "what happened at 2pm", "debug these 500s", "is anything erroring right now", "check the logs", "what broke after the last deploy", "why are checkouts timing out" — for any project with a gloria log connection configured. Queries the org's own log provider live via the gloria MCP tools (get_log_provider_status, get_log_stats, list_error_groups, query_logs): find the spike, group the errors, correlate with the deploy, pull the stack trace, map it to source. Read-only over logs; never asks for credentials in chat./deriving-agent-code-styleUse when asked to turn a codebase's linter, formatter, and compiler configuration into agent-facing code style instructions — "write code style rules for agents", "summarize our lint rules as best practices", "add a Code Style section to CLAUDE.md / AGENTS.md", "what conventions should an agent follow in this repo". Reads every config layer per package, detects where linting silently doesn't run, mines observed conventions from the source, and emits an imperative Code Style section with each rule labeled by what enforces it./documenting-service-dependenciesUse to map, document, and register a codebase's service dependencies with gloria.dev so they are monitored. Fires for plain requests to sync a dependency or project with gloria — "register this dependency", "register this project", "register/sync our services with gloria", "start monitoring this service", "add this integration to gloria", "sync my project with gloria" — and to inventory them — "document our integrations/dependencies", "what external services does this connect to", "make a health-check doc". Also fires whenever you add, remove, or swap an external service, SaaS API, SDK, API client, database, queue, or internal endpoint. Produces four dependency Markdown docs (external SaaS inventory + health checks, internal systems inventory + health checks) plus, on a first-time pass, a project explainer and (for monorepos) a package/workspace map, and pushes all of it to gloria.dev via its MCP tools (register_project, put_dependency, put_document)./extracting-coding-standardsUse to set up or register gloria Coding Standards for a project. Fires for plain requests to register or sync standards with gloria — "register our coding standards with gloria", "sync our conventions with gloria", "save our rules to gloria", "register our coding conventions" — and to derive them — "extract our coding standards", "derive rules and snippets from this repo", "set up the standards library". Orchestrates deriving-agent-code-style and mapping-packages-for-coding-agents, structures their findings into stable rules (slug ids, authority labels, scope, evidence), mines one canonical placeholder-ized snippet per rule-implied pattern, registers everything via the gloria MCP tools (register_standard, put_rule, put_snippet) with per-item approval, and renders a version-stamped Coding Standards section into CLAUDE.md/AGENTS.md./identifying-skills-for-a-projectUse when asked which agent skills a project already uses and which additional ones would help the people and agents working on it, or to stock your org's gloria.dev skills library from a project's needs. Inventories the skills in play (session list + `.claude/` config + CLAUDE.md), profiles the stack, recommends the gaps, then — only with consent — saves the useful ones to the library by reusing, copying, or authoring a bundle, and offers a local or global install./investigating-production-incidentsUse to turn a production incident into a durable, shareable investigation folder in the repo — not just a chat answer. Fires for "investigate this", "write up this incident", "create an investigation for X", "start an investigation into checkouts failing", or any debugging-production-errors session the user wants preserved for handoff. Wraps the debugging-production-errors query methodology (get_log_provider_status, get_log_stats, list_error_groups, query_logs) with folder lifecycle: opens investigations/<date>-<slug>/, saves the specific evidence (redacted) that supports the diagnosis into evidence/, and writes INVESTIGATION.md with the root cause, deploy correlation, and fix recommendation. Read-only over logs; never asks for credentials in chat.