Token导航 LogoToken导航

Agent Skill · 开发规范

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

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

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

总安装 3,504周安装 146GitHub Stars 10下载 1,168核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/gohypergiant/agent-skills --skill accelint-security-best-practices

这个 Skill 是做什么的

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

用于安全审计、权限检查和常见漏洞排查,提供生产环境代码的安全指导。可梳理敏感配置、分析鉴权逻辑或生成安全复核清单,覆盖多框架场景。使用时不能将工具输出直接当作最终结论,需先确认最小权限和操作边界。涉及密钥、令牌或用户数据时,应优先脱敏并评估实际风险。

accelint-security-best-practices 属于开发规范类 Skill,可作为该场景下的辅助能力补充。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

accelint-security-best-practices 怎么安装?

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

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

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

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

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

accelint-security-best-practices 是免费的吗?

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

accelint-security-best-practices 用的人多吗?

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

accelint-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通过
accelint-security-best-practices

加速安全最佳实践 · 本页

3,50410接触敏感数据未明确未通过

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

SKILL.md 原文

Security Best Practices

Systematic security auditing and vulnerability detection for JavaScript/TypeScript applications. Combines audit workflow with OWASP Top 10 security patterns for production-ready code.

Framework-Agnostic Guidance: This skill provides security principles applicable across frameworks (Express, Fastify, Nest.js, Next.js, etc.). Code examples illustrate concepts using common patterns—adapt them to your project's specific framework and package manager (npm, yarn, pnpm, bun).

NEVER Do When Implementing Security

Note: For general best practices (type safety, code quality, documentation), use the respective accelint skills. This section focuses exclusively on security-specific anti-patterns.

  • NEVER hardcode secrets - API keys, tokens, passwords, or credentials in source code are immediately compromised when pushed to version control. Even private repositories leak secrets through employee turnover, third-party access, and git history. In 2024 breach analysis, 47% of exposed credentials came from .env files accidentally committed then 'deleted' (but preserved in git history). Attackers scan public GitHub commits within minutes of push. Use environment variables exclusively.
  • NEVER trust user input - Validate with schemas (Zod, Joi) covering type, format, size, and content.
  • NEVER concatenate user input into queries - Use parameterized queries, ORMs, or prepared statements exclusively. String concatenation in SQL, NoSQL, or shell commands enables injection attacks.
  • NEVER store sensitive data in localStorage - localStorage is vulnerable to XSS attacks where malicious scripts steal tokens. JWT tokens, session IDs, or credentials in localStorage persist across sessions and are accessible to any JavaScript code. Use httpOnly cookies for auth tokens.
  • NEVER skip authorization checks - Authentication verifies identity; authorization verifies permission. Attackers will manipulate IDs, skip authentication, or guess URLs. Every endpoint accessing resources must verify the requesting user owns that resource or has appropriate role.
  • NEVER expose detailed errors to users - Log server-side, return generic messages. Stack traces leak architecture for reconnaissance.
  • NEVER use Array.includes() for permission checks - Permission arrays with 100+ roles suffer O(n) lookup time and type safety issues. Use Set.has() for O(1) lookup or role-based access control (RBAC) with proper type checking.
  • NEVER skip rate limiting on APIs - Unlimited API requests enable brute force attacks (1000 password attempts/second), denial of service (exhaust server resources), or data scraping (enumerate all users/resources). Apply rate limits to all endpoints, with stricter limits on authentication and expensive operations.
  • NEVER log sensitive data - Passwords, tokens, credit cards, or personal information in logs persist in log aggregation systems, backups, and third-party services. Logs are accessible to more people than the application itself. Redact sensitive fields before logging.
  • NEVER use default configurations in production - Default secrets, disabled security headers, permissive CORS, or development modes in production create known vulnerabilities. Attackers scan for defaults. Harden all configurations for production environments.

Before Implementing Security, Ask

Apply these tests to ensure comprehensive security coverage:

Threat Assessment

  • What's the attack surface? Identify all points where user input enters the system (forms, APIs, file uploads, URLs)
  • What's the worst-case scenario? Consider data breaches, unauthorized access, service disruption, or financial loss
  • Who are the attackers? Script kiddies exploit known vulnerabilities; sophisticated attackers chain multiple weaknesses

Compliance Verification

  • Do I have authentication on all protected routes? Public APIs may be intentional, but verify each endpoint's access policy
  • Are authorization checks before operations? Verify ownership/permissions before reading, writing, or deleting resources
  • Is all user input validated? Check type, format, size, and content with schemas before processing

