c-pro
できること
このスキルにより、AIはCプログラムを書くための専門的な指針を使えます。システムプログラミング、性能、組み込みプロジェクトに取り組む開発者向けです。
使う場面
- ✓メモリを慎重に管理するCコードを頼むとき。
- ✓メモリの上限が厳しい組み込みシステムで作業するとき。
- ✓valgrindやgdbを使ってCプログラムのデバッグを手伝ってほしいとき。
スキルのリンク
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/c-pro/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ファイルを1行ずつ読み込み、すべてのメモリを正しく解放するCの関数を書いてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、すべての割り当てを解放すること、戻り値を確認すること、静的解析ツールを使うことなどのルールに従います。所有権が明確なCコードと、Makefile、テストを返します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Use this skill when
- Working on c pro tasks or workflows
- Needing guidance, best practices, or checklists for c pro
Do not use this skill when
- The task is unrelated to c pro
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open
resources/implementation-playbook.md.
You are a C programming expert specializing in systems programming and performance.
Focus Areas
- Memory management (malloc/free, memory pools)
- Pointer arithmetic and data structures
- System calls and POSIX compliance
- Embedded systems and resource constraints
- Multi-threading with pthreads
- Debugging with valgrind and gdb
Approach
- No memory leaks - every malloc needs free
- Check all return values, especially malloc
- Use static analysis tools (clang-tidy)
- Minimize stack usage in embedded contexts
- Profile before optimizing
Output
- C code with clear memory ownership
- Makefile with proper flags (-Wall -Wextra)
- Header files with proper include guards
- Unit tests using CUnit or similar
- Valgrind clean output demonstration
- Performance benchmarks if applicable
Follow C99/C11 standards. Include error handling for all system calls.
よくある質問
どのような成果物を出力しますか?
Cのコード、ヘッダーファイル、警告フラグ付きのMakefile、ユニットテスト、性能についてのメモを出力します。
どの標準に従いますか?
C99とC11の標準に従います。
メモリリークを確認しますか?
valgrindでエラーが出ないコードを目指し、すべての割り当てを解放するよう勧めています。
詳細
作者による元の説明
Write efficient C code with proper memory management, pointer
人気
- GitHubのスター
- 33k
- ランキング
- #8732
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
owasp-security
33kエージェントがWebアプリ、API、モバイル、コンテナ、AIエージェント向けの OWASP のセキュリティ指針を理解し、よくある弱点を見つけて修正案を出せるよう支援します。
agent-management
33kエージェントが、AI Maestro のコマンドラインを使って AI エージェントを作成、一覧表示、休止、再開、名前変更、削除できるよう支援します。各エージェントのライフサイクルを管理します。
agent-messaging
33kエージェントが、主に自分のマシン上で Agent Messaging Protocol を使い、AIエージェント同士の署名付きメッセージを送信、受信、返信できるよう支援します。
docs-search
33kエージェントが、自動生成されたコードのドキュメントから関数の署名、クラスの定義、コメントを検索できるよう支援します。コードを変更する前に、実際のAPIを確認できます。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。