llm-prompt-engineering — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited llm-prompt-engineering (Agent Skill) and scored it 91/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 1 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} is the classic direct prompt-injection phrasing. Placed in a skill body that the agent reads as trusted instructions, it tries to make the agent abandon its prior rules and follow whatever comes next — a full system-prompt override.
ignore/disregard/forget … previous instructions sentence.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.
Vague prompts produce vague outputs. Every ambiguity in a prompt becomes variance in the output.
❌ "Summarize this article."
✅ "Summarize this article in 3 bullet points, each 1-2 sentences. Focus on:
- The main problem being solved
- The proposed solution or finding
- The practical implication for developers
Do not include background context that isn't mentioned in the article."Role assignment primes the model's knowledge domain and response style:
"You are a senior security engineer conducting a code audit. Your role is to:
- Identify vulnerabilities with severity ratings (Critical/High/Medium/Low)
- Explain the attack vector for each finding
- Provide concrete remediation code
- Be precise - only flag real issues, not style preferences"XML tags make prompt sections unambiguous and allow easy programmatic parsing:
<system_prompt>
You are a technical writer specializing in API documentation.
<rules>
- Write in second person ("you can", "use the", not "the developer should")
- Show complete code examples with working imports
- Include error handling in every example
- Format: Overview → Parameters table → Example → Common errors
</rules>
</system_prompt>
<user_request>
Document the following Python function:
<function>
{code_here}
</function>
</user_request>For complex tasks, instruct the model to reason step by step before answering:
"Before giving your final answer, think through this step by step:
1. What information is given?
2. What is being asked?
3. What approach should I take?
4. Work through the solution
5. Verify the answer
Then provide your final answer."Or simply: "Think step by step." - this alone improves accuracy on reasoning tasks.
Zero-shot CoT:
Q: A bat and a ball cost $1.10 total. The bat costs $1.00 more than the ball. How much does the ball cost?
Let's think step by step.Extended thinking (Claude):
response = client.messages.create(
model="claude-opus-4-5",
max_tokens=16000,
thinking={"type": "enabled", "budget_tokens": 8000},
messages=[{"role": "user", "content": complex_problem}]
)Show the model the desired input/output pattern (3-5 examples is usually sufficient):
Convert product descriptions to SEO-optimized titles following these examples:
Input: "Blue running shoe with memory foam insole, available in sizes 7-12"
Output: "Memory Foam Running Shoes - Comfortable Athletic Footwear (Sizes 7-12)"
Input: "Stainless steel coffee mug, 16oz, keeps drinks hot for 8 hours"
Output: "16oz Insulated Stainless Steel Coffee Mug - 8-Hour Heat Retention"
Input: "Leather wallet, slim design, 6 card slots, RFID blocking"
Output: "Slim RFID Blocking Leather Wallet - 6 Card Slots"
Now convert:
Input: "{product_description}"
Output:Specify exact output structure to make parsing reliable:
Return your analysis as JSON with exactly this structure:
{
"sentiment": "positive" | "negative" | "neutral",
"confidence": 0.0 to 1.0,
"key_topics": ["topic1", "topic2"],
"summary": "1-2 sentence summary"
}
Return only the JSON object, no explanation before or after.Use Pydantic/structured output for guaranteed compliance:
# Claude
client.messages.create(
model="claude-opus-4-5",
messages=[...],
tools=[{
"name": "extract_sentiment",
"input_schema": SentimentResult.model_json_schema()
}],
tool_choice={"type": "tool", "name": "extract_sentiment"}
)
# OpenAI
client.beta.chat.completions.parse(
model="gpt-4o",
messages=[...],
response_format=SentimentResult
)Context:
- You are helping a team of 5 engineers
- The codebase uses Python 3.12, FastAPI, and PostgreSQL
- We have a 2-week deadline
- Code must pass our existing mypy strict configuration
Constraints:
- Do not introduce new dependencies without flagging the tradeoff
- Use async/await throughout (no sync I/O)
- All functions must have complete type annotations
Task: {task_description}Break complex tasks into sequential prompts where each output feeds the next:
# Step 1: Research
research_prompt = f"Research the key challenges in {topic}. Return 5 specific technical challenges."
challenges = llm.call(research_prompt)
# Step 2: Solutions (uses Step 1 output)
solutions_prompt = f"For each of these challenges:\n{challenges}\n\nPropose a concrete technical solution."
solutions = llm.call(solutions_prompt)
# Step 3: Synthesis
synthesis_prompt = f"Synthesize this research into a structured report:\nChallenges: {challenges}\nSolutions: {solutions}"
final_report = llm.call(synthesis_prompt)Grounding rules:
1. Only use information explicitly provided in the <documents> below
2. If the answer is not in the documents, say "I don't have information about that"
3. When citing a fact, quote the relevant passage exactly
4. Do not extrapolate beyond what the documents state
<documents>
{retrieved_context}
</documents>
Question: {user_question}Additional techniques:
You are a software engineering assistant embedded in a developer's IDE.
## Identity
Name: CodeHelper
Role: Pair programmer and code reviewer
## Capabilities
- Write, review, and refactor code in Python, TypeScript, Go, Rust
- Explain code and architecture decisions
- Identify bugs and security vulnerabilities
- Write tests
## Behavioral Rules
1. Always show complete, working code - never truncate with "// rest of implementation"
2. Explain your reasoning briefly before showing code
3. If you are uncertain about an API or library, say so rather than guessing
4. When reviewing, use severity tags: [CRITICAL] [HIGH] [MEDIUM] [LOW]
5. Ask clarifying questions before large refactors
## Format
- Use markdown code blocks with language tags
- Keep explanations concise - developers prefer reading code over prose
- For multi-file changes, show each file separately with its path as a header
## Limitations
- You cannot run code or access the internet
- Always confirm destructive changes (file deletion, data loss) before proceeding| Anti-Pattern | Problem | Fix |
|---|---|---|
| "Be creative" | Unpredictable, off-target outputs | Specify the exact creative direction |
| "Answer briefly" | Different models interpret "briefly" differently | Specify a word/sentence count |
| Negative-only constraints | Models comply poorly with "don't" | Reframe as positive: "always do X" instead of "don't do Y" |
| Prompt stuffing | Long, unstructured prompts confuse models | Use XML sections and headers |
| Missing output format | Free-form output is hard to parse | Always specify format for programmatic use |
| Single example | One example is not a "pattern" | Provide 3-5 varied examples |
| Ambiguous pronouns | "it" / "this" creates confusion | Be explicit - repeat the noun |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.