npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-security-setup

v1.0.3

Published

Interactive security setup skill for Claude Code - permissions deny-first, 3-layer hook guard, sandbox hardening, and more

Readme

Claude Code Security Setup

Claude Codeのセキュリティ設定をインタラクティブにセットアップするスキルです。

クイックスタート

# プロジェクトディレクトリで実行
npx claude-security-setup

# Claude Code を起動して実行
/security-setup

代替: bash でインストール

cd your-project
bash /path/to/claude-code-starter-kit/install.sh

設定可能な項目

/security-setup を実行すると、以下の項目を個別に選択してセットアップできます。

コアセキュリティ

| 項目 | 内容 | |------|------| | Permissions deny-first | 50+の危険操作(rm -rf, sudo, curl|bash, .envアクセス等)をdenyルールでブロック | | Hook Guard 3層防御 | プロンプトインジェクション検出・危険コマンド自動ブロック・ツール出力監視 | | Sandbox 強化 | ファイルシステム・ネットワークをOSレベルで制限(allowedDomainsカスタマイズ可) | | Planモードデフォルト化 | 実行前に必ず計画を確認するモードをデフォルトに |

追加ハードニング

| 項目 | 内容 | |------|------| | CLAUDE.md セキュリティポリシー | OWASP遵守・機密ファイル禁止・レビュー必須等のポリシーを追記 | | .gitignore 機密ファイル除外 | .env*, *.pem, *.key, credentials.json等をgitignoreに追加 | | Telemetry OFF | テレメトリ送信を無効化 | | Bypass モード無効化 | bypassPermissionsモードの使用を禁止 |

ガイダンス(手動設定)

セットアップ完了後、以下の手動設定についてもガイダンスが表示されます:

  • プライバシー設定: claude.ai → Settings → Privacy → Help Improve Claude OFF
  • managed-settings.json: チーム全員への設定強制(テンプレート付き)
  • devcontainer: Docker隔離環境(テンプレート付き)
  • MCP制御: 未使用MCPサーバーの削除
  • 定期監査: /permissions, /status, /hooks の定期実行

Hook Guard(3層防御)

hook_guard.mjs は以下の3層でセキュリティを確保します(Node.jsで動作、Python不要):

| 層 | イベント | 機能 | |----|----------|------| | 第1層 | UserPromptSubmit | プロンプトインジェクション検出(英語・日本語16+パターン) | | 第2層 | PreToolUse | 危険コマンド(25+パターン)・機密ファイルアクセス(20+パターン)のブロック | | 第3層 | PostToolUse | ツール出力に含まれるインジェクションパターンの監視・警告 |

ブロックイベントは .claude/security-audit.log に自動記録されます。

テンプレート一覧

templates/ ディレクトリに以下のテンプレートが含まれています:

| ファイル | 用途 | |----------|------| | settings-permissions.json | permissions deny-firstルール | | settings-sandbox.json | sandbox設定 | | settings-hooks.json | hooks設定 | | managed-settings.json | チーム向けmanaged設定 | | devcontainer.json | devcontainer設定 | | claude-md-security.md | CLAUDE.mdセキュリティポリシー | | gitignore-additions.txt | .gitignore追記パターン |

セットアップ後の削除

/security-setup の最後に、スキル自体を削除するか選択できます。 削除しても、セットアップ済みの設定ファイル(settings.json, hook_guard.mjs, CLAUDE.md等)はそのまま残ります。

ライセンス

MIT