Token导航 LogoToken导航

Agent Skill · 研究检索

coding-standards(编码标准)

coding-standards 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

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

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

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:coding-standards(编码标准)
来源仓库:https://github.com/shinpr/ai-coding-project-boilerplate
仓库路径:skills/coding-standards
安装命令:
npx skills add https://github.com/shinpr/ai-coding-project-boilerplate --skill coding-standards
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/shinpr/ai-coding-project-boilerplate --skill coding-standards

这个 Skill 是做什么的

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

coding-standards 用于查找、检索和筛选相关信息。适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。当前尚无详细功能描述,需查阅原始 SKILL.md 获取更多信息。

来源仓库内路径:skills/coding-standards

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

coding-standards 怎么安装?

在终端执行 npx skills add https://github.com/shinpr/ai-coding-project-boilerplate --skill coding-stan…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

coding-standards 支持哪些 AI 工具?

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

coding-standards 需要什么权限?

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

coding-standards 是免费的吗?

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

coding-standards 用的人多吗?

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

coding-standards 安全吗?

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

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

值得选的地方

  • 同时适配 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调用外部服务未明确有提醒
coding-standards

编码标准 · 本页

194191调用外部服务未明确通过

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

SKILL.md 原文

Universal Coding Standards

Technical Anti-patterns (Red Flag Patterns)

Immediately stop and reconsider design when detecting the following patterns:

Code Quality Anti-patterns

  1. Writing similar code 3 or more times - Violates Rule of Three
  2. Multiple responsibilities mixed in a single file - Violates Single Responsibility Principle (SRP)
  3. Defining same content in multiple files - Violates DRY principle
  4. Making changes without checking dependencies - Potential for unexpected impacts
  5. Disabling code with comments - Should use version control
  6. Error suppression - Hiding problems creates technical debt
  7. Excessive use of type assertions (as) - Abandoning type safety

Design Anti-patterns

  • "Make it work for now" thinking - Accumulation of technical debt
  • Patchwork implementation - Unplanned additions to existing code
  • Optimistic implementation of uncertain technology - Designing unknown elements assuming "it'll probably work"
  • Symptomatic fixes - Surface-level fixes that don't solve root causes
  • Unplanned large-scale changes - Lack of incremental approach

Basic Principles

  • Aggressive Refactoring - Prevent technical debt and maintain health
  • No Unused "Just in Case" Code - Violates YAGNI principle (Kent Beck)

Comment Writing Rules

  • Function Description Focus: Describe what the code "does"
  • No Historical Information: Do not record development history
  • Timeless: Write only content that remains valid whenever read
  • Conciseness: Keep explanations to necessary minimum

Error Handling Fundamentals

Fail-Fast Principle

Fail quickly on errors to prevent processing continuation in invalid states. Error suppression is prohibited.

For detailed implementation methods (Result type, custom error classes, layered error handling, etc.), refer to language and framework-specific rules.

Rule of Three - Criteria for Code Duplication

How to handle duplicate code based on Martin Fowler's "Refactoring":

Duplication CountActionReason
1st timeInline implementationCannot predict future changes
2nd timeConsider future consolidationPattern beginning to emerge
3rd timeImplement commonalizationPattern established

Criteria for Commonalization

Cases for Commonalization

  • Business logic duplication
  • Complex processing algorithms
  • Areas likely requiring bulk changes
  • Validation rules

Cases to Avoid Commonalization

  • Accidental matches (coincidentally same code)
  • Possibility of evolving in different directions
  • Significant readability decrease from commonalization
  • Simple helpers in test code

Common Failure Patterns and Avoidance Methods

Pattern 1: Error Fix Chain

Symptom: Fixing one error causes new errors Cause: Surface-level fixes without understanding root cause Avoidance: Identify root cause with 5 Whys before fixing

Pattern 2: Abandoning Type Safety

Symptom: Excessive use of any type or as Cause: Impulse to avoid type errors Avoidance: Handle safely with unknown type and type guards

Pattern 3: Implementation Without Sufficient Testing

Symptom: Many bugs after implementation Cause: Ignoring Red-Green-Refactor process Avoidance: Always start with failing tests

Pattern 4: Ignoring Technical Uncertainty

Symptom: Frequent unexpected errors when introducing new technology Cause: Assuming "it should work according to official documentation" without prior investigation Avoidance:

  • Record certainty evaluation at the beginning of task files
  • For low certainty cases, create minimal verification code first

Pattern 5: Insufficient Existing Code Investigation

Symptom: Duplicate implementations, architecture inconsistency, integration failures Cause: Insufficient understanding of existing code before implementation Avoidance Methods:

  • Before implementation, always search for similar functionality (using domain, responsibility, configuration patterns as keywords)
  • Similar functionality found -> Use that implementation (do not create new implementation)
  • Similar functionality is technical debt -> Create ADR improvement proposal before implementation
  • No similar functionality exists -> Implement new functionality following existing design philosophy
  • Record all decisions and rationale in "Existing Codebase Analysis" section of Design Doc

Debugging Techniques

1. Error Analysis Procedure

  1. Read error message (first line) accurately
  2. Focus on first and last of stack trace
  3. Identify first line where your code appears

2. 5 Whys - Root Cause Analysis

Symptom: Build error
Why1: Type definitions don't match -> Why2: Interface was updated
Why3: Dependency change -> Why4: Package update impact
Why5: Major version upgrade with breaking changes
Root cause: Inappropriate version specification

3. Minimal Reproduction Code

To isolate problems, attempt reproduction with minimal code:

  • Remove unrelated parts
  • Replace external dependencies with mocks
  • Create minimal configuration that reproduces problem

