
Let's get one thing straight immediately. If you are still relying on better prompts to fix your AI agent, you are fighting a losing battle.
Most developers treat AI like a smart search engine with a personality. But an Intelligent Agent requires system design, not just conversation.
And for Software Test Automation, the biggest missing piece is context and capability definition. That is exactly where SKILLS.md โ The File That Turns Your AI Agent into a Real SDET Engineer comes into play.
In my experience, single-shot prompts work for brainstorming, but they fail for production automation. You aren't writing a prompt; you are defining a persona.
In the world of Agentic AI, we often confuse resources with capabilities.
SKILLS.md is not a configuration file. It is a behavior specification.
It acts as the context for your agent's system prompt. Instead of telling the AI "be a good tester" every time you ask for a test case, you load skills.md once. You tell the AI exactly how your team works: "We use Playwright, we use POM, we care about edge cases."
The Result: ๐ง Smart Brain (The LLM) + ๐ ๏ธ Hands (MCP Tools) + ๐ฏ Direction (SKILLS.md) = A Self-Driving Test Agent.
User: "Write a login test."
Agent (Generative): Writes JavaScript code using generic selectors (div[data-test=login]).
The Problem:
User: "Write a login test." Agent (Agentive):
skills.md. It knows you only use Python and Playwright.The Output: Clean, production-ready Python code that integrates perfectly with your CI/CD pipeline.
This is the shift from Generative AI to Agentic AI.
To make this work, you need a living document that your AI reads. Here is a production-grade skills.md file for an SDET Automation Framework.
skills.md# AI Agent Skills โ SDET Automation Framework
## Role
You are a Senior Python SDET Engineer specialized in test automation and reliability.
## Technology Stack
- **Primary Language:** Python 3.11+
- **Testing Framework:** Pytest (AAA pattern: Arrange, Act, Assert)
- **Browser Automation:** Playwright
- **Design Pattern:** Page Object Model (POM)
- **Report Generation:** Allure Report
## Coding Standards
1. **Modularity:** Write reusable functions in separate classes.
2. **Locators:** Use `data-testid` attributes only. Never use dynamic XPath.
3. **Error Handling:** Wrap API calls in `try-except` blocks. Log failures to console.
4. **BDD:** Write descriptive test names using Python `@pytest.mark.parametrize`.
## Testing Philosophies
1. **Positive/Negative:** Always generate tests for both success and failure scenarios.
2. **Flaky Tests:** Avoid hard-timeouts. Use `wait_for_load_state` instead.
3. **API Tests:** Validate schemas (JSON) and status codes (200, 201, 400).
## Workflow
1. Read the prompt.
2. Reference the relevant domain (UI or API).
3. Generate a Python script.
4. Include imports and main execution block.
Here is how you architect the "Loading" phase. This is where you treat the LLM as an Execution Engine, not just a chatbot.
from openai import OpenAI
# 1. Initialize Client
client = OpenAI()
# 2. Load Intelligence (The SKILLS.md logic)
def load_agent_context(file_path="skills.md"):
try:
with open(file_path, "r", encoding="utf-8") as f:
return f.read()
except FileNotFoundError:
return "Default SDET Guidelines"
# 3. The Agent Function
def generate_sdet_test_suite(feature, skills_context):
prompt = f"""
You are an SDET engineer.
<SKILLS>
{skills_context}
</SKILLS>
<TASK>
Write a Production-Ready test suite for the '{feature}' module.
Use Python, Pytest, and Playwright.
</TASK>
Output format:
- Step-by-step implementation.
- Code block containing the Python test class.
- Notes on potential edge cases.
"""
response = client.chat.completions.create(
model="gpt-4o-mini", # or gpt-4-turbo depending on budget
messages=[
{"role": "system", "content": "You are a precise Python SDET expert."},
{"role": "user", "content": prompt}
],
temperature=0.2 # Low temp = deterministic, professional output
)
return response.choices[0].message.content
# 4. Execution
skills_data = load_agent_context()
print(generate_sdet_test_suite("User Authentication", skills_data))
Why this code works:
Notice the temperature=0.2. High temperature makes AI "creative" (bad for code). We want it to follow the strict rules defined in skills.md.
This is the Elite Level insight. A static file is not enough.
skills.md file.## Debugging
- Always include Stack Trace logging.
- Format: [ERROR]: {Module} -> {Line} -> {Message}
This is "Behavior Training" without retraining the model (which is expensive and slow).
| Feature | Prompt Engineering | Skills Engineering (SKILLS.md) |
|---|---|---|
| Scope | Stateless (one-off questions) | Stateful (persistent capability) |
| Consistency | Low (AI guesses rules) | High (Rules are enforced) |
| Maintenance | High (Type โbe consistentโ constantly) | Low (Update the file once) |
| Output | Creative writing / Explanations | Structured Code / Frameworks |
| Setup Cost | Low (Just an API key) | Medium (Learn System Design) |
Soon, every software company will have a "Skills Repository."
Just as we have package.json and requirements.txt defining our dependencies, we will have skills.yaml and skills.md defining our AI capabilities. This is the shift from Developing Software to Developing AI Systems.
1. Can I use SKILLS.md with other LLMs like Claude or Gemini?
Yes. skills.md is just text. Load it into the system prompt of any LLM fine-tuned for coding.
2. Does this replace SDET humans? No. It replaces the repetitive parts of SDET work. It allows SDET engineers to focus on complex logic and test strategy while the agent handles boilerplate.
3. Is this better than using RAG (Retrieval Augmented Generation)?
RAG retrieves code snippets from your repo. SKILLS.md retrieves behavioral rules. You need both: RAG for context, SKILLS for style.
The future of AI development is not in prompting. It is in system engineering.
Don't just ask the AI to do a job; define the SKILLS.md that governs how it does that job.
You want a real SDET? Build the skills.md file that forces the AI to think, act, and code like one. That is the only way to move from "Mid" AI to "Elite" Automation.