ss-verify

GitHub

提供代码风格验证与提交前清理功能。通过运行 linter 检查格式、命名及规范,支持快速检查和完整预提交流水线,自动修复机械问题并阻断 CI 违规,确保代码符合项目约定。

.claude/skills/ss-verify/SKILL.md Serial-Studio/Serial-Studio

Trigger Scenarios

verify conventions check code style lint run code-verify sanitize the commit

Install

npx skills add Serial-Studio/Serial-Studio --skill ss-verify -g -y
More Options

Non-standard path

npx skills add https://github.com/Serial-Studio/Serial-Studio/tree/master/.claude/skills/ss-verify -g -y

Use without installing

npx skills use Serial-Studio/Serial-Studio@ss-verify

指定 Agent (Claude Code)

npx skills add Serial-Studio/Serial-Studio --skill ss-verify -a claude-code -g -y

安装 repo 全部 skill

npx skills add Serial-Studio/Serial-Studio --all -g -y

预览 repo 内 skill

npx skills add Serial-Studio/Serial-Studio --list

SKILL.md

Frontmatter
{
    "name": "ss-verify",
    "description": "Run Serial Studio's structural\/style linter and commit pipeline. Use before committing, when asked to \"verify conventions\", \"check code style\", \"lint\", \"run code-verify\", or \"sanitize the commit\". Wraps scripts\/code-verify.py and scripts\/sanitize-commit.py — the repo's style contract.",
    "allowed-tools": "Bash(python scripts\/code-verify.py:*), Bash(python scripts\/sanitize-commit.py:*)"
}

Serial Studio — verify & sanitize

The scripts in scripts/ are the style contract. Don't re-derive the rules from CLAUDE.md — run the linter and read its output.

Quick check (read-only)

Lint just the files you changed (fast, no writes):

python scripts/code-verify.py --check <files...>

--check reports issues and regenerates .code-report. Errors block CI; advisories are baseline debt — new code must still clear them. Hotpath violations (see [ss-hotpath]) are always blockers. To auto-fix formatting in place: python scripts/code-verify.py --fix <files...>.

Full pre-commit pipeline

Before any commit, run the top-level driver, which chains: chmod (POSIX) → expand-doxygen → clang-format → code-verify --fix → clang-format → code-verify --check → singleton-census gate (spec 0039, blocking) → tu-census gate (blocking) → black (Python) → documentation-verify → claim-verify gate (blocking) → generate-sdk (regenerates SerialStudio.js/.lua from api-schema.json) → generate-command-strings → generate-property-registry (regen + --check + --check-snapshot, specs 0036/0037) → registry-verify → search-index rebuild → changed-file summary. It only sanitizes the working tree — committing and pushing stay with the developer:

python scripts/sanitize-commit.py

Fixing what the linter reports

Mechanical findings (formatting, naming, header order, a missing [[nodiscard]]) need no ceremony — just fix them. When the fix is anything more — a suppression, a restructure, a signature change — first name the rule being violated and its cause in one sentence, then fix the cause, not the symptom (doc/claude/j-space.md, verbalize-to-load). Pattern-matched fixes silence the linter line while leaving the underlying issue (a suppression comment where a restructure was due, a renamed symbol that still leaks the design problem).

Reminders

  • Commit messages are Conventional Commits (feat|fix|chore|docs|style|refactor|perf|test(scope): …).
  • Markdown narration/marketing copy is linted by scripts/documentation-verify.py (writes .doc-report); CLAUDE.md is exempt.
  • Touching core/ or a source that could move there: also run python scripts/layer-verify.py (spec 0076) — it is not in the sanitize-commit.py chain but is a hard CI lint-job gate.
  • Only commit or push when the developer explicitly asks.

Version History

  • 44c9452 Current 2026-09-22 22:29
  • 615dff9 2026-08-28 20:00

    新增 claim-verify 门控以验证文档声明,增加 TU 大小限制门控,并将单例普查纳入 CI 流程。

  • cb2f5d2 2026-08-20 08:59

Same Skill Collection

.claude/skills/qt-cpp-review/SKILL.md
.claude/skills/qt-qml-review/SKILL.md
.claude/skills/ss-ai-audit/SKILL.md
.claude/skills/ss-hotpath/SKILL.md
.claude/skills/ss-implement/SKILL.md
.claude/skills/ss-log-mistake/SKILL.md
.claude/skills/ss-new-driver/SKILL.md
.claude/skills/ss-plan/SKILL.md
.claude/skills/ss-spec/SKILL.md
.claude/skills/ss-tasks/SKILL.md
.claude/skills/cpp-compiler-flags/SKILL.md
.claude/skills/qt-qml/SKILL.md
.claude/skills/ss-cpp-modern/SKILL.md
.claude/skills/ss-docs/SKILL.md

Metadata

Files
0
Version
89a23c2
Hash
e515f62c
Indexed
2026-08-20 08:59

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-31 14:50
浙ICP备14020137号-1