Privacy Review Railsのロゴ

Privacy Review Rails

組織
Codeminer42
privacy-review-rails

コミット前に、未コミットまたは最近変更されたファイルを確認し、GDPRやLGPDなどのプライバシー法に基づくプライバシー・バイ・デザインのルール違反がないか調べます。

概要

公開者Codeminer42
リポジトリskills
スキル名privacy-review-rails
スター
33
フォーク
2
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    Codeminer42がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Privacy Review Rails」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Codeminer42/skills/tree/main/privacy-review-rails
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Codeminer42/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/privacy-review-rails .claude/skills/privacy-review-rails
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでPrivacy Review Railsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にPrivacy Review Railsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Privacy Review Railsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Check Privacy — Review Changed Files

Prerequisite

Dependency path: !test -d "${CLAUDE_SKILL_DIR}/../privacy-by-design-rails" && echo "${CLAUDE_SKILL_DIR}/../privacy-by-design-rails" || echo "NOT_FOUND"

If the dependency path above is NOT_FOUND, stop and tell the user:

This skill depends on privacy-by-design-rails, which is not installed. Install it with: npx skills add codeminer42/skills --skill privacy-by-design-rails (add -g for global installation)

Do not proceed until the dependency is installed.

Step 1: Scan Changed Files + Related Files

If ruby is not found when running the command below, ask the user how to run Ruby in their environment instead of trying to resolve it yourself.

Run the scanner in --changed-only mode. This scans the changed files AND automatically pulls in related files (e.g., a changed migration pulls in its model and filter_parameter_logging.rb; a changed mailer template pulls in its mailer class):

bash
ruby ${CLAUDE_SKILL_DIR}/../privacy-by-design-rails/scripts/scanner.rb --changed-only

Parse the JSON output. It includes:

  • changed_files — files the developer actually modified
  • related_files — files pulled in for context (not changed, but affected by the changes)
  • findings — scanner findings across both changed and related files
  • checklist — privacy checklist status

If changed_files is empty, tell the user there are no privacy-relevant changes and stop.

Step 2: Deep-Dive on Changed Files

The scanner catches mechanical violations. Now verify the findings and check for things the scanner can't detect. For each changed file, apply the relevant checks from ${CLAUDE_SKILL_DIR}/../privacy-by-design-rails/references/pii-definition.md and the rules in ${CLAUDE_SKILL_DIR}/../privacy-by-design-rails/rules/:

For changed models:

  • PII classification: Read the model and its schema columns. Apply the Mandatory Classification Rules (Rules 1-4) from references/pii-definition.md to classify every column. Don't just rely on the scanner's pattern matching — check for domain-specific fields with non-standard names.
  • Encryption: Does every PII column have encrypts?
  • filter_attributes: Does the model declare self.filter_attributes listing all its PII fields?
  • ransackable_attributes: If the model defines ransackable_attributes, are sensitive fields (encrypted_password, reset_password_token) or PII fields exposed?

For changed migrations:

  • Read the corresponding model (from related_files) to check if encrypts declarations exist for new PII columns.
  • Check if config/initializers/filter_parameter_logging.rb (from related_files) includes the new PII field names.

For changed mailers/templates:

  • Check from: addresses for PII (user emails as sender).
  • Check subject lines for PII (names, emails visible in inbox previews).
  • Check template bodies: distinguish emails sent to OTHER users (violation) vs emails sent to the data subject themselves (acceptable — note with justification).

For changed jobs/workers:

  • Does the base class (ApplicationJob) set self.log_arguments = false?
  • Do perform parameters pass PII data instead of record IDs?

For changed controllers:

  • Is session[...] assigned a full ActiveRecord object instead of just an ID?
  • Do render json: responses include PII that shouldn't be exposed?

For changed initializers:

  • If it configures an error reporter (Rollbar, Sentry, Bugsnag): are scrub_fields configured? Is anonymize_user_ip enabled? Are person_*_method settings restricted to ID only?

For changed services:

  • Does the service send data to an external API? If so, does the payload include PII?

Step 3: Report

Group verified violations by severity (CRITICAL > HIGH > MEDIUM). For each violation:

  • Location: file:line
  • What's wrong: clear description
  • Correct pattern: code example from the relevant rule in ${CLAUDE_SKILL_DIR}/../privacy-by-design-rails/rules/
  • Changed vs related: note whether the violation is in a changed file (developer should fix) or a related file (pre-existing issue exposed by the change)

For scanner findings you verified as false positives, briefly explain why you dismissed them.

If no violations, tell the user their changes look privacy-compliant.

Step 4: Offer to Fix

Ask the user if they want fixes applied. Apply unambiguous fixes directly; ask about ambiguous ones (e.g., deterministic vs non-deterministic encryption, whether a field is genuinely PII).

よくある質問

AIスキル「Privacy Review Rails」では何ができますか?

コミット前に、未コミットまたは最近変更されたファイルを確認し、GDPRやLGPDなどのプライバシー法に基づくプライバシー・バイ・デザインのルール違反がないか調べます。

TypingMindでPrivacy Review Railsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Privacy Review Railsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにPrivacy Review Railsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Codeminer42/skills/tree/main/privacy-review-railsを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Privacy Review Railsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Privacy Review Railsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもPrivacy Review Railsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Privacy Review Rails」は無料ですか?

はい。Codeminer42がMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