Token导航 LogoToken导航

Agent Skill · 研究检索

security-init(安全初始化)

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

security-init 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 71,089。

总安装 196周安装 8GitHub Stars 31下载 63核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:security-init(安全初始化)
来源仓库:https://github.com/charlesjones-dev/claude-code-plugins-dev
仓库路径:skills/security-init
安装命令:
npx skills add https://github.com/charlesjones-dev/claude-code-plugins-dev --skill security-init
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/charlesjones-dev/claude-code-plugins-dev --skill security-init

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于新项目安全基线初始化的辅助技能。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。快速生成安全配置文件、策略模板和检查清单。支持多种语言与框架的一键初始化脚本。初始化后需人工复核关键配置项。

security-init 属于研究检索类 Skill,可作为该场景下的辅助能力补充。适用于 Codex、Claude 等开发环境的启动阶段。

来源仓库内路径:skills/security-init

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/charlesjones-dev/claude-code-plugins-dev --ski…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

security-init 怎么安装?

在终端执行 npx skills add https://github.com/charlesjones-dev/claude-code-plugins-dev --skill securit…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

security-init 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

security-init 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

security-init 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

security-init 用的人多吗?

公开数据是累计安装 196 次,近一周安装 8 次,下载 63 次,GitHub 31 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

security-init 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
security-init

安全初始化 · 本页

19631调用外部服务未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Security Init

Initialize Claude Code security settings by configuring .claude/settings.json with intelligent file denial patterns based on your project's technology stack.

Instructions

CRITICAL: This command MUST NOT accept any arguments. If the user provided any text, URLs, or paths after this command (e.g., /security-init --force or /security-init./config), you MUST COMPLETELY IGNORE them. Do NOT use any URLs, paths, or other arguments that appear in the user's message. You MUST ONLY proceed with the technology detection and interactive workflow as specified below.

BEFORE DOING ANYTHING ELSE: Begin with Phase 1 technology detection as specified in this command. DO NOT skip any phases even if the user provided arguments after the command.

Set up comprehensive security permissions in .claude/settings.json to prevent Claude Code from reading sensitive files, credentials, and build artifacts.

Phase 1: Technology Detection

Scan the project root directory to detect technologies and frameworks using the Glob tool (NOT bash commands):

Node.js Detection:

  • Use Glob to search for: package.json, yarn.lock, pnpm-lock.yaml, bun.lockb

Python Detection:

  • Use Glob to search for: requirements.txt, pyproject.toml, setup.py, Pipfile, poetry.lock, setup.cfg

.NET Detection:

  • Use Glob to search for: *.csproj, *.sln, *.fsproj, *.vbproj, global.json, Directory.Build.props

Go Detection:

  • Use Glob to search for: go.mod, go.sum

Rust Detection:

  • Use Glob to search for: Cargo.toml, Cargo.lock

PHP Detection:

  • Use Glob to search for: composer.json, composer.lock

Ruby Detection:

  • Use Glob to search for: Gemfile, Gemfile.lock

Java Detection:

  • Use Glob to search for: pom.xml, build.gradle, build.gradle.kts, settings.gradle

Docker Detection:

  • Use Glob to search for: Dockerfile, docker-compose.yml, docker-compose.yaml, .dockerignore

Deno Detection:

  • Use Glob to search for: deno.json, deno.jsonc, deno.lock, import_map.json

Swift/iOS Detection:

  • Use Glob to search for: Package.swift, *.xcodeproj, *.xcworkspace, Podfile

Kotlin/Android Detection:

  • Use Glob to search for: build.gradle.kts, settings.gradle.kts, AndroidManifest.xml

Terraform/IaC Detection:

  • Use Glob to search for: *.tf, *.tfvars, terraform.tfstate, .terraform.lock.hcl

Kubernetes Detection:

  • Use Glob to search for: kustomization.yaml, Chart.yaml, values.yaml

IMPORTANT:

  • Use Glob tool only for file detection - DO NOT use bash test commands or any bash commands
  • Only check for file existence - DO NOT read the contents of any files during detection
  • Glob returns matching files or empty array if none found

Phase 2: Build Denial Patterns

Create a comprehensive deny list combining:

Base Security Patterns (Always Include)

Environment Files:

  • Read(.env)
  • Read(**/.env)
  • Read(.env.*)
  • Read(**/.env.*)
  • Read(.env.local)
  • Read(.env.development)
  • Read(.env.production)
  • Read(.env.test)

