Token导航 LogoToken导航

Agent Skill · 研究检索

coding-guidance-cpp(编码指导 cpp)

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

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

总安装 404周安装 17GitHub Stars 3下载 141核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/n-n-code/n-n-code-skills --skill coding-guidance-cpp

这个 Skill 是做什么的

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

coding-guidance-cpp 针对 C++ 跨平台开发提供实现、重构与审查建议,强调内存安全与异常处理。适用于后端系统与 UI 开发,支持强类型约束与构建工具链集成(如 CMake)。不建议用于裸金属或极端性能优化场景,优先选用标准库替代自定义容器实现。

使用前请确认编译器版本支持 C++17/20 特性,并检查第三方依赖许可证兼容性。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

coding-guidance-cpp 怎么安装?

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

coding-guidance-cpp 支持哪些 AI 工具?

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

coding-guidance-cpp 需要什么权限?

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

coding-guidance-cpp 是免费的吗?

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

coding-guidance-cpp 用的人多吗?

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

coding-guidance-cpp 安全吗?

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

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

值得选的地方

  • 同时适配 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-guidance-cpp

编码指导 cpp · 本页

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

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

SKILL.md 原文

C++ Coding Guidance

This skill adds portable C++ implementation, refactoring, and review guidance.

Adjacent Skills

This skill provides portable C++ engineering principles. Compose with:

  • Workflow: thinking (planning), recursive-thinking (stress-testing), security (threat modeling)
  • Domain overlays: backend-guidance (server-side code), backend-systems-guidance (stronger backend architecture, reliability, and trust-boundary work), ui-guidance (graphical UI/web frontend), project-core-dev (repo-specific build/test commands)

When Not to Lean on This Skill

  • non-C++ work
  • legacy or bare-metal environments where modern C++ guidance must be adapted selectively
  • pure architecture or process work with no C++ design or code judgment needed
  • repo-specific style packs or platform policies that should be enforced by local clang-tidy, compiler, or overlay rules rather than a portable principle skill

Boundary Contract

Keep this skill focused on portable C++ engineering judgment.

  • Put repo-specific exception policy, warning policy, formatter choices, and include-order rules in repo config or repo docs
  • Put style-pack rules from ecosystems such as Google, LLVM, Abseil, or platform/vendor bundles in repo config or overlays, not here
  • Put library- or platform-specific API policy in repo config or a domain overlay
  • When a rule is analyzer-shaped but not portable, keep it in clang-tidy config or the reference note rather than adding it to the main skill

Implementation Workflow

  1. Read the touched code, build shape, existing tests, and any nearby docs or shorthand notes before editing.
  2. If the request is partially specified, infer the intended behavior from the existing code and tests. Ask only when multiple plausible C++ designs would change semantics.
  3. Choose the narrowest change that solves the problem without hiding ownership, lifetime, or error-handling contracts.
  4. Implement with simple, strongly typed interfaces and modern C++ defaults.
  5. Add or update tests close to the changed behavior.
  6. Run the narrowest relevant format, build, test, sanitizer, and analyzer targets the repo supports.

Refactoring Workflow

Use this instead of the default implementation workflow when the task is primarily cleanup or restructuring:

  1. Capture current behavior, invariants, side effects, and risky hotspots.
  2. Break the refactor into small slices that preserve behavior.
  3. Remove duplication, long functions, or muddled responsibilities one step at a time.
  4. Keep tests passing after each slice; add characterization coverage first when behavior is unclear.
  5. Stop when the code is simpler and safer.

Review Workflow

When reviewing (not implementing), skip the implementation workflow and use this instead:

  1. Read the change in full before commenting.
  2. Identify findings, ordered by severity: Critical > Important > Suggestion.
  3. Prioritize bugs and regressions, ownership and lifetime errors, exception or error-path holes, thread-safety issues, security risks, performance mistakes with real impact, and missing tests.
  4. State findings with concrete evidence and the likely consequence.

C++ Rules

Read these by failure theme, not as an exhaustive checklist.

