一键导入
gccdiag
Use gccdiag when you need to quickly check a certain c/c++ file compiles, using the exact arguments from the project compile_commands.json
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use gccdiag when you need to quickly check a certain c/c++ file compiles, using the exact arguments from the project compile_commands.json
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when creating or modifying bash shell scripts, needing script templates, error handling patterns, or shell scripting best practices.
Use when creating Justfiles, needing modern command runners, or implementing just command runner patterns for task automation.
Use when you need detailed kitty terminal API reference, remote control commands, window management, or advanced kitty integration patterns.
Use when creating Makefiles, needing build automation, defining make targets, or implementing standard makefile patterns and recipes.
Comprehensive guide for Python type annotations, type checking, and modern typing patterns. Use when: (1) Adding type hints to Python code, (2) Configuring mypy/pyright/ty type checkers, (3) Understanding generics, protocols, and advanced type patterns, (4) Migrating to modern Python typing, (5) Setting up strict type checking in CI/CD, (6) Building type-safe APIs and libraries. Covers Python 3.10+ modern syntax, type narrowing, structural typing, and best practices.
Use when you need to explore, search, or understand codebases using structural AST patterns. Ideal for finding specific code patterns, understanding code architecture, discovering API usage, or locating code smells across multiple files.
| name | gccdiag |
| description | Use gccdiag when you need to quickly check a certain c/c++ file compiles, using the exact arguments from the project compile_commands.json |
The program searches the current folder folders above it in the hierarchy for a "compile_commands.json" file, until it finds the first match. This file is then parsed as the compilation database.
The program can also be configured by reading a ".gccdiag" or "_gccdiag" file in the current working directory or above, as well as the global one in $XDG_CONFIG_HOME/gccdiag/ This file contains a JSON dict with up to three keys: "additional_args", "default_args", "args_to_ignore", which correspond to flags listed above.
Usage: gccdiag [OPTIONS] <SOURCES>...
Arguments:
<SOURCES>...
Path to one or more source files
Options:
-c, --compiler <COMPILER>
Compiler path to replace the value in db. If not given, the compiler will be inferred from the compilation database
-a, --add-args <ADD_ARGS>
Compiler args to add when calling (empty by default)
-d, --default-args <DEFAULT_ARGS>
Default args to use if the file isn't found in `compile_commands.json`; if empty, the compiler isn't invoked
-i, --ignore-args <IGNORE_ARGS>
Compiler args to omit when calling (supports glob patterns like "-O*", "-f*")
-C, --cwd <CWD>
Working directory to run the compiler in
-s, --sarif
Tell GCC to use sarif output
-h, --help
Print help (see a summary with '-h')
For example:
gccdiag main.c
gccdiag src/*.cpp # Can compile multiple files at once