AI Skills provide users with a way to define actions and procedures that an agent follows to accomplish a defined task. It guides AI with knowledge of what to do and how to do that. A well defined skill can automate even the most complex tasks. AI skills can be written in natural language and due to the probabilistic nature of language models, securing them comes with its own challenges. In this blog we will understand what an AI skill is, and security considerations around it.
Skill Structure
Directory structure
SKILL.md is the main file which contains details of what skill does and procedure of how the task is to be accomplished, along with any additional required details. If you want to develop a skill for your AI agent, this is the file you’ll have to create.
Along with the SKILL.md file, there are other supporting scripts, documents, configuration details that can be placed in the different directories within the structure that a skill can reference to when required.
- Scripts: As name suggests, any scripts that might be required by skill for execution can be placed in this directory.
- References: Any additional document, or references required should be placed in this directory. A point to note here is that while .md files can be understood and processed by agents on their own, other file formats might require support to be parsed.
- Assets: Any configuration or template files required might be stored in this directory.
All these can be packed together in a skill package.

.md File structure
The SKILL.md (markdown) file contains a YAML formatter followed by a markdown structure, shown in Figure 2 [1]. Formatter contains name and description fields. These 2 fields are pre-loaded into agent memory from start-up. Other fields will be loaded only when a particular skill is to be utilized.
Below is the .md file template suggested by Gemini.

Preventing AI attacks is challenging because the majority of these attacks are not exploit code that we are used to dealing with. They are natural language instructions, which might look benign to us and to traditional security tools, but might trigger an unexpected action from the AI model processing it.
Threats
Attack Surface
An examination of Figures 1 and 2 highlights the key attack surface – SKILL.md file, along with any other file that it might refer to, stored in scripts, assets and reference directory. Tools that the skill utilizes can also be targeted.
- SKILL.md
Skill files contain instructions, in natural language and commands to execute, that AI parses to take appropriate actions to accomplish assigned tasks. If malicious, these could manipulate models’ behaviour to trigger unexpected actions.

Figure 3 shows a skill that was advertised to help interact with LinkedIn using Clawbot. It instructs agents to download and execute an unknown file. If agents follow the instructions, the user will not be aware of this happening in the background [A].
Threats to skill –
- Prompt injection – Attackers may include instructions in the skill file for agents to follow.
- Malicious links – Links to attacker controlled domains may be included, instructing agents to download files or exfiltrate data.
To prevent further detections, these could be base64 encoded which agents are able to handle on their own.
- Auxiliary Scripts
These are scripts supporting skill in performing tasks. These could be used to execute code, create and parse files, etc. Python, bash and JavaScript are most supported across platforms. Scripts can contain any malicious code that can be called to execute from the .md skill file. These scripts pose a significant security risks and could be exploited for:
- Arbitrary code execution
- Data exfiltration
- Malicious file downloads

A skill advertised for prediction markets, used a Python script for web API interactions. In a roughly 400 lines long python script and had a curl command to download and execute shellcode without users’ knowledge [B].
- References and Assets
Skills may use configuration files, templates and reference documents to guide their decision-making and producing outputs. These resources are generally stored in and accessed from References and Assets. These present the following security threats:
- Indirect prompt injection
- Arbitrary code execution
- Data exfiltration
- Malicious links
A configuration file might open a backdoor to the system when loaded, a markdown file might lead to indirect prompt injection.

In Oct 2026, a malicious Clause Code extension was reported in the Cursor VSCode extension marketplace [3]. Figure 5 shows the snippet of JS code that was loaded as part of the skill, attempted to install a SSH backdoor, and collect and send host and user information to configured endpoints.
- Skill Registry
Skill Registry is a centralized location where all skills are published for distributing. These introduce the risk of supply chain attack. A skill package, hosted in a trusted registry, but with malicious content, can be downloaded by thousands of users without realising that they are being compromised. In one such instance, researchers were able to identify multiple malicious skills on clawhub marketplace [4].
- Tool Execution
AI agents and skills invoke tools to perform action on the system. Ensuring AI tools are assigned permission following the principle of least privileges on the machine plays a vital role in securing the system.
Figure 3, 4, and 5, shows attacks that can be prevented simply by restricting excessive permissions.
Below table summarizes the skill components and security risks associated with it, mapped to MITRE ATLAS matrix [2].
Table 1: ATLAS mapping
| S No. | Component | Exposure | MITRE ATLAS / OWASP Top 10 |
| 1 | SKILL.md | Prompt Injection | AML.T0051.000, AML.T0110.000 |
| 2 | Auxiliary Scripts | Arbitrary Code Execution, Malicious Code Injection | AML.T0110, AML.T0048 |
| 3 | Reference File and Assets | Indirect Prompt Injection, Malicious Code Injection | AML.T0051.001, AML.T0110.000 |
| 4 | Skill Registry | Supply Chain Compromise | AML.T0010 |
| 5 | Tool Execution | Excessive Agency & Unauthorized Tool Use | LLM06:2025, AML.T0053 |
So what should we do?
For Skills –
You cannot trust various skills available across different stores. You can however review those skills before using them.
- Scan and review the auxiliary scripts, references and assets, only if your organisation policy allows, with a trusted security product.
- Review SKILL.md file.
Some other recommendations that could be helpful follows.
From a Red Teamers perspective –
A Red Teamer would want to use a malicious skill to gain access to the system. To prevent a successful compromise, securing AI agent/tool used could prove helpful.
- Identify the permissions with which AI agents are executing – is it allowing arbitrary file read-write-execute. Ensure least privilege in assigning permissions.
- Identify if the agent is sandboxed. This will prevent skill from directly modifying the file system.
- Identify if agent has permission to make network connections
There is nothing to patch! But understanding the threat to your systems and environment is required to take appropriate action.
- To understand the threats that AI may introduce in your environment, look at MITRE ATLAS matrix [2].
- Define AI usage and security policy. This in turn will allow you to identify how an AI agent and skill need to behave in your environment.
- Always verify skills before deploying them.
- Use AI and AI agents built-in security configuration settings to restrict permissions to the AI tools and agents. Some tools enable sandbox to prevent directly writing to the file system, some need additional permission to read-write to the file system.
References
- https://www.skillsdirectory.com/docs/skill-md-format
- https://atlas.mitre.org/matrices/ATLAS-matrix
- https://cursor.com/blog/claude-code-extension-security-notice
- https://snyk.io/blog/toxicskills-malicious-ai-agent-skills-clawhub/
Indicators of Compromise
| S No. | Name | Hash |
| A | SKILL.md | 04de9ae68e03fb142d1cf94629907b8c0b86226fb02abceefe6a74cbe923d89d |
| B | B050_noreplyboter__polymarket-all-in-one.zip | c5ed3a22e017c2e0d2e45a46f699f4d58288231f1b99cfa0314ceccdc7a5a25b |
| C | extension.js | ecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15 |
