/shia-guides:code-style-auditfrom shia-guides
Audit Claude-authored commits across all repositories Claude has worked in against the code-style guide, reporting violations plus guide defects (missing, dead, or ambiguous rules) the violations reveal. Run on demand from the dotfiles (marketplace) repo.
Ships in shia-guides. 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.
Measure whether Claude-authored code actually followed the code-style guide. The output serves two feedback loops: violations show where generated code fell short, and recurring or unjudgeable violations show where the guide itself is defective — a rule that is repeatedly violated is either being ignored or is too ambiguous to apply, and both are actionable.
Output is a report. Never modify the audited code or the guide as part of this skill.
The audit sweeps every repository Claude has worked in, discovered from local session transcripts — no filesystem-wide scanning, and no need to run the skill in each repo.
Repo discovery (transcript-based):
List project directories under ~/.claude/projects/. Directory names encode working paths, but the encoding is lossy — recover the real path from the cwd field of a transcript entry. Parse the JSON rather than pattern-matching raw text (transcripts quote arbitrary file contents, including this skill's own examples):
for d in "$HOME"/.claude/projects/*/; do
f=$(find "$d" -maxdepth 1 -name '*.jsonl' -print -quit)
[ -n "$f" ] && jq -r 'select(type=="object" and has("cwd")) | .cwd' "$f" 2>/dev/null | head -1
done | sort -u
Union with the repos already registered in ~/.claude/code-style-audit.json (the watermark file doubles as a durable repo registry). Transcripts are cleaned up after a retention period, so a repo audited once must never depend on transcripts to be rediscovered — only never-audited repos need transcript discovery, and those are recent by definition.
Keep paths that still exist and are git repositories ([ -e "$p/.git" ]); dedupe (several project dirs can map into the same repo).
Commit selection, per repo:
git log --grep='Co-Authored-By: Claude'.git log verbatim (rev-range or --since), same range for every repo.~/.claude/code-style-audit.json (a map of repo path → last audited commit) and audit <watermark>..HEAD.Delegation: audit each surviving repo in its own subagent (parallel), giving it the guide file paths, the repo path, its commit list, and the Judging rules below. Split a repo into batches if it has more than ~15 commits. Merge the reports afterwards.
Read the code-style skill's SKILL.md and the reference files for the languages present in the corpus. This skill is meant to run from the dotfiles (marketplace) repo, so prefer the working copy under the current repo (plugins/shia-guides/skills/code-style/) if it exists — found guide defects can then be fixed in place; otherwise use the installed plugin's code-style directory (sibling of this skill's base directory).
let/let! → setup blocks and memoized helpers; FactoryBot → fixtures or Model.create!. Judge the underlying principle, not the RSpec vocabulary.file:line (post-image), rule violated (short quote + source file), offending code (short quote), confidence with counter-argument where applicable.After delivering the report, write the newest audited commit hash to ~/.claude/code-style-audit.json under the repo's absolute path (create the file if missing). Skip the update when an explicit range argument was used for a re-audit of old commits — only advance, never rewind.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub riseshia/dotfiles --plugin shia-guides9 skills in this plugin
/code-styleriseshia's coding conventions. Use it always unless a project-specific convention (CLAUDE.md, style guides) exists./commitCreate a git commit with auto-generated message/draft-prCommit changes in logical units and create a Draft PR assigned to riseshia. Creates a new branch if on the base branch./ocr-reviewHigh-precision code review inspired by Alibaba Open Code Review. Script-driven pre-processing, per-file isolated review, three-layer false-positive reduction.