Token导航 LogoToken导航

Agent Skill · 开发规范

security-best-practices(安全最佳实践)

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

security-best-practices 是开发规范类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在开发规范类的 1,265 个 Skill 里排第 407。

总安装 1,948周安装 82GitHub Stars 11下载 682核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/akillness/oh-my-skills --skill security-best-practices

这个 Skill 是做什么的

开发规范类 Skill 用来统一代码风格、目录结构和评审口径,产出多为检查清单或改写建议。

用于识别安全漏洞并提出最小化加固方案,聚焦关键风险层。适合审计敏感配置、依赖风险与认证流程,生成可执行的安全复核清单。使用时不能直接采纳工具输出为最终结论,需人工验证边界与权限范围。

安装命令:npx skills add https://github.com/akillness/oh-my-skills --skill security-best-practices 涉及密钥或生产环境操作时,必须确认最小权限原则与脱敏策略。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/akillness/oh-my-skills --skill security-best-p…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

security-best-practices 怎么安装?

在终端执行 npx skills add https://github.com/akillness/oh-my-skills --skill security-best-practices。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

security-best-practices 支持哪些 AI 工具?

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

security-best-practices 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

security-best-practices 是免费的吗?

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

security-best-practices 用的人多吗?

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

security-best-practices 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发规范类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
vercel-react-best-practices

Vercel React 最佳实践 · Codex、Claude

8,490,72025,918操作浏览器MIT通过
web-design-guidelines

网页设计指南 · Codex、Claude

6,686,01625,885需要联网MIT有提醒
remotion-best-practices

Remotion 最佳实践 · Codex、Claude

6,505,6323,027操作浏览器MIT有提醒
supabase-postgres-best-practices

Supabase Postgres 最佳实践 · Codex、Claude

3,175,5232,030需要联网MIT通过
next-best-practices

Next.js 最佳实践 · Codex、Claude

1,848,240841操作浏览器MIT通过
security-best-practices

安全最佳实践 · 本页

1,94811接触敏感数据未明确通过

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

SKILL.md 原文

Security Best Practices

Use this skill when the job is to name one missing security layer and turn it into a bounded hardening brief.

The job is not to dump a giant OWASP list, middleware catalog, or scanner parade. The job is to:

  1. frame the surface and risk,
  2. choose one primary hardening mode,
  3. recommend the smallest credible first slice,
  4. name the verification ladder,
  5. route adjacent work honestly.

Read these support docs first:

When to use this skill

  • A team says “make this secure” and the missing security layer is still unclear
  • A web app, API, marketing-site flow, admin panel, or game-service surface needs a hardening pass before launch or migration
  • You need to decide whether the main problem is CSP/headers, cookies/CSRF, abuse controls, validation/unsafe execution, secret handling, or weak verification
  • Scanner findings, OWASP requests, or launch-review notes need to be converted into one prioritized hardening brief
  • The current stack has some controls already, but trust is low and the next verification step is unclear

When not to use this skill

  • The main job is choosing an auth vendor, session architecture, org/member model, or enterprise SSO path → authentication-setup
  • The main job is API contract/interface design before security controls are slotted in → api-design
  • The main job is schema constraints, token tables, indexes, or migration safety → database-schema-design
  • The main job is backend regression coverage or auth/security test implementation → backend-testing
  • The main job is fixing a specific vulnerability in code or reviewing a concrete diff → debugging or code-review
  • The main job is secret injection mechanics, toolchain bootstrapping, or environment wiring → system-environment-setup / environment-setup
  • The main job is cloud IAM, VPC/network, or broader infrastructure security → use the infrastructure-specific skill instead of this app-hardening anchor

Instructions

Step 1: Frame the hardening job before naming tools

Capture the minimum facts first.

security_intake:
  surface: frontend | backend-api | fullstack | edge-worker | marketing-site | game-service-web | mixed | unknown
  workflow_type: new-build | hardening-pass | audit-review | launch-readiness | incident-follow-up | migration
  auth_session_model: cookie-session | bearer-token | mixed | unknown
  current_controls:
    - headers-csp
    - csrf
    - rate-limit
    - validation
    - secret-store
    - scanning
    - none
  primary_risk: xss-browser-policy | csrf-session | abuse-automation | injection-unsafe-execution | secret-exposure | verification-gap | mixed | unknown
  environments: local | preview | staging | prod | multi-env | unknown
  ownership: app-team | platform | security | shared | unknown

Rule: do not start with “install Helmet,” “turn on CORS,” or “just add WAF rules.” First label the missing layer.

Step 2: Choose exactly one primary hardening mode

Use the router in references/mode-packets-and-route-outs.md.

Primary modes:

  1. browser-perimeter-policy
  2. session-cookie-csrf
  3. abuse-controls
  4. validation-unsafe-execution
  5. secrets-runtime-config
  6. review-verification

