本文へスキップ
Skillpedia
一般的なプログラミング33k · #8732

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/c-pro/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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

  1. No memory leaks - every malloc needs free
  2. Check all return values, especially malloc
  3. Use static analysis tools (clang-tidy)
  4. Minimize stack usage in embedded contexts
  5. 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

repo: davila7/claude-code-templates

人気

GitHubのスター
33k
ランキング
#8732
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル