sgcop-setup

sgcop-setup is a skill for Claude Code from SonicGarden/sgcop. It costs 169 tokens per session (5,794 once invoked), scanned A, original, MIT.

A setup guide for adding the sgcop Ruby and Rails code-checking rules to a project. RuboCop is a tool that finds style and quality problems in Ruby code.

In plain words
What is it for?
Use it to configure sgcop, clean up an existing RuboCop file, generate a list of current violations, and adjust rules that create too much noise.
Why use it?
It replaces manual rule-by-rule setup with a project-wide configuration and uses the project's actual violations to identify noisy rules.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: names the AskUserQuestion tool.

Good fit Use it to configure sgcop, clean up an existing RuboCop file, generate a list of current violations, and adjust rules that create too much noise.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sonicgarden/sgcop/sgcop-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SonicGarden/sgcop --skill sgcop-setup
Clone the repo
git clone --depth 1 https://github.com/SonicGarden/sgcop

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sgcop-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/sonicgarden/sgcop/sgcop-setup.svg)](https://agentmods.dev/skills/sonicgarden/sgcop/sgcop-setup)
Your own site
<a href="https://agentmods.dev/skills/sonicgarden/sgcop/sgcop-setup"><img src="https://agentmods.dev/badge/skills/sonicgarden/sgcop/sgcop-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 169 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,794 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00169 $0.05794
Opus 5 $0.00084 $0.02897
Sonnet 5 $0.00034 $0.01159
Haiku 4.5 $0.00017 $0.00579

Measured 2d ago against content hash 92008a259355, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

sgcop-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/sgcop-setup/SKILL.md · 260 lines

How it starts

The opening of the file, as written. The whole thing — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.

sgcop-setup

sgcop(SonicGarden 標準の RuboCop 設定・カスタム Cop を提供する Gem)を、導入先の Rails/Ruby プロジェクトにセットアップするためのスキル。このスキルは sgcop gem 本体ではなく、 sgcop を使う側のプロジェクトで実行される。

このスキルがやること / やらないこと

  • やる:
    1. 導入方針(標準 / strict)を確認して inherit_gem を整える。strict を選べば、汎用 Cop と カスタム Cop(Sgcop/*)がまとめて有効化される。
    2. 既存 .rubocop.yml から sgcop と重複・冗長な設定を削除する(承認のうえ)。
    3. gem 依存のカスタム CopSgcop/Enumerize* など、strict でもコメントアウトのまま)は、 対象 gem を使っているときだけ確認して有効化する。
    4. rubocop --auto-gen-config.rubocop_todo.yml を生成し、実際の違反(ノイズ)量を見る。
    5. ノイズが多い Cop だけ調整を提案する(無効化 / Exclude / 段階対応 / -a 自動修正)。 無効化・Exclude したら todo を作り直す。
  • やらない: 個別 Cop を 1 つずつ机上で有効化確認することはしない(strict 一括+実ノイズ確認に 置き換えた)。ただし標準を選んだ場合のフォールバックとしてだけ、デフォルト無効カスタム Cop の 1 つずつ確認を残す。すでにプロジェクトの .rubocop.yml に意図的に明示設定されている Cop (sgcop と異なる値の上書き)は尊重してスルーする。

なぜこの形か: sgcop の基本導入は inherit_gem 1 行で済み、判断が分かれる便利 Cop(カスタム + 実績ある推奨汎用)は strict 設定が 1 ファイルにまとめている。だから「1 つずつ確認」より 「方針を決めて strict を一括適用 → --auto-gen-config で実際のノイズを見て、多い Cop だけ調整」の 方が速く、判断も机上でなく実データに基づく。推奨 Cop のリストはスキルに持たず、sgcop 本体の strict 設定を唯一の出典にする(保守の一元化)。

重要な前提

  • Cop の一覧・趣旨・オプションは導入先にインストール済みの sgcop gem から動的に取得する。 スキル内にハードコードした一覧は「参考値」にすぎない。sgcop に Cop が追加・変更されても 動的取得なら自動追従でき、スキルが古びない。
  • config/default.yml 内の Cop 名(YAML キー)をそのまま使う。特に RSpec 系は Sgcop/Rspec/...Rspec 表記、README の RSpec とは違う)なので、必ず実ファイルの キーをコピーすること。.rubocop.yml のキーが gem 側と食い違うと設定が効かない。
  • 対話の主役は「実ノイズを見ての調整」(手順 6〜8)。Cop の有効化是非は strict 一括適用に委ね、 ユーザーへの確認は「重複削除の承認」「gem 依存 Cop の有無」「ノイズが多い Cop の扱い」に絞る。

手順

1. プロジェクト種別を判定する

Rails か純 Ruby かを判定し、inherit_gem の参照先(標準 / strict)の候補を決める。実際にどちらを 書き込むかは手順 3 の方針確認で決まる。純 Ruby の場合はさらに RSpec を使っているかも判定する (Gemfilerspec/rspec-corespec/spec_helper.rb の有無などで判定できる)。

  • Rails 判定: config/application.rb の有無、Gemfile / gemfile.lockrails 行、bin/rails など。
  • 参照先の候補:
    • Rails → 標準 rails/rubocop.yml / strict rails/rubocop_strict.yml (RSpec 関連設定は内部で ruby/rubocop_rspec.yml を継承しているので追加指定は不要)
    • 純 Ruby(RSpec 不使用) → 標準 ruby/rubocop.yml / strict ruby/rubocop_strict.yml
    • 純 Ruby(RSpec 使用) → 標準 [ruby/rubocop.yml, ruby/rubocop_rspec.yml] / strict [ruby/rubocop_strict.yml, ruby/rubocop_rspec_strict.yml](配列で複数ファイルを指定)

Read the full file on GitHub · 260 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 260 lines · 169 tokens per session scan A 92008a259355

Subscribe to this mod's changes

sgcop-setup is a skill published in the GitHub repository SonicGarden/sgcop (22 stars, last pushed 7d ago), licensed MIT. It adds 169 tokens to every session and 5,794 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

Other skills, from other repositories

ruby-refactor

Ruby refactoring guidelines from community best practices. This skill should be used when refactoring, reviewing, or restructuring Ruby code to improve design, readability, and maintainability. Triggers on tasks involving code smells, method extraction, conditional simplification, coupling reduction, design patterns…

pproenca/dot-skills · 65 tokens

gem-docs-review

Harvests offline documentation (README, CHANGELOG, public API) for every gem in a Ruby/Rails project's Gemfile.lock into a local cache, tracks gem versions in a manifest, and refreshes only gems whose version changed. Then reviews a git diff or pull request against that cache to surface (a) gem-upgrade impact …

VSN2015/concerns_on_rails · 152 tokens

simplify

Simplifies and refines Ruby on Rails code following 37signals patterns and the One Person Framework philosophy, while preserving exact functionality. Focuses on recently modified code unless instructed otherwise. Use this skill when simplifying or refactoring Rails code, reviewing recently written Rails code for…

maquina-app/rails-claude-code · 123 tokens

gemtracker

Analyze Ruby gem dependencies, vulnerabilities, outdated packages, maintenance health, and insecure gem sources with the gemtracker CLI. Use when asked to audit Ruby gems, check Gemfile.lock security, review dependency health, or run gemtracker.

spaquet/gemtracker · 49 tokens

code-review

Use when reviewing a Rails PR, diff, or merge request. Ground findings in a real file:line. Trigger words: review PR, code review, review my diff, CR.

igmarin/rails-agent-skills · 40 tokens

apply-code-conventions

Use when applying daily Rails conventions by path (DRY, YAGNI, PORO, CoC, KISS). Style defers to the project linter. Trigger words: conventions, clean code, RuboCop, DRY, YAGNI.

igmarin/rails-agent-skills · 58 tokens