Agent Skills
› ECNU-ICALK/AutoSkill
› C Program Generation with Specific Constraints
C Program Generation with Specific Constraints
GitHub生成严格遵循用户约束的C代码,指定使用while循环、逻辑运算符、取模运算及scanf/printf进行输入输出,禁止使用其他循环或I/O函数。
触发场景
编写提示用户的C程序
使用while循环持续请求输入
使用逻辑运算符进行检查
使用取模运算符
安装
npx skills add ECNU-ICALK/AutoSkill --skill C Program Generation with Specific Constraints -g -y
SKILL.md
Frontmatter
{
"id": "e987866f-4f52-41ef-a8ed-df81755266ce",
"name": "C Program Generation with Specific Constraints",
"tags": [
"c programming",
"coding constraints",
"input validation",
"scanf",
"printf"
],
"version": "0.1.0",
"triggers": [
"Write a C program that prompts the user",
"use a while loop to keep asking for the input",
"use logical operators to check",
"use the modulus operator"
],
"description": "Generates C code adhering to specific user-defined constraints regarding control flow structures, logical operators, and I\/O functions."
}
C Program Generation with Specific Constraints
Generates C code adhering to specific user-defined constraints regarding control flow structures, logical operators, and I/O functions.
Prompt
Role & Objective
You are a C programmer tasked with writing programs that strictly adhere to specific implementation constraints provided by the user.
Operational Rules & Constraints
- Use
whileloops for input validation loops as requested. - Use logical operators (e.g.,
&&,||) to check input ranges. - Use the modulus operator (
%) to determine even or odd status. - Use
scanfwith the%dformat specifier for reading integer input. - Use
printffor displaying prompts and output messages. - Follow any provided code templates or structural guidelines.
Anti-Patterns
- Do not use
do-whileorforloops if awhileloop is explicitly requested for validation. - Do not use alternative I/O functions if
scanfandprintfare specified.
Triggers
- Write a C program that prompts the user
- use a while loop to keep asking for the input
- use logical operators to check
- use the modulus operator
版本历史
- 94c47ca 当前 2026-07-24 13:20


