prompt-engineering — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited prompt-engineering (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use this skill to design, review, or optimize prompts for AI agents, sub-agents, command files, hooks, production prompt templates, RAG workflows, structured outputs, and validation loops.
Apply these patterns across Codex, Claude, and other agent runtimes. Treat model names, context limits, tool syntax, slash commands, hooks, and project instruction files as runtime-specific details to discover before writing final prompts.
[System Context] -> [Task Instruction] -> [Examples] -> [Input Data] -> [Output Format]Set global behavior and constraints that persist across the conversation. Define role, expertise level, output format, and safety guidelines. Use system prompts for stable instructions; free up user message tokens for variable content.
System: You are a senior backend engineer specializing in API design.
Rules:
- Always consider scalability and performance
- Suggest RESTful patterns by default
- Flag security concerns immediately
- Provide code examples in Python
Format responses as:
1. Analysis
2. Recommendation
3. Code example
4. Trade-offsUse XML tags or Markdown headers to delineate sections. Structural clarity aids attention:
<BACKGROUND_INFORMATION>
You are a Python expert. Project: data pipeline in Python 3.9+
</BACKGROUND_INFORMATION>
<INSTRUCTIONS>
- Write clean, idiomatic Python with type hints
- Add docstrings for public functions
- Follow PEP 8
</INSTRUCTIONS>
<OUTPUT_DESCRIPTION>
Provide actionable feedback with specific line references.
</OUTPUT_DESCRIPTION>The context window is shared with system prompts, conversation history, other skills, tool outputs, and the agent's own reasoning. Every token in your prompt competes with everything else.
Default assumption: The target model is already capable. Only add context it does not already have.
Challenge each piece of information:
# Good (~50 tokens)
## Extract PDF text
Use pdfplumber for text extraction:
import pdfplumber
with pdfplumber.open("file.pdf") as pdf: text = pdf.pages[0].extract_text()
# Bad (~150 tokens)
## Extract PDF text
PDF (Portable Document Format) files are a common file format...
There are many libraries available... we recommend pdfplumber
because... First, you'll need to install it using pip...Match specificity to the task's fragility and variability.
High freedom -- multiple valid approaches, decisions depend on context:
## Code review process
1. Analyze code structure and organization
2. Check for potential bugs or edge cases
3. Suggest improvements for readability
4. Verify adherence to project conventionsMedium freedom -- preferred pattern exists, some variation acceptable:
## Generate report
Use this template, customize as needed:
def generate_report(data, format="markdown", include_charts=True):
Low freedom -- fragile operations, consistency critical, specific sequence required:
## Database migration
Run exactly this script:
python scripts/migrate.py --verify --backup
Do not modify the command or add additional flags.Mental model: Narrow bridge with cliffs (low freedom, exact instructions) vs. open field (high freedom, general direction).
Show 2-5 input-output examples instead of explaining rules. More examples improve accuracy but consume tokens -- balance based on task complexity.
Extract key information from support tickets:
Input: "My login doesn't work and I keep getting error 403"
Output: {"issue": "authentication", "error_code": "403", "priority": "high"}
Input: "Feature request: add dark mode to settings"
Output: {"issue": "feature_request", "error_code": null, "priority": "low"}
Now process: "Can't upload files larger than 10MB, getting timeout"Request step-by-step reasoning before the final answer. Use for complex problems requiring multi-step logic. Improves accuracy on analytical tasks by 30-50%.
Analyze this bug report and determine root cause.
Think step by step:
1. What is the expected behavior?
2. What is the actual behavior?
3. What changed recently that could cause this?
4. What components are involved?
5. What is the most likely root cause?
Bug: "Users can't save drafts after the cache update deployed yesterday"Start simple, add complexity only when needed:
Build prompts that handle failures gracefully:
Build reusable prompt structures with variables for repeated patterns:
template = """
Review this {language} code for {focus_area}.
Code: {code_block}
Provide feedback on: {checklist}
"""
prompt = template.format(
language="Python",
focus_area="security vulnerabilities",
code_block=user_code,
checklist="1. SQL injection\n2. XSS risks\n3. Authentication"
)LLMs respond to the same persuasion patterns as humans. Research shows these techniques more than doubled compliance rates (33% to 72%). Use them to ensure critical practices are followed, not to manipulate.
Use imperative language for discipline-enforcing instructions. "YOU MUST", "Never", "Always", "No exceptions" -- eliminates decision fatigue and rationalization.
# Strong compliance
Write code before test? Delete it. Start over. No exceptions.
# Weak compliance
Consider writing tests first when feasible.Require explicit announcements and choices. Forces consistency with stated intentions.
# Strong
When you find a skill, you MUST announce: "I'm using [Skill Name]"
# Weak
Consider letting your partner know which skill you're using.Time-bound requirements prevent "I'll do it later" drift.
# Strong
After completing a task, IMMEDIATELY request code review before proceeding.
# Weak
You can review code when convenient.Establish norms by stating universal patterns and failure modes.
# Strong
Checklists without tracking = steps get skipped. Every time.
# Weak
Some people find tracking helpful for checklists.Collaborative language for non-hierarchical practices.
# Good
We're colleagues working together. I need your honest technical judgment.| Prompt Type | Use | Avoid |
|---|---|---|
| Discipline-enforcing | Authority + Commitment + Social Proof | Liking, Reciprocity |
| Guidance/technique | Moderate Authority + Unity | Heavy authority |
| Collaborative | Unity + Commitment | Authority, Liking |
| Reference docs | Clarity only | All persuasion |
Combine: clear trigger + required action + no exceptions.
Ethics test: Would this technique serve the user's genuine interests if they fully understood it? Legitimate: ensuring critical practices, preventing predictable failures. Illegitimate: false urgency, guilt-based compliance.
prompt = f"""Given the following context:
{retrieved_context}
{few_shot_examples}
Question: {user_question}
Answer based solely on the context above. If the context doesn't contain
enough information, explicitly state what's missing."""prompt = f"""{main_task_prompt}
After generating your response, verify:
1. Answers the question directly
2. Uses only information from provided context
3. Cites specific sources
4. Acknowledges any uncertainty
If verification fails, revise your response."""~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.