Defense in Depth

  • Is there a single point of failure? Layer defenses so one bypass doesn't compromise entire system
  • Are errors handled gracefully? Unhandled errors leak information; proper handling maintains security posture
  • Is logging sufficient for audit trails? Security events (login attempts, access denials, suspicious patterns) must be logged for incident response

How to Use

This skill uses progressive disclosure to minimize context usage:

1. Start with the Workflow (SKILL.md)

Follow the 4-phase audit workflow below for systematic security analysis.

2. Reference Security Rules Overview (AGENTS.md)

Load AGENTS.md to scan compressed security rule summaries organized by category.

3. Load Specific Security Patterns as Needed

When you identify specific security issues, load corresponding reference files for detailed ❌/✅ examples.

4. Use the Report Template

When this skill is invoked, use the standardized report format:

Template: assets/output-report-template.md

Security Audit Workflow

Two modes of operation:

  1. Audit Mode - Skill invoked directly (/accelint-security-best-practices <path>) or user explicitly requests security audit

- Generate a structured audit report using the template (Phases 1-2 only) - Report findings for user review before implementation - User decides which security fixes to apply

  1. Implementation Mode - Skill triggers automatically during feature work

- Identify and apply security fixes directly (all 4 phases) - No formal report needed - Focus on fixing vulnerabilities inline

Copy this checklist to track progress:

- [ ] Phase 1: Discover - Identify security vulnerabilities through systematic code analysis
- [ ] Phase 2: Categorize - Classify issues by OWASP category and severity
- [ ] Phase 3: Remediate - Apply security patterns from references/
- [ ] Phase 4: Verify - Validate fixes and confirm vulnerability closure

Phase 1: Discover Security Vulnerabilities

CRITICAL: Audit ALL code for security vulnerabilities. Do not skip code based on assumptions about exposure. Internal utilities, helpers, and data transformations are frequently exposed through APIs, file uploads, or user interactions even if their implementation appears isolated.

Perform systematic static code analysis to identify ALL security anti-patterns:

  • Hardcoded secrets (API keys, passwords, tokens)
  • Missing input validation (user data, file uploads, API responses)
  • Injection vulnerabilities (SQL, NoSQL, Command, XSS)
  • Broken access control (missing auth, no ownership checks, IDOR)
  • Insecure authentication (tokens in localStorage, weak session management)
  • Missing rate limiting (auth endpoints, expensive operations)
  • Sensitive data exposure (logs, error messages, client responses)
  • Security misconfiguration (default configs, missing headers, permissive CORS)
  • Vulnerable dependencies (outdated packages, known CVEs)
  • Missing CSRF protection (state-changing operations)
  • SSRF vulnerabilities (unvalidated URL fetching)

Output: Complete list of ALL identified vulnerabilities with their locations, severity, and OWASP category. Do not filter based on "likelihood" - report everything found.

Phase 2: Categorize and Assess Risk

For EVERY vulnerability identified in Phase 1, categorize by OWASP category and severity:

Categorize ALL vulnerabilities by OWASP Top 10 category:

OWASP CategoryCommon IssuesSeverity Range
A01: Broken Access ControlMissing auth, no ownership checks, IDORCritical-High
A02: Cryptographic FailuresHardcoded secrets, weak hashing, insecure storageCritical-Medium
A03: InjectionSQL, NoSQL, Command, XSS vulnerabilitiesCritical-High
A04: Insecure DesignMissing rate limiting, no input validationHigh-Medium
A05: Security MisconfigurationDefault configs, missing headers, dev mode in prodHigh-Low
A06: Vulnerable ComponentsOutdated dependencies, known CVEsCritical-Low
A07: Auth FailuresWeak session management, no MFA, credential stuffingCritical-High
A08: Data Integrity FailuresMissing CSRF, unsigned updatesHigh-Medium
A09: Logging FailuresNo security logging, insufficient monitoringMedium-Low
A10: SSRFUnvalidated URL fetching, internal network accessHigh-Medium

Severity Levels:

  • Critical: Direct path to data breach, remote code execution, or complete system compromise

- Examples: SQL injection, hardcoded production secrets, no authentication on admin endpoints

  • High: Likely to enable unauthorized access, data theft, or service disruption

- Examples: Missing authorization checks, XSS vulnerabilities, insecure session management

  • Medium: Could be exploited with specific conditions or chained with other vulnerabilities

- Examples: Missing rate limiting, weak CORS policy, insufficient logging

  • Low: Defense-in-depth improvements, best practices, or edge case protections

- Examples: Missing security headers, overly detailed error messages

Quick reference for mapping vulnerabilities:

Load references/quick-reference.md for detailed vulnerability-to-category mapping and anti-pattern detection.

Output: Categorized list of ALL vulnerabilities with their OWASP categories and severity levels. Do not filter or prioritize - list everything found in Phase 1.