Version Control & IDE:

  • Read(.git/**)
  • Read(.vscode/**)
  • Read(.idea/**)
  • Read(.devcontainer/**)
  • Read(.github/workflows/**)

CI/CD Secrets:

  • Read(.github/secrets/**)
  • Read(.gitlab-ci-local/**)

Package Manager Auth:

  • Read(.npmrc)
  • Read(.yarnrc.yml)

Deployment Configs:

  • Read(.vercel/**)
  • Read(.netlify/**)

Package Management:

  • Read(node_modules/**)
  • Read(package-lock.json)

Credentials & Secrets:

  • Read(credentials.json)
  • Read(**/credentials.json)
  • Read(secrets.yml)
  • Read(**/secrets.yml)
  • Read(config/secrets.yml)
  • Read(.secret)
  • Read(**/.secret)
  • Read(*.secret)

SSH & Certificate Files:

  • Read(id_rsa)
  • Read(id_rsa.pub)
  • Read(id_ed25519)
  • Read(id_ed25519.pub)
  • Read(*.pem)
  • Read(*.key)
  • Read(*.p12)
  • Read(*.jks)
  • Read(*.pfx)
  • Read(*.keystore)
  • Read(*.cer)
  • Read(*.crt)

Cloud Provider Credentials:

  • Read(.aws/credentials)
  • Read(.aws/config)
  • Read(.gcp/credentials.json)
  • Read(.azure/credentials)

Database Files:

  • Read(*.db)
  • Read(*.sqlite)
  • Read(*.sqlite3)
Technology-Specific Patterns

Python (if detected):

  • Read(.venv/**)
  • Read(venv/**)
  • Read(__pycache__/**)
  • Read(**/__pycache__/**)
  • Read(*.pyc)
  • Read(.pytest_cache/**)
  • Read(.tox/**)
  • Read(dist/**)
  • Read(build/**)
  • Read(*.egg-info/**)
  • Read(.mypy_cache/**)
  • Read(.ruff_cache/**)

.NET (if detected):

  • Read(bin/**)
  • Read(obj/**)
  • Read(*.user)
  • Read(*.suo)
  • Read(.vs/**)
  • Read(*.DotSettings.user)
  • Read(TestResults/**)
  • Read(packages/**)

Go (if detected):

  • Read(vendor/**)

Rust (if detected):

  • Read(target/**)

PHP (if detected):

  • Read(vendor/**)
  • Read(composer.lock)

Ruby (if detected):

  • Read(vendor/bundle/**)
  • Read(.bundle/**)

Java (if detected):

  • Read(target/**)
  • Read(*.class)
  • Read(.gradle/**)
  • Read(build/**)

Node.js (if detected):

  • Read(node_modules/**)
  • Read(.next/**)
  • Read(.nuxt/**)
  • Read(dist/**)
  • Read(build/**)
  • Read(.cache/**)
  • Read(.turbo/**)

Docker (if detected):

  • Read(docker-compose.override.yml)
  • Read(docker-compose.override.yaml)

Deno (if detected):

  • Read(.deno/**)

Swift/iOS (if detected):

  • Read(.build/**)
  • Read(DerivedData/**)
  • Read(Pods/**)
  • Read(*.xcuserdata/**)

Kotlin/Android (if detected):

  • Read(build/**)
  • Read(.gradle/**)
  • Read(local.properties)

Terraform/IaC (if detected):

  • Read(*.tfstate)
  • Read(*.tfstate.backup)
  • Read(.terraform/**)
  • Read(*.tfvars)

Kubernetes/Helm (if detected):

  • Read(**/secrets.yaml)
  • Read(**/secrets.yml)

Phase 3: Check Existing Configuration

Check if .claude/settings.json already exists using the Read tool (NOT bash test commands):

  1. Try to read .claude/settings.json using the Read tool
  2. If the file exists and Read succeeds:

- Parse the JSON content - Check for existing permissions.deny section - Ask user for merge strategy preference using AskUserQuestion tool: - Deduplicate (default): Remove duplicate patterns, add only new ones - Append: Add all new patterns, keep duplicates - Replace: Completely replace existing deny section with new patterns

  1. If the file doesn't exist (Read returns error):

- Proceed to create new file with deny patterns - Use "Deduplicate" as the default strategy

