prompt-engineering

prompt-engineering is a skill for Claude Code, Codex from nongjun/feishu-cursor-claw. It costs 52 tokens per session (460 once invoked), scanned A, original, MIT.

A set of rules for managing AI prompts and cleaning user input before it is placed into a prompt. Prompt injection is an attempt to make an AI ignore its intended instructions or perform an unintended action.

In plain words
What is it for?
Use it when adding an AI feature, defining prompt templates, sanitizing chat messages, registering prompts, selecting models by function, or allowing users to edit stored prompts.
Why use it?
It reduces risks from unsafe input and keeps prompts organized, registered, and linked to the correct application function. It also supports tracking which prompt was used.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding an AI feature, defining prompt templates, sanitizing chat messages, registering prompts, selecting models by function, or allowing users to edit stored prompts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nongjun/feishu-cursor-claw/prompt-engineering
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nongjun/feishu-cursor-claw --skill prompt-engineering
Clone the repo
git clone --depth 1 https://github.com/nongjun/feishu-cursor-claw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prompt-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/nongjun/feishu-cursor-claw/prompt-engineering/github.svg)](https://agentmods.dev/skills/nongjun/feishu-cursor-claw/prompt-engineering)
Your own site
<a href="https://agentmods.dev/skills/nongjun/feishu-cursor-claw/prompt-engineering"><img src="https://agentmods.dev/badge/skills/nongjun/feishu-cursor-claw/prompt-engineering/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prompt-engineering

Your own site · 80×15
<a href="https://agentmods.dev/skills/nongjun/feishu-cursor-claw/prompt-engineering"><img src="https://agentmods.dev/badge/skills/nongjun/feishu-cursor-claw/prompt-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 460 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00460
Opus 5 $0.00026 $0.00230
Sonnet 5 $0.00010 $0.00092
Haiku 4.5 $0.00005 $0.00046

Measured 9d ago against content hash 948142606021, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

prompt-engineering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

参考代码/njcursor/skills/prompt-engineering/SKILL.md · 49 lines

What it actually says

提示词工程

当前能力

能力 位置 说明
输入清洗 shared_backend/utils/prompt_utils.py 防 .format() 注入、移除控制字符
提示词注册 AIService 内置方法 scan_and_register_prompts()
模型绑定 门户系统 按 function_code 绑定模型
自定义提示词 智能回复模块 数据库存储,用户可编辑

安全清洗函数

函数 用途
sanitize_prompt_input(text) 转义花括号防 .format() 注入
sanitize_chat_message(text) 更严格:移除控制字符+长度限制+伪装检测

SOP:新增 AI 功能

  1. 定义提示词模板文件(SYSTEM_PROMPT + USER_PROMPT + PROMPT_META)
  2. 调用 sanitize_prompt_input() 清洗用户输入后再填充模板
  3. 使用 AIService.chat() 调用,传入 prompt_name 用于统计
  4. 在门户后台注册功能点并绑定模型

提示词模板规范

  • PROMPT_META:name、display_name、description、module、variables
  • SYSTEM_PROMPT:角色定义和约束
  • USER_PROMPT:带变量占位符的任务模板
  • 可选:OUTPUT_SCHEMA 定义结构化输出格式

重点关注

  • 用户输入必须经过 sanitize 后再填充模板,防止注入
  • 提示词文件放在模块的 prompts/ 目录下
  • 通过门户系统可动态切换某功能点使用的模型
  • 日志记录依赖传入 prompt_name 参数

参考文件

  • 公共模块/shared_backend/utils/prompt_utils.py
  • 公共模块/shared_backend/services/ai_service.py
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 49 lines · 52 tokens per session scan A 948142606021

Subscribe to this mod's changes

prompt-engineering is a skill published in the GitHub repository nongjun/feishu-cursor-claw (14 stars, last pushed 1mo ago), licensed MIT. It adds 52 tokens to every session and 460 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

firebase-ai

Use when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.

evanca/flutter-ai-rules · 30 tokens

audit-langfuse-llm

Run a PDCA quality audit on LLM/AI features: traces, prompts, costs, evals, grounding, hallucination. Use for "audit LLM quality", "check Langfuse", "audit prompts", "check AI quality", "audit AI costs", "check traces". Jailbreak/OWASP LLM → audit-llm-security. Token caps → plan-llm-cost-guardrails.

kensaurus/cursor-kenji · 93 tokens

audit-llm-security

Read-only OWASP LLM Top 10 audit of app-facing AI: prompt injection, data leakage, unsafe output/agency, RAG risks, misinformation, and unbounded spend. Use when "audit LLM security", "prompt injection", "jailbreak my chatbot", or "is my AI safe?". General app security → audit-security.

kensaurus/cursor-kenji · 76 tokens

llm-debugger

Diagnoses LLM output failures including hallucinations, constraint violations, format errors, and reasoning issues. Provides root cause classification, prompt fixes, tool improvements, and new test cases. Use for "debugging AI", "fixing prompts", "quality issues", or "output errors".

patricio0312rev/skills · 62 tokens

prompt-template-builder

Creates reusable prompt templates with strict output contracts, style rules, few-shot examples, and do/don't guidelines. Provides system/user prompt files, variable placeholders, output formatting instructions, and quality criteria. Use when building "prompt templates", "LLM prompts", "AI system prompts", or "prompt…

patricio0312rev/skills · 66 tokens

prompt-regression-tester

Compares old vs new prompts across test cases with diff summaries, stability metrics, breakage analysis, and fix suggestions. Use for "prompt testing", "A/B testing prompts", "prompt versioning", or "quality regression".

patricio0312rev/skills · 52 tokens