AI Agent Hub
Back to skills
Coding Prompt Best Practices icon

Coding Prompt Best Practices

AI Agent Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Follow https://skillhub.cn/install/skillhub.md to install @user_5b28ea14/coding-prompt.

About this skill

Problem

When developers delegate coding tasks to LLMs, the failure mode is rarely “it cannot code.” More often, the prompt lacks context, acceptance criteria, technical constraints, and counterexamples, so the output looks complete while containing TODO markers, placeholder returns, or sample data. It may also favor hardcoded rules, regex, or scoring logic when a native LLM approach would be better. coding-prompt addresses this engineering collaboration gap: it diagnoses, rewrites, and monitors coding prompts rather than generating code directly, reducing failure patterns such as fake completion and rule-based bias.

How it works

The skill has two main paths:

  • Explicit optimization: When the user triggers 优化提示词, improve my prompt, or pastes a prompt for review, it performs a full diagnosis using its checklist, principles, communication patterns, and anti-pattern references, then returns a rewritten version.
  • Active monitoring: Once activated, it stays engaged for the session but only appends alerts for high-priority signals. For example, it flags code containing stubs, TODOs, placeholder returns, or sample data as suspected fake completion, and flags hard-coded rules when LLM-native behavior would be preferable. Lower-priority issues are not interrupted proactively.

It also includes an append-only learnings.md evolution protocol: the core skill and reference files are read-only, while personal experience is written only after user confirmation, deduplication, and refinement to avoid inflating one-off task details into a rule base.

Boundaries

It is useful for optimizing prompts, checking session quality, and accumulating team prompt conventions. It is not a replacement for code review, static analysis, or tests. It focuses on prompts and collaboration signals; it does not modify user project files unless the user asks it to record learnings.

Use Cases

  • Before refactoring a complex function, ask the model to fill in context, edge cases, and acceptance criteria.
  • When output includes TODOs or placeholder returns, request a prompt review to flag fake completion and complete implementation.
  • In agent workflows, rewrite vague product requests into engineering prompts with inputs, outputs, constraints, and counterexamples.
  • During collaborative coding, enable active monitoring to flag rule-based bias, such as regex when semantic LLM judgment is better.

Best For

  • Backend engineers who need to turn vague requirements into executable coding prompts.
  • Frontend engineers who repeatedly encounter placeholder implementations and fake completion in AI-assisted coding.
  • Tech leads maintaining agent workflows and standardized prompt-review rules.
  • Independent developers who want to capture prompt experience without changing core skill rules.