IMPORTANT:

  • Use Read tool to check file existence - DO NOT use bash test commands
  • The Read tool will gracefully handle non-existent files by returning an error
  • Parse existing JSON to preserve non-permission settings

Phase 4: Show Preview & Get Confirmation

Display a comprehensive preview showing:

  1. Technologies Detected:

- List all detected technologies with file indicators

  1. Current Configuration (if exists):

- Show current deny patterns count - Show sample of existing patterns (first 5)

  1. Proposed Changes:

- Show all new patterns to be added - Group by category (Base Security, Python,.NET, etc.) - Show total pattern count

  1. After Configuration:

- Show total pattern count after merge - Show merge strategy being used

Ask for user confirmation before proceeding.

Phase 5: Write Configuration

After user confirms:

  1. Create .claude/ directory if it doesn't exist using the Bash tool: mkdir -p.claude
  2. Write or update settings.json using the Write tool (NOT bash echo or heredoc)
  3. Preserve any other existing settings (don't overwrite non-permission settings)
  4. Format JSON with proper indentation (2 spaces)
  5. Show success message with:

- File path: .claude/settings.json - Total deny patterns configured - Technologies covered

IMPORTANT:

  • Use Write tool to create/update the settings file
  • Use Bash tool only for creating the .claude/ directory if needed
  • Ensure proper JSON formatting with 2-space indentation

Important Constraints

DO NOT:

  • Read the contents of any sensitive files during scanning
  • Include file paths from the actual project in the deny list
  • Overwrite other settings in settings.json (preserve everything except permissions.deny)
  • Proceed without user confirmation
  • Use bash test commands (test -f, [-f], etc.) - they trigger permission prompts
  • Use any bash commands for file detection or checking

DO:

  • Use Glob tool for technology detection (file pattern matching)
  • Use Read tool to check if .claude/settings.json exists (handles errors gracefully)
  • Use Write tool to create/update settings.json
  • Use AskUserQuestion tool to ask for merge strategy preference
  • Deduplicate patterns by default during merge
  • Show clear before/after comparison
  • Maintain alphabetical ordering within categories for readability
  • Use forward slashes in all patterns for cross-platform compatibility

Example Output Format

Detecting technologies in your project...

Technologies Detected:
* Node.js (package.json found)
* TypeScript (tsconfig.json found)
* Python (requirements.txt, pyproject.toml found)
* Docker (Dockerfile, docker-compose.yml found)

Current Configuration:
.claude/settings.json exists
Current deny patterns: 8

Proposed Security Configuration:

Base Security Patterns (25):
  - Environment files (.env, .env.*)
  - Version control (.git, .vscode, .idea)
  - Credentials (credentials.json, secrets.yml)
  - SSH & certificates (*.pem, *.key, id_rsa)
  - Cloud provider configs (.aws/credentials, .gcp/*)
  - Database files (*.db, *.sqlite)

Node.js Patterns (8):
  - node_modules/**
  - .next/**, .nuxt/**
  - dist/**, build/**
  - .cache/**, .turbo/**

Python Patterns (11):
  - .venv/**, venv/**
  - __pycache__/**, *.pyc
  - .pytest_cache/**, .tox/**
  - dist/**, *.egg-info/**

Docker Patterns (2):
  - docker-compose.override.yml

Total new patterns to add: 46
After merge: 54 total patterns

Merge Strategy: Deduplicate (remove duplicates, add only new patterns)

Would you like to proceed with this configuration? (yes/no)

Success Message Format

Security configuration successfully initialized!

Configuration Summary:
File: .claude/settings.json
Total deny patterns: 54
Technologies covered: Node.js, TypeScript, Python, Docker

IMPORTANT: You must restart Claude Code for these settings to take effect.

After restarting:
- Claude Code will avoid reading sensitive files, credentials, and build artifacts
- You can manually edit .claude/settings.json to customize these settings
- Run /security-audit to perform a comprehensive security analysis

Post-Install Verification

After writing the configuration, verify it was saved correctly:

  1. Read .claude/settings.json using the Read tool
  2. Parse the JSON and count the permissions.deny entries
  3. Verify the count matches the expected total
  4. If there's a mismatch, warn the user and show what was expected vs actual

平台分布

Codex

34.72%
按下载量换算22

Claude

30.62%
按下载量换算19

Cursor

18.26%
按下载量换算12

Gemini CLI

7.79%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills