A Skill file with context of May 2nd security issues

By (@mouse) · · Websites

A Skill file with context of May 2nd security issues  - image 1

SKILL.md + PROMPTS.md: Your AI Agent's Security Instincts When you build software with AI coding assistants:

— Claude Code, Cursor, Copilot, or any other —

You're moving fast. That speed is the whole point. But AI-generated code has a specific, well-documented vulnerability profile that's different from human-written code. Nearly half of it fails basic security tests. Most of it skips input sanitization. About one in five imports references a package that doesn't actually exist. These aren't edge cases — they're the statistical norm for vibe-coded software in 2026.

The two files we built address this directly, at the agent level, before bad code ships.

The SKILL.md file is a behavioral blueprint for your AI agent.

TLDR: teaches your AI agent to automatically spot the security problems that AI-generated code is statistically bad at: fake packages, hidden prompt injections, hardcoded secrets, and missing input validation.

When you drop SKILL.md into a Claude Code skills folder — or any agent that reads skill files — the agent learns a new capability: security auditing tuned specifically for AI-generated code. It doesn't just run a generic lint check. It knows why vibe code fails, and it looks for the specific patterns that LLMs introduce.

The skill loads six scan modules automatically whenever it's triggered. The first hunts for prompt injection — hidden text in comments, config files, or tool descriptions designed to hijack any AI agent that later reads the file. This is an attack surface that didn't exist two years ago and that almost no one is checking yet. The second module catches slopsquatted packages: fake library names that AI tools hallucinate, which attackers pre-register as malware so they install silently when a developer runs npm install. The third flags hardcoded secrets — API keys, passwords, tokens — which LLMs embed far more often than humans because they optimize for working examples, not operational security.

The remaining three modules cover OWASP Top 10 vulnerabilities (XSS, SQL injection, command injection — the basics that 86-88% of AI-generated code fails), MCP server and agent configuration safety, and CI/CD pipeline permissions when AI agents are part of the build process.

Every scan produces the same structured report: severity ratings (Critical through Low), the exact location of each finding, a plain-English explanation of the attack vector, and a specific fix. Your agent doesn't just tell you something is wrong — it tells you what to do about it.

The PROMPTS.md file is the entry point for anyone using the agent.

TLDR: six copy-paste prompts so anyone on your team can trigger that security scan instantly, without needing to know the threat taxonomy behind it.

A skill only works if people know how to activate it. The six prompts solve that. They're designed so a developer — or a non-security specialist — can get a meaningful scan result without knowing anything about the threat taxonomy underneath.

Prompt 1 is the everyday workhorse: paste your AI-generated code, get a full report. Prompt 3 handles the package hallucination problem specifically — run it before any npm install or pip install from AI output. Prompt 2 audits MCP server configs and agent instruction files, which are the newest and least-scrutinized attack surface in the stack. Prompts 4 and 5 go deeper into CI/CD pipelines and specific vulnerability classes. Prompt 6 generates a full threat model for an entire project before it goes live or open-source.

Together, these two files embed security awareness into the agent's default behavior.

The SKILL.md makes the capability available; the PROMPTS.md makes it accessible. A developer doesn't need to think "I should run a security scan" — the agent recognizes the context and raises the issues automatically. That's the shift these files are designed to create: from security as a separate step you remember to run, to security as something your AI agent does as part of writing code in the first place.

Tech stack

  • Gemini
  • GitHub Copilot
  • Grok
  • Codex

Prompt steps

  1. Step 1

    I generated the following code using [Agent(s)].
    Please run a full AI vibe security scan on it and give me a structured report.
    Check for prompt injection patterns, hallucinated packages, hardcoded secrets,
    OWASP Top 10 vulnerabilities, and anything else that looks risky for
    AI-generated code specifically.
    
    [PASTE CODE HERE] or [File path]
  2. Step 2

    Please audit this agent configuration file for security issues. I'm specifically
    worried about prompt injection in tool descriptions, over-permissioned tool
    access, MCP servers loading from untrusted sources, and any instructions that
    could be used to manipulate an AI agent reading this file.
    
    [PASTE CONFIG FILE CONTENTS HERE]
    
    Also tell me: are there any tool descriptions that could be misread as
    instructions to bypass safety checks or override system behavior?
  3. Step 3

    Here is a dependency file generated by an AI coding assistant. Please check
    every package name for signs of hallucination or slopsquatting — packages
    that look real but don't exist, or names that are slightly wrong versions of
    legitimate packages that attackers could register as malware.
    
    Flag anything you can't confidently verify and tell me which registry to
    check for each flagged package.
    
    [PASTE DEPENDENCY FILE HERE]
  4. Step 4

    Please audit this CI/CD configuration for AI agent security issues. Focus on:
    1. Whether GITHUB_TOKEN or other secrets have overly broad scopes
    2. Whether the AI agent step has access to production credentials it shouldn't
    3. Whether there's a human approval gate before agent-triggered deployments
    4. Whether auto-merge or auto-deploy can be triggered by agent output alone
    5. Any prompt injection risk in workflow names, PR titles, or commit messages
       that get passed to the agent as context
    
    [PASTE GITHUB ACTIONS YAML OR CI CONFIG HERE]
  5. Step 5

    I need a focused security review of this code specifically for [CHOOSE ONE:
    SQL injection / XSS / command injection / path traversal / SSRF / 
    authentication bypass / IDOR / insecure deserialization].
    
    This code was AI-generated so pay extra attention to input sanitisation —
    LLMs tend to skip it when optimising for working examples.
    
    For every instance you find, show me:
    - The exact vulnerable line(s)
    - A concrete attack example showing how it could be exploited
    - The fixed version of the code
    
    [PASTE CODE HERE]
  6. Step 6

    I built this project primarily using AI coding assistants. Please create a
    threat model for it based on the structure and code I'll share below.
    
    Specifically I want to understand:
    1. What are the highest-risk attack surfaces given this is AI-generated code?
    2. Which of the six AI vibe security scan modules apply most to this project?
    3. What security controls are visibly absent that I should add before launch?
    4. Are there any patterns in the code that suggest the AI assistant introduced
       systematic vulnerabilities (e.g. consistently missing input sanitisation,
       always using string concatenation for queries)?
    
    Project description: [BRIEF DESCRIPTION OF WHAT IT DOES]
    Tech stack: [LANGUAGES, FRAMEWORKS, DATABASES]
    
    [PASTE KEY FILES, DIRECTORY STRUCTURE, OR REPRESENTATIVE CODE SAMPLES]

Comments (5)

  1. Bassey · · 1 like

    This is actually a really strong idea — shifting security from “manual step” to agent behavior is exactly where things need to go

  2. Joshua · · 1 like

    I like how you broke it into capability (SKILL.md) vs usability (PROMPTS.md), that separation makes it practical.

  3. viktor · · 1 like

    The slopsquatting + prompt injection focus is especially relevant right now, most devs still ignore those

18 likes · 5 comments · 6 views

Explore more on Prompted