Type Safety Fundamentals

Type Safety Principle: Use unknown type with type guards. any type disables type checking and causes runtime errors.

any Type Alternatives (Priority Order)

  1. unknown Type + Type Guards: Use for validating external input
  2. Generics: When type flexibility is needed
  3. Union Types/Intersection Types: Combinations of multiple types
  4. Type Assertions (Last Resort): Only when type is certain

Type Guard Implementation Pattern

function isUser(value: unknown): value is User {
  return typeof value === 'object' && value !== null && 'id' in value && 'name' in value
}

Type Complexity Management

  • Field Count: Up to 20 (split by responsibility if exceeded, external API types are exceptions)
  • Optional Ratio: Up to 30% (separate required/optional if exceeded)
  • Nesting Depth: Up to 3 levels (flatten if exceeded)
  • Type Assertions: Review design if used 3+ times
  • External API Types: Relax constraints and define according to reality (convert appropriately internally)

Refactoring Techniques

Basic Policy

  • Small Steps: Maintain always-working state through gradual improvements
  • Safe Changes: Minimize the scope of changes at once
  • Behavior Guarantee: Ensure existing behavior remains unchanged while proceeding

Implementation Procedure: Understand Current State -> Gradual Changes -> Behavior Verification -> Final Validation

Priority: Duplicate Code Removal > Large Function Division > Complex Conditional Branch Simplification > Type Safety Improvement

Implementation Completeness Assurance

Required Procedure for Impact Analysis

Completion Criteria: Complete all 3 stages

1. Discovery
Grep -n "TargetClass\|TargetMethod" -o content
Grep -n "DependencyClass" -o content
Grep -n "targetData\|SetData\|UpdateData" -o content
2. Understanding

Mandatory: Read all discovered files and include necessary parts in context:

  • Caller's purpose and context
  • Dependency direction
  • Data flow: generation -> modification -> reference
3. Identification

Structured impact report (mandatory):

## Impact Analysis
### Direct Impact: ClassA, ClassB (with reasons)
### Indirect Impact: SystemX, ComponentY (with integration paths)
### Processing Flow: Input -> Process1 -> Process2 -> Output

Important: Do not stop at search; execute all 3 stages

Unused Code Deletion Rule

When unused code is detected -> Will it be used?

  • Yes -> Implement immediately (no deferral allowed)
  • No -> Delete immediately (remains in Git history)

Target: Code, documentation, configuration files

Red-Green-Refactor Process (Test-First Development)

Recommended Principle: Always start code changes with tests

Development Steps:

  1. Red: Write test for expected behavior (it fails)
  2. Green: Pass test with minimal implementation
  3. Refactor: Improve code while maintaining passing tests

NG Cases (Test-first not required):

  • Pure configuration file changes (.env, config, etc.)
  • Documentation-only updates (README, comments, etc.)
  • Emergency production incident response (post-incident tests mandatory)

Test Design Principles

Test Case Structure

  • Tests consist of three stages: "Arrange," "Act," "Assert"
  • Clear naming that shows purpose of each test
  • One test case verifies only one behavior

Test Data Management

  • Manage test data in dedicated directories
  • Define test-specific environment variable values
  • Always mock sensitive information
  • Keep test data minimal, using only data directly related to test case verification purposes

Mock and Stub Usage Policy

Recommended: Mock external dependencies in unit tests

  • Merit: Ensures test independence and reproducibility
  • Practice: Mock DB, API, file system, and other external dependencies

Avoid: Actual external connections in unit tests

  • Reason: Slows test speed and causes environment-dependent problems

Test Failure Response Decision Criteria

Fix tests: Wrong expected values, references to non-existent features, dependence on implementation details, implementation only for tests Fix implementation: Valid specifications, business logic, important edge cases When in doubt: Confirm with user

Test Granularity Principles

Core Principle: Observable Behavior Only

MUST Test: Public APIs, return values, exceptions, external calls, persisted state MUST NOT Test: Private methods, internal state, algorithm implementation details

Security Principles

Secure Defaults

  • Store credentials and secrets through environment variables or dedicated secret managers
  • Use parameterized queries (prepared statements) for all database access
  • Use established cryptographic libraries provided by the language or framework
  • Generate security-critical values (tokens, IDs, nonces) with cryptographically secure random generators
  • Encrypt sensitive data at rest and in transit using standard protocols

Input and Output Boundaries

  • Validate all external input at system entry points for expected format, type, and length
  • Encode output appropriately for its rendering context (HTML, SQL, shell, URL)
  • Return only information necessary for the caller in error responses; log detailed diagnostics server-side

Access Control

  • Apply authentication to all entry points that handle user data or trigger state changes
  • Verify authorization for each resource access, not only at the entry point
  • Grant only the permissions required for the operation (files, database connections, API scopes)

Knowledge Cutoff Supplement (2026-03)

  • OWASP Top 10:2025 shifted from symptoms to root causes; added "Software Supply Chain Failures" (A03) and "Mishandling of Exceptional Conditions" (A10)
  • Recent research indicates AI-generated code shows elevated rates of access control gaps — treat authentication and authorization as high-priority review targets
  • OpenSSF published "Security-Focused Guide for AI Code Assistant Instructions" — recommends language-specific, actionable constraints over generic advice
  • For detailed detection patterns, see references/security-checks.md

平台分布

Codex

34.69%
按下载量换算22

Claude

30.44%
按下载量换算19

Cursor

17.5%
按下载量换算11

Gemini CLI

9.9%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

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

安装前确认

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

继续浏览同类 Skills