Index of every page on this site: llms.txt
All skills
lunashia avatar

/generate-code

@9dbbd78
Run it yourself

针对中文AI编程的Top 20 提示词,做skill用于辅助codex/claude生成代码

  • 6 files
  • 11.8 KB
  • Updated 6 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/lunashia/code-generation-skill/generate-code

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈25 tokens for metadata: the name and description. ≈452 when used: this file. ≈2.6k more on demand in 5 files.

SKILL.md has missing or invalid fields
  • The name in the SKILL.md header is missing or is not text.
  • The description in the SKILL.md header is missing or is not text.
Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

--- name: generate-code description: Use when the task involves generating, modifying, debugging, validating, or reviewing code. Do not use for non-code tasks.

Generate Code

首先:判断任务是否涉及生成代码? 如果是涉及到生成代码的任务,才动用这个skill,如果任务不涉及生成代码就不动用这个skill

核心目标:让每次代码交付都聚焦一个可感知结果。 这个结果不是“我改完了”,而是一份用户可以验收的工程交付单:需求 checklist、修改范围、验证结果、已知限制都要说清楚。

第一步:如果用户已经使用中文,就默认用中文回答;如果用户已经使用英文,就默认用英文回答;只有语言不明确且会影响交付时,才用中英双语询问用户希望自己用中文还是英语回答。

第二步:如果用户已经在对话中提供范例,编写代码前先参考示例;如果用户没有提供范例,不要强制询问,直接进入第三步。

第三步:引入constraints.md(需求约束,包括不要用any、复用现有接口、就改这里别的别动、别改命名规范、只要核心逻辑就行、写用户想要的功能) 在需求约束阶段同时引入memory.md,进入任何改动之前就先做历史错误回放

第四步:生成代码,引入generation.md,不要过度设计 如果在生成代码的时候遇到不确定的地方,先停下来询问用户,不要擅自生成TODO

第五步:交付校验,引入check.md,检查产物是否真的符合要求,并把最终回答组织成可验收交付单

第六步:调试返工,引入debug.md,修BUG。

第七步:提交代码前再引用memory.md,把用户提出过的错误与自己的行为再对照检查一遍,如果犯了就改正

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 9dbbd78. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 5 days ago.

Steadyupdated 6 months ago

README badge

README badge for lunashia/code-generation-skill/generate-code