Construction, ownership, and lifetime

  • Treat raw pointers and references as non-owning; never transfer ownership by raw pointer or reference
  • Avoid new and delete; bind resource lifetime to object lifetime with RAII
  • Prefer std::unique_ptr by default; use std::shared_ptr only for real shared lifetime and std::weak_ptr to break cycles
  • Prefer values and stack allocation over heap allocation when ownership is simple
  • Prefer rule-of-zero types; if you write a destructor or custom special member function, justify it
  • Initialize objects into valid states immediately; construction should establish invariants instead of relying on later “remember to initialize” steps
  • Do not store or return references, views, iterators, or pointers into temporaries or short-lived owners; when the lifetime proof is not obvious, return or store an owning value instead
  • Treat moved-from objects as valid but semantically narrow; only destroy, reassign, or call operations whose post-move contract is explicit
  • Do not cross async, callback, coroutine-suspend, or thread-handoff boundaries with borrowed state unless the lifetime proof is explicit

Type, bounds, and representation safety

  • Avoid unchecked bounds access; prefer .at(), iterators, range-for, or std::span when bounds are uncertain
  • Avoid silent narrowing conversions; use explicit casts or narrowing helpers
  • Avoid signed/unsigned comparison traps; use std::cmp_*, std::in_range, or a deliberate common type when integer domains differ
  • Prefer compile-time checking to runtime checking when the type system can express the rule
  • Avoid C-style casts; use static_cast, const_cast, reinterpret_cast, and dynamic_cast deliberately
  • Prefer std::bit_cast or byte-wise copy for object-representation reinterpretation; do not use reinterpret_cast where aliasing or lifetime rules make the behavior fragile
  • Avoid raw memory APIs, memset/memcpy tricks, or pointer arithmetic on non-trivial, polymorphic, or lifetime-sensitive types
  • Use const and constexpr by default; mutability should be the exception
  • Prefer enum class over plain enums and nullptr over NULL
  • Prefer std::array over C arrays, std::string_view for non-owning strings, and std::span for non-owning ranges when lifetime rules are clear

API contracts and call-site clarity

  • Do not mix exception and error-code styles inconsistently inside one path
  • Do not ignore must-check results from allocation, parsing, synchronization, numeric conversion, or OS/library APIs when failure changes behavior
  • Use [[nodiscard]] when ignoring a result is likely a bug
  • Prefer explicit constructors, conversions, and named types when ownership, units, or semantics would otherwise be implicit
  • Avoid forwarding, overload, and default-argument combinations that make calls ambiguous or silently select the wrong overload
  • Treat virtual dispatch boundaries as bug-prone: use override, avoid near misses, and do not rely on shadowing or signature accidents
  • Keep declarations and definitions consistent across headers and sources: parameter names, qualifiers, defaults, and ownership cues should not drift
  • Be suspicious of adjacent same-type parameters; named types, parameter objects, or strong typedefs are often clearer than comments
  • Prefer interfaces that make argument order hard to misuse and bool/int/string sentinels hard to confuse
  • Prefer APIs that encode units, domains, and nullability in types rather than relying on comments, magic values, or positional conventions

Headers, globals, and build surface

  • Avoid using namespace std in headers
  • Keep warnings at zero in repo-owned code
  • Keep macros narrow, parenthesized, side-effect-safe, and out of API shaping; prefer language features unless a macro is the least-bad tool
  • Avoid reserved identifiers, namespace pollution, and definitions in headers that quietly change ODR or rebuild behavior
  • Prefer include sets that are minimal and explicit; unused includes, include cycles, and transitive-include dependence are design smells
  • Use constinit for non-local static or thread-local objects that must not rely on dynamic initialization
  • Prefer compile-time constants, local statics, or explicit startup wiring over hidden global initialization side effects

Concurrency, async, and testability

  • Prefer structured thread ownership and explicit cancellation over detached threads or ad hoc stop flags; std::jthread and std::stop_token are good defaults when the codebase already uses standard thread primitives
  • Assume container modifications may invalidate iterators, references, pointers, and views unless the container contract says otherwise
  • Prefer seams that keep core logic testable without real threads, clocks, filesystem, process state, or ambient globals when the domain does not require those dependencies

Expressive modern defaults

  • Prefer vocabulary types such as std::optional, std::variant, and std::expected when they encode real domain states better than sentinels or ad hoc conventions
  • Prefer standard algorithms and ranges over open-coded loops when they make the intent clearer
  • Prefer standard library and language replacements for deprecated, legacy-C-leaning, or handwritten utilities when the replacement is clearer and already acceptable in the repo toolchain

Advanced design judgment

