GCC compiler skill for C/C++ projects. An agent skill from mohitmishra786/low-level-dev-skills.

MITAuto-check passed

Install Gcc

skills CLI
$ npx skills add mohitmishra786/low-level-dev-skills --skill gcc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mohitmishra786/low-level-dev-skills gcc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/compilers/gcc .claude/skills/gcc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gcc
GitHub stars
252
Token cost
~1.4k tokens
SKILL.md length
505 words
Files
3 (incl. references)
Skills in repo
138
Repo updated
First seen
Licence
MIT

At a glance

GCC compiler skill for C/C++ projects. An agent skill from mohitmishra786/low-level-dev-skills.

  • Works in 9 steps: Choose a build mode → Warning discipline → Debug information → …
  • Selecting optimization levels
  • SKILL.md covers Purpose, Triggers, Workflow and Related skills
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Gcc is an agent skill from mohitmishra786/low-level-dev-skills. GCC compiler skill for C/C++ projects. Use when selecting optimization levels, warning flags, debug builds, LTO, sanitizer instrumentation, or diagnosing compilation errors with GCC. Covers flag selection for debug vs release, ABI concerns, preprocessor macros, profile-guided optimization, and integration with build systems. Activates on queries about gcc flags, compilation errors, performance tuning, warning suppression, or cross-standard compilation.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/examples.md` and `references/flags.md`).

It works with C++. The repository describes itself as: A curated suite of AI agent skills for systems and low-level programming with C/C++, Rust, and Zig toolchains, covering compilers, debuggers, profilers, build systems…. The licence is MIT.

When your agent uses it

  • Selecting optimization levels
  • Sanitizer instrumentation
  • Diagnosing compilation errors with GCC

Example prompts

  • “/gcc”

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Choose a build mode
  2. Warning discipline
  3. Debug information
  4. Optimisation decision tree
  5. Link-time optimisation (LTO)
  6. Profile-guided optimisation (PGO)
  7. Preprocessor and standards
  8. Common error triage
  9. Useful one-liners

What it can do on your machine

Read from SKILL.md and the folder at commit bdc5847. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and c).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gcc loads about 1.4k tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 115 tokens; SKILL.md has 505 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mohitmishra786/low-level-dev-skills at commit bdc5847, republished under its MIT licence (© mohitmishra786). 505 words, ~1,431 tokens.

Download SKILL.mdSave it as .claude/skills/gcc/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
gcc
description
GCC compiler skill for C/C++ projects. Use when selecting optimization levels, warning flags, debug builds, LTO, sanitizer instrumentation, or diagnosing compilation errors with GCC. Covers flag selection for debug vs release, ABI concerns, preprocessor macros, profile-guided optimization, and integration with build systems. Activates on queries about gcc flags, compilation errors, performance tuning, warning suppression, or cross-standard compilation.

GCC

Purpose

Guide agents through GCC invocation: flag selection, build modes, warning triage, PGO, LTO, and common error patterns. Assume the project uses GNU Make, CMake, or a shell script.

Triggers

  • "What flags should I use for a release build?"
  • "GCC is giving me a warning/error I don't understand"
  • "How do I enable LTO / PGO with GCC?"
  • "How do I compile with -fsanitize?"
  • "My binary is too large / too slow"
  • Undefined reference errors, ABI mismatch, missing symbols

Workflow

1. Choose a build mode
GoalRecommended flags
Debug-g -O0 -Wall -Wextra
Debug + debuggable optimisation-g -Og -Wall -Wextra
Release-O2 -DNDEBUG -Wall
Release (max perf, native only)-O3 -march=native -DNDEBUG
Release (min size)-Os -DNDEBUG
Sanitizer (dev)-g -O1 -fsanitize=address,undefined

Always pass -std=c11 / -std=c++17 (or the required standard) explicitly. Never rely on the implicit default.

2. Warning discipline

Start with -Wall -Wextra. For stricter standards compliance add -Wpedantic. To treat all warnings as errors in CI: -Werror.

Suppress a specific warning only in a narrow scope:

c
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
// ...
#pragma GCC diagnostic pop

Do not pass -w (silences everything) except as a last resort for third-party headers.

3. Debug information
  • -g — DWARF debug info, default level 2
  • -g3 — includes macro definitions (useful with GDB macro expand)
  • -ggdb — DWARF extensions optimal for GDB
  • -gsplit-dwarf — splits .dwo files; reduces link time, needed for debuginfod

Pair -g with -Og (not -O0) when you need readable optimised code in GDB.

4. Optimisation decision tree
text
Need max throughput on a fixed machine?
  yes -> -O3 -march=native -flto
  no  -> profiling available?
           yes -> -O2 -fprofile-use
           no  -> -O2
Size-constrained (embedded, shared lib)?
  yes -> -Os  (or -Oz with clang)

-O3 vs -O2: -O3 adds aggressive loop transformations (-funswitch-loops, -fpeel-loops, -floop-interchange) and more aggressive inlining. Use -O3 only after benchmarking; it occasionally regresses due to i-cache pressure.

-Ofast: enables -ffast-math which breaks IEEE 754 semantics (NaN handling, associativity). Avoid unless the numerical domain explicitly permits it.

bash
# Compile
gcc -O2 -flto -c foo.c -o foo.o
gcc -O2 -flto -c bar.c -o bar.o
# Link (must pass -flto again)
gcc -O2 -flto foo.o bar.o -o prog

Use gcc-ar / gcc-ranlib instead of ar / ranlib when archiving LTO objects into static libs.

For parallel LTO: -flto=auto (uses make-style jobserver) or -flto=N.

See references/flags.md for full flag reference. See skills/binaries/linkers-lto for linker-level LTO configuration.

Show full SKILL.md (187 more words)Show less
6. Profile-guided optimisation (PGO)
bash
# Step 1: instrument
gcc -O2 -fprofile-generate prog.c -o prog_inst
# Step 2: run with representative workload
./prog_inst < workload.input
# Step 3: optimise with profile
gcc -O2 -fprofile-use -fprofile-correction prog.c -o prog

-fprofile-correction handles profile data inconsistencies from multi-threaded runs.

7. Preprocessor and standards
  • Inspect macro expansion: gcc -E file.c | less
  • Dump predefined macros: gcc -dM -E - < /dev/null
  • Force strict standard: -std=c11 -pedantic-errors
  • Disable GNU extensions: -std=c11 (not -std=gnu11)
8. Common error triage
SymptomLikely causeFix
undefined reference to 'foo'Missing -lfoo or wrong link orderAdd -lfoo; move -l flags after object files
multiple definition of 'x'Variable defined (not just declared) in a headerAdd extern in header, define in one .c
implicit declaration of functionMissing #includeAdd the header
warning: incompatible pointer typesWrong cast or missing prototypeFix the type; check headers
ABI errors with C++Mixed -std= or different libstdc++Unify -std= across all TUs
relocation truncatedOverflow on a 32-bit relative relocationUse -mcmodel=large or restructure code

For sanitizer reports, use skills/runtimes/sanitizers.

9. Useful one-liners
bash
# Show all flags enabled at -O2
gcc -Q --help=optimizers -O2 | grep enabled

# Preprocess only (check includes/macros)
gcc -E -dD src.c -o src.i

# Assembly output (Intel syntax)
gcc -S -masm=intel -O2 foo.c -o foo.s

# Show include search path
gcc -v -E - < /dev/null 2>&1 | grep -A20 '#include <...>'

# Check if a flag is supported
gcc -Q --help=target | grep march

For a complete flag cheatsheet, see references/flags.md. For common error patterns and examples, see references/examples.md.

  • Use skills/runtimes/sanitizers to add -fsanitize=* builds
  • Use skills/compilers/clang when switching to clang/LLVM
  • Use skills/binaries/linkers-lto for advanced LTO linker flags
  • Use skills/debuggers/gdb for debugging GCC-built binaries

© mohitmishra786, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/compilers/gcc of mohitmishra786/low-level-dev-skills.

  • SKILL.md
  • references/examples.md
  • references/flags.md

Open the folder on GitHubat commit bdc5847

Compare with similar skills

Gcc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gcc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gcc this skillmohitmishra786/low-level-dev-skills252—~1.4kAutomated safety check: PassMIT
Paddle BuildPaddlePaddle/Paddle24k—~1kAutomated safety check: PassApache-2.0
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
ONNX Runtime Shape Inference Safety Auditmicrosoft/onnxruntime22k—~3.3kAutomated safety check: PassMIT
Code Audit3stoneBrother/code-audit8921 repos~2.7kAutomated safety check: PassNone
Qt C++ Code Reviewx-tools-author/x-tools1.1k2 repos~4.3kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Paddle Build

    PaddlePaddle/Paddle

    A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes.

    24k GitHub stars~1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Official

    Finds and fixes out-of-range output writes in ONNX Runtime operator shape-inference functions where a getNumOutputs guard admits too few outputs.

    22k GitHub stars~3.3k tokensUpdated today
    SecurityAuto-check passed
  • Code Audit

    3stoneBrother/code-audit

    Professional code security audit skill covering 55+ vulnerability types.

    892 GitHub starsUsed in 1 repo~2.7k tokens
    SecurityAuto-check passed
  • Qt C++ Code Review

    x-tools-author/x-tools

    Read-only review of Qt6 C++ code that combines a deterministic lint script with six parallel analysis agents and reports only high-confidence issues.

    1.1k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed
  • Leetcuda Cpp Kernel

    xlite-dev/LeetCUDA

    LeetCUDA 中文技术书(584 页,XeLaTeX 源)按需查阅 skill——写、优化、调试或 review CUDA C++/PTX kernel 时的权威参考路由层。当任务涉及:GPU 架构/Roofline/ occupancy、向量化与 coalescing、warp/block reduce、softmax(online/LSE merge)、…

    12k GitHub stars~3.5k tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed

More from mohitmishra786/low-level-dev-skills

All 138 skills in this repo
  • ARM and AArch64 Assembly

    mohitmishra786/low-level-dev-skills

    Guides reading and writing AArch64 and ARM Thumb assembly: compiler output, inline asm, registers, the AAPCS calling convention and NEON or SVE basics.

    252 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • RISC-V Assembly Guide

    mohitmishra786/low-level-dev-skills

    Reference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging.

    252 GitHub stars~1.8k tokensUpdated 3 mo ago
    Auto-check passed
  • x86-64 Assembly Reference

    mohitmishra786/low-level-dev-skills

    Explains x86-64 registers, the System V AMD64 calling convention, and how to read compiler-generated or inline assembly.

    252 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Bazel for C and C++

    mohitmishra786/low-level-dev-skills

    Guides your agent through Bazel for C/C++ projects: BUILD files, Bzlmod dependencies, toolchain registration, remote execution, dependency queries and sandbox debugging.

    252 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Binary Hardening

    mohitmishra786/low-level-dev-skills

    Binary hardening skill for security-hardened C/C++ builds. An agent skill from mohitmishra786/low-level-dev-skills.

    252 GitHub stars~2k tokensUpdated 3 mo ago
    Auto-check passed
  • Binutils

    mohitmishra786/low-level-dev-skills

    GNU binutils skill for binary manipulation and analysis. An agent skill from mohitmishra786/low-level-dev-skills.

    252 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check passed

Works with

Questions about Gcc

What does Gcc do?

GCC compiler skill for C/C++ projects. An agent skill from mohitmishra786/low-level-dev-skills. Gcc is an agent skill from mohitmishra786/low-level-dev-skills. GCC compiler skill for C/C++ projects.

When should I use Gcc?

Gcc fits situations like: selecting optimization levels; sanitizer instrumentation; diagnosing compilation errors with GCC.

How do I install Gcc in Claude Code?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill gcc -a claude-code`. Or copy the skill folder (skills/compilers/gcc in mohitmishra786/low-level-dev-skills) into .claude/skills/gcc in your project. Claude Code loads it when a task matches its description.

How do I install Gcc in Codex?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill gcc -a codex`. Or copy the skill folder (skills/compilers/gcc in mohitmishra786/low-level-dev-skills) into .agents/skills/gcc in your project. Codex loads it when a task matches its description.

Can I use Gcc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitmishra786/low-level-dev-skills --skill gcc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gcc, .gemini/skills/gcc, .github/skills/gcc and .opencode/skills/gcc in your project.

What does Gcc need to run?

SKILL.md names no scripts, command-line tools or credentials: Gcc is instructions for the agent only.

Does Gcc access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gcc safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gcc use?

Gcc is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gcc use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.3k tokens, read only when the agent opens those files.

What are the alternatives to Gcc?

Skills that share tags, products or a category with Gcc: Paddle Build (PaddlePaddle/Paddle, 24k stars), Fory Release (apache/fory, 4.6k stars), ONNX Runtime Shape Inference Safety Audit (microsoft/onnxruntime, 22k stars) and Code Audit (3stoneBrother/code-audit, 892 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gcc?

mohitmishra786 (a GitHub user) maintains it in mohitmishra786/low-level-dev-skills, which has 252 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on June 27, 2026.

Source: mohitmishra786/low-level-dev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.