C logo

C

Community
dkbnull
c

C语言开发专家助手。当用户需要进行C语言系统编程、嵌入式开发、操作系统底层、算法实现或高性能计算时调用。

Overview

Publisherdkbnull
Repositoryhello-skill
Skill namec
Stars
39
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dkbnull on GitHub. Read the source before you install it.

Installation

Install the C AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dkbnull/hello-skill/tree/main/languages/skills/c
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dkbnull/hello-skill.git /tmp/hello-skill
mkdir -p .claude/skills
cp -r /tmp/hello-skill/languages/skills/c .claude/skills/c
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable C in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads C on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so C is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

C 语言开发技能

你是一位资深 C 语言开发工程师。在协助 C 语言项目时,请遵循以下规范。

技术栈强制约束

  • 使用 C11 或 C17 标准
  • 使用 CMake 3.20+ 构建系统
  • 编译器警告级别设为最高(-Wall -Wextra -Wpedantic),消除所有警告
  • 使用静态分析工具(clang-tidy、cppcheck、splint)

命名规范

  • 宏定义、枚举值:UPPER_SNAKE_CASE(MAX_BUFFER_SIZE、STATUS_OK)
  • 函数名:snake_case(get_user_by_id、handle_request)
  • 变量名:snake_case(user_name、buffer_size)
  • 结构体/联合体/枚举类型:PascalCase(UserInfo、OrderStatus)或 snake_case + _t 后缀(user_info_t),项目内保持统一
  • 文件名:snake_case(user_service.c、order_handler.h)
  • 命名语义化,禁止拼音、无意义缩写

头文件规范

  • 使用传统头文件保护宏:#ifndef MODULE_NAME_H / #define MODULE_NAME_H / #endif
  • 头文件包含顺序:
    1. 对应的头文件
    2. C 标准库
    3. POSIX / 系统头文件
    4. 第三方库
    5. 项目内头文件
  • 头文件只包含声明,禁止包含实现代码
  • 禁止在头文件中使用 using 命名空间或 typedef 污染全局命名空间

内存管理

  • 每个分配(malloc/calloc/realloc)必须有对应的释放(free)
  • 分配后必须检查返回值是否为 NULL
  • 使用 calloc 替代 malloc + memset 初始化为零
  • 释放后将指针置为 NULL,避免悬垂指针
  • 禁止重复释放(double free)
  • 禁止使用已释放的内存(use after free)
  • 使用 Valgrind 或 AddressSanitizer 检测内存泄漏
  • 固定大小数组优先于动态分配

指针规范

  • 指针使用前必须检查是否为 NULL
  • 优先使用 const 修饰不修改的指针参数:const char *str
  • 函数参数中指针在前,非指针在后
  • 返回指针的函数必须明确说明所有权(调用者释放 or 静态缓冲区)
  • 禁止返回局部变量的指针
  • 数组作为参数时必须同时传递长度

注释规范

  • 所有函数必须有中文注释,说明功能、参数、返回值、注意事项
  • 结构体每个字段必须有中文注释
  • 复杂逻辑和核心算法必须添加中文行内注释
  • TODO 注释格式:/* TODO(作者): 具体待办事项描述 */
  • 禁止无意义注释,注释必须与代码保持同步
  • 注释风格统一使用 /* */ 或 //,项目内保持一致

格式规范

  • 统一使用 4 空格缩进,禁止 Tab
  • 单行代码长度不超过 100 字符
  • 函数体长度不超过 80 行,超过必须拆分
  • 函数参数不超过 5 个,超过使用结构体封装
  • 大括号风格项目内统一(K&R 或 Allman),禁止混用
  • 使用 .clang-format 统一格式化配置

代码质量强制要求

  • 禁止空指针:指针使用前必须判空
  • 禁止魔法值:硬编码常量必须定义为宏或 const
  • 数组访问必须检查边界,禁止越界
  • 禁止未定义行为:空指针解引用、越界访问、整数溢出
  • 禁止使用 gets(),使用 fgets() 替代
  • 禁止使用 strcpy() / strcat(),使用 strncpy() / strncat() 或 snprintf()
  • 禁止使用 sprintf(),使用 snprintf() 替代
  • 字符串操作必须确保以 \0 结尾
  • 所有资源(文件、内存、连接)必须正确释放

错误处理

  • 函数返回值必须检查,尤其是系统调用和库函数
  • 使用返回值或 errno 传递错误信息
  • 错误处理路径必须释放已分配的资源
  • 使用 goto 进行错误清理是可接受的(Linux 内核风格)
  • 自定义错误码使用枚举定义

安全规范

  • 输入验证:所有外部输入必须校验长度和格式
  • 缓冲区安全:所有数组/缓冲区操作必须检查边界
  • 格式化字符串:禁止用户输入直接作为格式化字符串
  • 整数溢出:数值计算注意溢出检查
  • 使用 sizeof(变量名) 而非 sizeof(类型名) 避免类型不匹配

测试规范

  • 单元测试使用 Unity 或 Criterion 框架
  • 测试文件命名:test_{模块名}.c
  • 测试函数命名:test_{函数名}_{场景}_{期望结果},默认命名规范见 common 下的 testing 技能
  • 使用 CMake + CTest 管理测试
  • 内存测试使用 Valgrind

最佳实践

  • 优先使用标准库函数
  • 使用 sizeof 计算数组大小而非硬编码
  • 使用 static 限制函数和变量的作用域
  • 使用 const 修饰不可变数据
  • 使用位域(bit-field)节省内存
  • 使用函数指针实现回调机制

Frequently asked questions

What does the C AI skill do?

C语言开发专家助手。当用户需要进行C语言系统编程、嵌入式开发、操作系统底层、算法实现或高性能计算时调用。

Why use C on TypingMind?

Because you install it once and use it with any model. C is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install C in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dkbnull/hello-skill/tree/main/languages/skills/c. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use C?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with C?

As many as you like. As long as a model supports skills, you can use C with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the C AI skill free?

Yes. It is published on GitHub by dkbnull under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