Phase 3: Remediate Using Security Patterns

Step 1: Identify your vulnerability category from Phase 2 analysis.

Step 2: Load MANDATORY references for your category. Read each file completely with no range limits.

CategoryMANDATORY FilesOptionalDo NOT Load
Secrets Managementsecrets-management.md—all others
Input Validationinput-validation.mdfile-uploads.md (for file upload features)secrets, auth
Injection Preventioninjection-prevention.md—input validation, XSS
Authenticationauthentication.mdmfa.md (for multi-factor auth features)authorization, secrets
Authorizationauthorization.md—authentication
XSS Preventionxss-prevention.md—injection, CSRF
CSRF Protectioncsrf-protection.md—XSS, auth
Rate Limitingrate-limiting.md—auth, injection
Sensitive Datasensitive-data.md—secrets, logging
Dependency Securitydependency-security.md—all others
Security Headerssecurity-headers.md—XSS, CSRF
SSRF Preventionssrf-prevention.md—injection, input validation

Notes:

  • If vulnerability spans multiple categories, load references for all relevant categories
  • Security patterns are cumulative - apply defense in depth by addressing all categories
  • Load optional files when implementing specific features (file uploads, MFA, etc.)

Step 3: Scan for quick reference during remediation

Load AGENTS.md to see compressed security rule summaries organized by category. Use as a quick lookup while implementing patterns from the detailed reference files above.

Apply patterns systematically:

  1. Load the reference file for the identified vulnerability category
  2. Scan the ❌/✅ examples to find matching patterns
  3. Apply the security fix ensuring defense in depth
  4. Add comments explaining the security consideration and referencing the pattern

Example remediation:

// ❌ Before: SQL Injection vulnerability
const query = `SELECT * FROM users WHERE email = '${email}'`;
const user = await db.query(query);

// ✅ After: Parameterized query prevents injection
// Security: injection-prevention.md - parameterized queries
const user = await db.query(
  'SELECT * FROM users WHERE email = $1',
  [email]
);

Phase 4: Verify Security Fixes

Validate vulnerability closure:

  1. Review code to confirm vulnerability is fully addressed
  2. Verify no new vulnerabilities introduced by the fix
  3. Check defense in depth - are multiple layers protecting critical resources?

Security testing:

  1. Run existing test suite - all tests must pass
  2. Add security-specific tests for the vulnerability
  3. Consider penetration testing for critical vulnerabilities

Document security fix:

// Security fix applied: 2026-02-01
// Vulnerability: SQL injection via email parameter (Critical)
// OWASP Category: A03 - Injection
// Pattern: injection-prevention.md - parameterized queries
// Verified: All tests pass, manual SQL injection attempts blocked

Deciding whether to deploy the fix:

  • Critical vulnerabilities: Deploy immediately with emergency process if needed
  • High vulnerabilities: Deploy in next release cycle (days, not weeks)
  • Medium vulnerabilities: Deploy with next scheduled release
  • Low vulnerabilities: Deploy when convenient or batch with other security improvements

If tests fail: Fix the security implementation or find alternative solution. Security fixes should not break functionality.

Common Implementation Pitfalls

Security fixes sometimes conflict with existing functionality. Here are expert solutions for common scenarios:

Issue❌ Wrong Approach✅ Correct Approach
Parameterized queries break dynamic column sortingAdd try-catch, fall back to concatenationUse column name whitelist: const allowed = ['name', 'email', 'created_at']; if (!allowed.includes(column)) throw Error; then safely concatenate
Rate limiting breaks load testsDisable rate limiting in test environmentUse separate rate limit config for tests based on environment detection
CSRF tokens break API integration testsSkip CSRF validation in testsGenerate valid CSRF tokens in test setup using your CSRF library's token generation function
Input validation rejects legitimate edge casesLoosen validation rulesInvestigate the edge case - is it legitimate? If yes, update schema. If no, reject it. Real users shouldn't hit validation errors.
Authorization checks break admin impersonationSkip auth checks for admin usersImplement proper impersonation: admin gets temporary token with target user's permissions, logged for audit
HTTPOnly cookies break mobile app authStore tokens in localStorage for mobileUse secure token storage: iOS Keychain, Android Keystore, or platform-specific secure storage APIs

When Security and Functionality Conflict

Priority order:

  1. Never compromise on Critical vulnerabilities (SQL injection, hardcoded secrets, missing auth) - find alternative architecture
  2. High vulnerabilities can have slight trade-offs if properly documented and compensated with other controls
  3. Medium/Low vulnerabilities may be deferred if business justification is strong and risk is accepted

