AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

open-sourcing

This skill should be used when the user asks to "open source this project", "prepare this repository for public release", "make this repo public", "check open-source readiness", "choose a license for this project", or "set up release automation" ahead of a public launch. Provides a release-readiness workflow covering secrets hygiene, licensing, documentation, CI, and language-specific packaging.

Original source
trailofbits
License
CC-BY-SA-4.0
Pinned revision
2be6433b39e009cd2b6fd3be1895f6b1faa5af9a

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read trailofbits--open-sourcing at revision 2be6433b39e009cd2b6fd3be1895f6b1faa5af9a, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 9

references/c-cpp.md

C/C++ Release Practices

Build system

Use modern CMake. For new projects, cmake-init generates a well-structured project with presets, warnings, and packaging support:

git init && cmake-init <project-name>

Plain GNU Make is acceptable for small projects; anything intended for downstream packaging (vcpkg, distro packages) should use CMake.

Language standard and portability

  • Use C++17 as the minimum for new code; prefer C++20 or newer where the supported toolchains allow.
  • Write standard C++, not compiler-specific dialects. Limit extensions to those with broad support across Clang, GCC, and (if targeted) MSVC, and build in CI with more than one compiler to keep the code honest.

Testing and quality engineering

  • Unit tests: GoogleTest, run through CTest for build-system integration.
  • Sanitizers in CI: build and run the test suite under ASan and UBSan at minimum; add TSan for concurrent code. Sanitizer CI jobs catch memory bugs reviewers miss.
  • Valgrind remains useful for leak detection where sanitizers cannot run.
  • Fuzzing: for code that parses untrusted input, add libFuzzer or AFL++ harnesses, and consider OSS-Fuzz enrollment once public.
  • Enable a strict warning baseline (-Wall -Wextra, warnings-as-errors in CI).

Formatting and linting

Use the latest stable clang-format and clang-tidy, each enforced in CI. Defaults are fine; a repository may commit its own .clang-format and .clang-tidy configurations. Examples: pe-parse, winchecksec.

Documentation

Doxygen for API documentation, published to GitHub Pages from CI.

Packaging and distribution

  • vcpkg is the most common route for distributing C++ libraries; Conan is a reasonable alternative if the audience already uses it.
  • For tools, attach prebuilt binaries to GitHub Releases from CI, and consider a container image. Keep images small: multi-stage builds with a minimal base (alpine, distroless).
  • See pe-parse's release workflow for an example of CI-managed release packaging.