Pick the highest-risk missing layer as primary. List everything else as follow-up, not as equal co-owners.

Step 3: Keep the invariants visible

These rules survive every answer:

  • CORS, auth, CSRF, rate limiting, validation, and secrets are separate concerns even when they touch the same route
  • browser-policy work may need staged rollout or report-only verification
  • framework defaults help, but they do not prove full coverage
  • secret scanning is detection, not storage/rotation policy
  • WAF and rate limiting are compensating/perimeter controls, not full substitutes for app-layer fixes
  • every recommendation needs a matching verification step

Step 4: Build the security hardening brief

Return this structure:

# Security Hardening Brief

## Scope
- Surface: ...
- Workflow type: ...
- Primary mode: ...
- Confidence: high | medium | low

## Current control state
- Controls already present: ...
- Missing or untrusted controls: ...

## Highest-risk gaps
1. ...
2. ...
3. ...

## Recommended first slice
1. ...
2. ...
3. ...

## Verification plan
- Manual review: ...
- Static/policy checks: ...
- Dynamic/runtime verification: ...
- Operational evidence: ...

## Ownership and route-outs
- Primary owner: ...
- Adjacent skills / teams: ...

Step 5: Use the mode packet, not a giant checklist

Pull the packet from references/mode-packets-and-route-outs.md.

Mode rules:

  • browser-perimeter-policy → headers, CSP, framing, secure transport, report-only rollout, proxy/CDN vs app ownership
  • session-cookie-csrf → cookie flags, state-changing browser routes, origin assumptions, web vs API/mobile differences
  • abuse-controls → login/reset/form/expensive-endpoint protection, per-route vs global limits, bot carve-outs, monitoring
  • validation-unsafe-execution → trust boundaries, validation/encoding, uploads, SSRF, command execution, dangerous patterns
  • secrets-runtime-config → secret-vs-config separation, storage/injection, least privilege, rotation/revocation, client-bundle avoidance
  • review-verification → classify findings, keep/fix/add/defer decisions, smallest proof ladder, honest ownership

Step 6: Route adjacent work explicitly

Use these route-outs when the problem crosses boundaries:

If the real job is...Route to...
auth vendor choice, enterprise SSO, org/member model, hosted-vs-native authauthentication-setup
API auth/error/webhook contract designapi-design
schema constraints, token tables, migration/data-model safetydatabase-schema-design
backend security regression tests or CI gatesbackend-testing
concrete vulnerability fix or risky diff reviewdebugging / code-review
environment bootstrap or secret injection wiringsystem-environment-setup / environment-setup

Output expectations

A strong answer from this skill should:

  1. identify the primary missing layer,
  2. recommend one bounded first slice,
  3. name the verification ladder,
  4. avoid pretending one library/tool solves everything,
  5. route adjacent work outward instead of absorbing it.

Examples

Example 1: cookie-based admin app hardening

Input

Our Next.js admin app uses cookie sessions. POST routes lack CSRF protection and staging/prod cookie flags drift.

Output direction

  • choose session-cookie-csrf
  • identify which routes need CSRF protection and which cookie flags must be fixed
  • include a verification step for staging/prod drift
  • avoid reframing the task as auth-vendor selection

Example 2: marketing-site form abuse

Input

Our signup and demo-request forms are getting spammed even after adding a honeypot and CAPTCHA.

Output direction

  • choose abuse-controls
  • separate form abuse controls from generic CSP/header work
  • recommend route-aware throttles / anti-automation steps plus monitoring
  • keep broader infrastructure or vendor-rule authoring outside the core brief

Example 3: game-service secret leakage risk

Input

We have a game companion site plus backend APIs. I’m worried partner keys and admin tokens are drifting into CI logs and maybe client bundles.

Output direction

  • choose secrets-runtime-config
  • separate secret detection from storage/rotation/injection policy
  • route environment bootstrapping details away when needed
  • include revocation/rotation proof requirements

Example 4: scanner report with weak ownership

Input

The scanner says weak CSP and missing headers, but the app already added middleware and no one trusts the result.

Output direction

  • choose review-verification or browser-perimeter-policy
  • keep middleware installation distinct from rollout proof
  • recommend staged/report-only verification or a scanner/runtime handoff

Best practices

  1. Choose the missing security layer before naming tools.
  2. Keep browser policy, session safety, abuse controls, validation, secrets, and verification separate.
  3. Pair every recommendation with evidence that would prove it worked.
  4. Treat framework defaults and scanners as inputs, not final answers.
  5. Prefer one bounded hardening brief over a giant compliance dump.

References

平台分布

Codex

36.69%
按下载量换算250

Claude

30.39%
按下载量换算207

Cursor

19.59%
按下载量换算134

Gemini CLI

11.12%
按下载量换算76

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills