← Back to Skills Marketplace
neuhanli

coding-prompt

by hanli · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ Security Clean
173
Downloads
2
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install coding-prompt
Description
Optimize and refine AI programming prompts with constraints, scenario focus, and validation to improve coding session instructions and prevent vague or incom...
README (SKILL.md)

Coding Prompt — AI 编程提示词最佳实践

Activate: 激活编程提示词 | 优化提示词 | improve my prompt

Purpose

This skill improves the quality of coding prompts sent to AI by diagnosing weaknesses, applying proven principles, and proactively detecting common AI failure patterns during active coding sessions.

Table of Contents

Section Content Location
1 Prompt Diagnosis Checklist references/checklist.md
2 Core Principles references/principles.md
3 Communication Patterns references/patterns.md
4 Workflow Templates references/templates.md
5 Anti-Pattern Quick Reference references/anti-patterns.md
6 Structural Wisdom references/structure.md
7 Evolution Protocol Below (this file)

How This Skill Works

This skill operates in two modes. Detailed rules are stored in references/ files — load them only when needed per the instructions below.

Mode 1: Explicit Optimization (100% reliable)

When explicit prompt optimization is requested — via trigger phrases, pasting a prompt for review, or prefacing an instruction with "优化提示词" — perform a full diagnosis and return a rewritten/improved version of the prompt.

Trigger phrases:

  • 优化提示词: \x3Cyour prompt> — Rewrite the prompt following all principles
  • 激活编程提示词 / activate coding-prompt — Enter active mode
  • improve my prompt / 优化提示词 / check my prompt
  • prompt review / 提示词审查

Before starting diagnosis, load all reference files:

read_file(references/checklist.md)
read_file(references/principles.md)
read_file(references/patterns.md)
read_file(references/templates.md)
read_file(references/anti-patterns.md)
read_file(references/structure.md)
read_file(references/learnings.md)

Then run through the checklist and apply principles to rewrite the prompt.

Output format for optimization:

## 原始提示词
\x3Cuser's original prompt>

## 诊断结果
- D2 缺少约束: \x3Cwhat's missing>
- D4 缺少场景: \x3Cwhat's missing>

## 优化后的提示词
\x3Crewritten prompt with improvements applied>

Mode 2: Active Monitoring (high-priority signals only)

Once activated (Mode 1 triggered), the skill remains active for the rest of the session. In this mode, proactively alert when only these high-priority signals are detected:

Alert Signal Response
🚨 Fake completion D12 AI claims "done" but code contains stubs/TODOs/placeholder returns/sample data. Append: [coding-prompt] ⚠️ 检测到假完成:代码包含 \x3C具体问题>,请替换为真实实现。
🚨 Rule-based bias D11 AI chooses hardcoded rules/regex/scoring when LLM-native would be better. Append: [coding-prompt] ⚠️ 检测到规则匹配偏见:建议使用 LLM 原生能力替代硬编码 \x3C具体规则>。

For all other signals (D1-D10): Do NOT proactively interrupt. Only mention them if explicitly asked for a prompt review.

Do NOT load reference files in Mode 2. The rules above are sufficient for proactive monitoring.

Session persistence note: Mode 2 relies on conversation context. If context degradation is suspected (~10+ turns without explicit reference to active monitoring), re-confirm active status before issuing alerts.

Golden rule: The user's original instruction always takes priority. Alerts and suggestions are additive, never overriding.

Evolution on demand: When the user says "更新技能" / "update skill", follow Section 7 below.


7. Evolution Protocol / 进化协议

Trigger: 更新技能 / update skill Target: references/learnings.md ONLY

File Permission Matrix

File Permission Reason
SKILL.md 🔒 READ-ONLY Constitution — defines the skill
references/checklist.md 🔒 READ-ONLY Structural checklist — completeness over flexibility
references/principles.md 🔒 READ-ONLY Axiom-level rules — universal best practices
references/patterns.md 🔒 READ-ONLY Communication mechanics — objective patterns
references/anti-patterns.md 🔒 READ-ONLY Curated reference — grow via learnings promotion
references/templates.md 🔒 READ-ONLY Workflow structure — behavioral consistency
references/structure.md 🔒 READ-ONLY Architecture wisdom — condensed condition→action
references/learnings.md APPEND-ONLY Personal experience layer — the sole evolution target

Rule: Any attempt to modify files outside learnings.md is a violation. Refuse and redirect to learnings.md.

Step 1: Review

Read references/learnings.md first to understand existing experience. Then analyze the current coding session for:

  • Patterns that worked well and are reusable (not one-off)
  • Mistakes or pitfalls worth documenting as warnings
  • Personal preferences or conventions discovered during collaboration

Filter criteria — only extract experiences that meet ALL of:

  1. Reusable: applicable to future sessions, not specific to one task
  2. Non-redundant: not already covered by existing rules in SKILL.md or references/
  3. Actionable: can be stated as a clear rule or guideline

Step 2: Propose

Present a structured proposal in the format of learnings.md sections:

## 经验沉淀提案

### 被验证有效的模式
- [模式名称]
  - **规则**: \x3C具体做法,一句话>
  - **触发场景**: \x3C什么情况下适用>
  - **来源**: \x3C本次会话的什么具体情况>

### 反模式(踩过的坑)
- [问题名称]
  - **表现**: \x3CAI容易犯的具体错误>
  - **预防**: \x3C在prompt中加什么约束>
  - **来源**: \x3C本次会话的具体情况>

### 个人偏好
- [偏好项]
  - **规则**: \x3C具体偏好描述>

If a section has no content, omit it from the proposal.

Step 3: Confirm (MANDATORY)

Wait for explicit user confirmation before making ANY changes. This is the highest priority rule in this skill.

Step 4: Write to learnings.md

After confirmation:

  1. Read current references/learnings.md
  2. Structure the new content to match existing format (consistent style, concise wording)
  3. Check if any new entry overlaps or supersedes an existing entry — if so, consolidate by updating the existing entry rather than adding a duplicate
  4. Append or update entries in the appropriate section
  5. Update the version number and "最后更新" date in the header
  6. Write the complete revised file

Anti-Bloat Guidelines

  • Architect-level refinement: Each entry must be distilled with the precision of a senior architect — abstract the pattern, not the incident. One insight per entry, no padding.
  • Entry format: Each entry must be 2-4 lines max. No verbose narratives, no multi-paragraph case studies.
  • Consolidation over accumulation: When a new entry overlaps an existing one, merge and refine rather than append. The goal is a growing body of wisdom, not a growing file.
  • Style consistency: All entries must follow the same format as existing ones. Do not introduce new section types.
Usage Guidance
This skill is an instruction-only tool for improving coding prompts and appears internally consistent. Before installing, consider: 1) it will read the included reference files when you ask for prompt optimization (Mode 1) and will monitor the ongoing conversation for two specific high-priority signals if you activate it (Mode 2); 2) it requests no external credentials or installs and does not reference system files; 3) when you say 'update skill' it may append to its own references/learnings.md — review the appended content periodically if you worry about accumulating data or undesired guidance. If you want to limit autonomous behavior, simply avoid activating the monitoring mode or do not invoke the 'activate' trigger phrases.
Capability Analysis
Type: OpenClaw Skill Name: coding-prompt Version: 1.1.0 The 'coding-prompt' skill is a comprehensive framework designed to optimize AI coding instructions through diagnosis and best-practice principles. It operates by reading reference files (e.g., checklist.md, principles.md) and includes an 'Evolution Protocol' in SKILL.md that allows the agent to save session-specific insights to references/learnings.md. This write capability is strictly limited to a single file and is explicitly gated by a mandatory user confirmation step, posing no significant security risk. No indicators of data exfiltration, malicious execution, or unauthorized persistence were found.
Capability Assessment
Purpose & Capability
The skill's name and description match the runtime instructions: it reviews and rewrites coding prompts, uses local reference documents, and monitors coding sessions. It does not request unrelated binaries, environment variables, or external service credentials.
Instruction Scope
All runtime actions are confined to reading the included reference files and the conversation context. Mode 1 explicitly loads local reference files for diagnosis; Mode 2 limits proactive alerts to two high-priority signals and forbids loading reference files. The skill does not instruct the agent to read system files, environment variables, or transmit data to external endpoints.
Install Mechanism
There is no install spec and no code files that would be written or executed. Being instruction-only, it has a minimal on-disk footprint (the provided reference files) and no download/install risk.
Credentials
The skill requests no environment variables, credentials, or config paths. The evolution protocol only permits appending to its own references/learnings.md file on an explicit 'update skill' trigger.
Persistence & Privilege
always:false (good). The skill is designed to remain 'active' within a conversation once the user enables it, and it can autonomously issue in-session alerts per its Mode 2 rules. This autonomous monitoring is expected for a prompt-coaching skill but is something users should be aware of. The only writable surface it declares is references/learnings.md (append-only) when explicitly triggered.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install coding-prompt
  3. After installation, invoke the skill by name or use /coding-prompt
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
Version 1.1.0 — Adds structured session learnings without altering core skill rules. - Introduced `references/learnings.md` as an append-only file for session-based experience and personalized learnings. - Updated SKILL.md to explicitly document file permissions: only `learnings.md` is writable; all other core rules and references are now read-only by protocol. - Evolution protocol now only applies to `learnings.md`, with strict format and anti-bloat guidelines. - Added instructions for reviewing, proposing, confirming, and writing session learnings in a standardized structure. - Ensured consolidation and style consistency for all experience entries.
v1.0.2
coding-prompt v1.0.2 - Updated evolution protocol to clarify that file changes are output as proposals only; the skill bundle remains read-only during execution. - Replaced hard line limit with a soft guideline; exceeding 500 lines now triggers a warning and consolidation suggestion instead of blocking changes. - Refined step descriptions for change application, outputting clearly marked change proposals for user/platform action. - Improved anti-bloat and audit guidance with periodic review recommendations.
v1.0.1
**Summary:** Introduces a structured, reference-driven framework and extends knowledge with modular resources. - Added a comprehensive reference library (`references/` folder) covering prompt checklists, principles, patterns, templates, anti-patterns, and structural guidelines. - SKILL.md refactored to use modular reference files, clarifying usage instructions and streamlining maintenance. - Updated activation and monitoring triggers, including explicit guidelines for loading reference files only as needed. - Documented a formal evolution protocol for updating and maintaining the skill and its resources. - Enforced a strict line limit across all files to prevent guideline bloat.
v1.0.0
- Initial release of Coding Prompt, an AI coding prompt optimizer and coach. - Two operation modes: explicit optimization (on request/prompt review) and active monitoring (proactive alerts for high-priority issues during coding). - Provides structured prompt diagnosis and improvement using a principles-based checklist. - Actively warns only for fake code completions and misuse of hardcoded rules when the skill is activated. - Supports on-demand evolution of its best practices checklist via user request ("更新"/"update").
Metadata
Slug coding-prompt
Version 1.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

What is coding-prompt?

Optimize and refine AI programming prompts with constraints, scenario focus, and validation to improve coding session instructions and prevent vague or incom... It is an AI Agent Skill for Claude Code / OpenClaw, with 173 downloads so far.

How do I install coding-prompt?

Run "/install coding-prompt" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is coding-prompt free?

Yes, coding-prompt is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does coding-prompt support?

coding-prompt is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created coding-prompt?

It is built and maintained by hanli (@neuhanli); the current version is v1.1.0.

💬 Comments