Documentation requirement for trade-offs:

// SECURITY TRADE-OFF DOCUMENTED: 2026-02-01
// Issue: Rate limiting breaks webhook ingestion from trusted partner
// Decision: Exempt partner IP range from rate limiting
// Compensating controls:
//   - IP whitelist strictly maintained (only 2 partner IPs)
//   - Separate monitoring for partner traffic
//   - Manual review of partner traffic daily
//   - 30-day review scheduled to implement alternative solution
// Risk accepted by: [Name], [Title]

Freedom Calibration

Calibrate guidance specificity to vulnerability severity:

Vulnerability SeverityFreedom LevelGuidance FormatExample
Critical (data breach, RCE)Low freedomExact pattern from reference, no deviation"Use parameterized query: db.query('SELECT * FROM users WHERE id = $1', [id])"
High (unauthorized access)Medium freedomPattern with examples, verify coverage"Implement RBAC or ownership checks before resource access"
Medium (defense in depth)Medium freedomMultiple valid approaches, pick based on architecture"Use rate limiting with express-rate-limit or implement custom middleware"
Low (best practices)High freedomGeneral guidance, implementation varies"Consider adding security headers for defense in depth"

The test: "What's the severity and blast radius?"

  • Critical/High severity → Low freedom with exact patterns to prevent mistakes
  • Medium severity → Medium freedom with validated approaches
  • Low severity → High freedom with general best practices

Important Notes

  • Audit everything philosophy - Audit ALL code for security vulnerabilities. Internal utilities, helpers, and data transformations are frequently exposed through APIs or user interactions even when they appear isolated. Do not make assumptions about security boundaries.
  • Report all findings - Perform systematic static analysis to identify and report ALL vulnerabilities with their severity and OWASP category. Do not filter based on "likelihood" of exploitation.
  • Reference files are authoritative - The patterns in references/ follow OWASP best practices. Follow them exactly unless security requirements dictate otherwise.
  • Defense in depth - Layer security controls so single vulnerability doesn't compromise entire system. Authentication + authorization + input validation + rate limiting.
  • Security testing - Security fixes require testing with malicious inputs and edge cases. Add tests for attack scenarios before deploying.
  • Incident response - Security logging and monitoring enable detection and response to attacks. Log all security events with sufficient detail for investigation.

Quick Decision Tree

Use this table to rapidly identify which security category applies and appropriate severity.

Audit everything: Identify ALL security vulnerabilities in the code regardless of current exposure. Report all findings with severity and OWASP category.

If You See...Vulnerability TypeOWASP CategoryTypical Severity
API key, password, or token in source codeHardcoded secretsA02: Cryptographic FailuresCritical
User input directly in SQL/NoSQL queryInjection vulnerabilityA03: InjectionCritical
No authenticate middleware on protected routeMissing authenticationA01: Broken Access ControlCritical
No ownership/permission check before resource accessMissing authorizationA01: Broken Access ControlHigh
JWT token in localStorage.setItem()Insecure token storageA07: Auth FailuresHigh
User input without schema validationMissing input validationA04: Insecure DesignHigh
No rate limiting on /api/login or /api/registerMissing rate limitingA04: Insecure DesignHigh
dangerouslySetInnerHTML without sanitizationXSS vulnerabilityA03: InjectionHigh
State-changing operation without CSRF tokenMissing CSRF protectionA08: Data Integrity FailuresHigh
Password, token, or PII in console.log()Sensitive data in logsA09: Logging FailuresMedium
Stack trace or database error sent to userInformation leakageA05: Security MisconfigurationMedium
npm audit shows vulnerabilitiesVulnerable dependenciesA06: Vulnerable ComponentsCritical-Low (varies)
fetch(userProvidedUrl) without validationSSRF vulnerabilityA10: SSRFHigh
No security headers (CSP, HSTS)Missing security headersA05: Security MisconfigurationMedium
Sequential user IDs without ownership checkIDOR vulnerabilityA01: Broken Access ControlHigh
CORS: * in productionPermissive CORSA05: Security MisconfigurationMedium
process.env.NODE_ENV!== 'production' check missingDev mode in productionA05: Security MisconfigurationMedium-Low

How to use this table:

  1. Identify the pattern from code review
  2. Find matching row in "If You See..." column
  3. Note the OWASP Category and Typical Severity
  4. Jump to corresponding Security Category in Phase 3
  5. Load MANDATORY reference files for that category

平台分布

Codex

32.64%
按下载量换算381

Claude

31%
按下载量换算362

Cursor

18.58%
按下载量换算217

Gemini CLI

9.91%
按下载量换算116

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

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

安装前确认

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

继续浏览同类 Skills