Load references/cpp-advanced-design-judgment.md when the task involves public APIs, error-model choices, advanced language features, template-heavy interfaces, headers with broad rebuild impact, coroutines, synchronization strategy, ABI/plugin/C interop boundaries, or abstraction design. Keep ordinary feature work in the default rules above.

Clang-Tidy-derived emphasis

Use the full clang-tidy catalog as a source of recurring failure modes, not as a portable checklist to paste into every repo.

  • Treat bugprone, cppcoreguidelines, modernize, performance, misc, portability, and the CERT/HIC++ aliases as high-signal prompts for code review and refactoring
  • Fold only portable semantics into this principle skill; repo-specific naming, include order, formatter preferences, test-framework style, platform APIs, and library-pack rules belong in repo config or overlays
  • If a repo ships clang-tidy, read its enabled checks before introducing new patterns; local suppressions and allowlists often document real constraints
  • When multiple checks point at the same design issue, fix the design cause instead of satisfying each warning mechanically

Resource map

Decision Heuristics

Use these when the right choice is not obvious:

  • Scope check: if a change touches more than 3 public interfaces, stop and plan before continuing; the change is bigger than it looks.
  • Ownership clarity: if ownership is not obvious from the type signature, redesign the interface or add a one-line contract comment.
  • Error-model consistency: do not mix exceptions, error codes, and expected-style returns within one subsystem unless the boundary is explicit.
  • Exception-safety pressure: when mutating multi-step state, decide whether the operation offers no-fail, strong, or basic exception safety and structure the code to match.
  • Repo conventions: if the repo has established rules for exceptions, containers, ownership types, or naming, follow them unless they create a correctness or safety problem.
  • Feature pressure: do not introduce concepts, ranges, coroutines, or metaprogramming unless they make the code simpler for this repo's likely maintainers.
  • Interface pressure: if a header starts dragging in broad dependencies or exposing implementation detail, narrow the interface before adding more code.
  • Build-surface pressure: if a design pushes more logic, templates, or dependencies into public headers, justify the compile-time and rebuild cost.
  • Parameter pressure: when adjacent parameters have the same type, or the function needs more than 2-3 meaningful inputs, prefer a named type or helper struct.
  • Lifetime pressure: if a non-owning type crosses async, callback, return, or storage boundaries, prefer an owning type unless the lifetime proof is obvious from the interface.
  • Initialization pressure: if correct behavior depends on a later “remember to initialize” step, move that requirement into construction or the type itself.
  • Call-site pressure: if two arguments are easy to swap or a call needs comments to explain literals, redesign the API before adding more call sites.
  • Header pressure: if a header starts accumulating definitions, globals, unnecessary includes, or hidden initialization, push behavior back behind a source boundary.
  • Testability pressure: if a design forces tests to spin threads, sleep, touch the real filesystem, or patch globals just to exercise core logic, introduce a seam before adding more behavior.
  • Test setup size: if test setup exceeds about 20 lines, extract a fixture only when the setup is reused or the test intent becomes unclear.
  • Narrowness vs. quality: implement the narrowest change that solves the problem. When narrowness conflicts with correctness or safety, prefer correctness. When it conflicts with style alone, prefer narrowness unless the task is explicitly a cleanup.
  • Refactor boundary: outside explicit refactor work, fix at most one small adjacent issue while you are in the file.
  • Abstraction threshold: three similar code blocks or repeated API-shaping pain is a pattern; before extracting, check whether a free function, helper type, or composed object is the simpler move.
  • Performance rule: optimize only after measurement, except for obvious ownership, allocation, or algorithmic mistakes on hot paths.
  • UB-sensitive optimization: treat optimizations that rely on subtle lifetime, aliasing, or memory-order assumptions as high-risk until proven by evidence and tooling.

Validation

A change is done when:

  • the code compiles without new warnings, unless the repo explicitly treats a known warning set as baseline debt outside the change
  • existing tests pass
  • new or changed behavior has test coverage, or the lack of coverage is called out with a concrete reason
  • the repo's formatter has been run
  • configured static analyzers report no new findings
  • available sanitizers are clean for the touched paths when the change affects memory safety, threading, or undefined-behavior risk
  • performance-sensitive changes are measured instead of justified by intuition
  • review findings at Critical and Important severity are addressed

平台分布

Codex

38.96%
按下载量换算55

Claude

28.19%
按下载量换算40

Cursor

18.5%
按下载量换算26

Gemini CLI

9.97%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

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

安装前确认

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

继续浏览同类 Skills