Skip to content

Agent Skills


AgentForceAgent Auto-Loading Behavior Enhancement

Agent Skills are specialized behavior definitions that automatically extend the system prompt of an AgentForceAgent. Skills are loaded from markdown files and provide reusable, modular capabilities that define how an agent behaves in specific roles or domains.

Skills are configured in the AgentConfig when creating an agent instance:

import { AgentForceAgent, type AgentConfig } from "@agentforce/adk";
const agentConfig: AgentConfig = {
name: "ProductOwnerAgent",
skills: ["product-owner"] // Skill names without file extension
};
Parameter
Type
Default
Description
skills
string[]
undefined
Array of skill names that will be loaded from .md files in the skills directory
  1. Configuration: Skills are specified in the AgentConfig.skills array
  2. File Resolution: Each skill name resolves to ./skills/[skillName].md
  3. Auto-Loading: Skills are automatically loaded when the agent executes
  4. System Prompt Extension: Skill content is appended to the system prompt under a “Loaded Skills” section
// Default skill directory structure
project/
├── skills/
│ ├── product-owner.md
│ ├── data-analyst.md
│ └── code-reviewer.md
├── src/
│ └── agent.ts
└── package.json
import { AgentForceAgent, type AgentConfig } from "@agentforce/adk";
const agentConfig: AgentConfig = {
name: "ProductOwnerAgent",
skills: ["product-owner"]
};
const output = await new AgentForceAgent(agentConfig)
.useLLM("ollama", "gemma3:4b")
.systemPrompt("You are a Product Owner in an Agile environment.")
.prompt("What are the key features of the Product Owner role in Agile?")
.getResponse();
console.log(output);

Define specific professional roles and expertise areas:

// skills/product-owner.md contains:
// - Backlog management expertise
// - Story definition capabilities
// - Sprint planning knowledge
// - Agile methodology mastery
const productOwner = new AgentForceAgent({
name: "ProductOwnerAgent",
skills: ["product-owner"]
})
.systemPrompt("You are an experienced Product Owner.")
.useLLM("ollama", "gemma3:4b");
const userStories = await productOwner
.prompt("Create user stories for a e-commerce checkout feature")
.output("md");

Create skill files in the ./skills/ directory with clear, structured content:

# Frontend Developer Skills Matrix
## Core Competencies
### **React Development**
- Component design and lifecycle management
- State management with Redux/Context API
- Performance optimization techniques
- Testing with Jest and React Testing Library
### **Modern JavaScript/TypeScript**
- ES6+ features and best practices
- TypeScript type safety and generics
- Async/await and Promise handling
- Module systems and bundling
### **CSS/Styling**
- CSS Grid and Flexbox layouts
- Responsive design principles
- CSS-in-JS solutions (styled-components, emotion)
- Design system implementation
### **Performance Optimization**
- Bundle size optimization
- Code splitting and lazy loading
- Image optimization and caching
- Web Vitals and performance metrics
## Development Practices
### **Code Quality**
- Writing clean, maintainable code
- Following established coding standards
- Implementing proper error handling
- Creating comprehensive documentation
### **Testing Strategy**
- Unit testing with Jest
- Integration testing approaches
- End-to-end testing with Cypress/Playwright
- Test-driven development (TDD)
## Key Responsibilities
- Build responsive, accessible web applications
- Collaborate with designers and backend developers
- Optimize application performance and user experience
- Maintain code quality through reviews and testing
- Stay current with frontend technology trends

Domain Expertise

Focus Areas: Define clear competencies, methodologies, and best practices

Content: Include processes, frameworks, and domain-specific knowledge

Actionable Guidelines

Structure: Organize with clear sections and bullet points

Format: Use markdown formatting for readability and structure

Professional Standards

Quality: Define quality standards and validation criteria

Ethics: Include professional principles and ethical guidelines

Practical Application

Examples: Provide concrete examples and use cases

Templates: Include frameworks and templates for common tasks

You can configure a custom skills directory using environment variables:

Terminal window
# .env file
AGENTFORCE_SKILLS_PATH=./assets/skills
// Will load from ./assets/skills/product-owner.md
const agent = new AgentForceAgent({
name: "CustomAgent",
skills: ["product-owner"]
});

Use the AgentForce CLI to create a basic skills directory:

Terminal window
# Create skills directory with default AgentForce skills
bun init-skills
# This creates:
# ./skills/
# ├── product-owner.md
# ├── data-analyst.md
# ├── code-reviewer.md
# └── technical-writer.md
const createAgent = (userRole: string) => {
const skillMap = {
'developer': ['code-reviewer', 'technical-writer'],
'manager': ['product-owner', 'project-manager'],
'analyst': ['data-analyst', 'business-analyst']
};
return new AgentForceAgent({
name: `${userRole}Agent`,
skills: skillMap[userRole] || []
})
.useLLM("ollama", "gemma3:4b")
.systemPrompt(`You are a ${userRole} with specialized expertise.`);
};
const developerAgent = createAgent('developer');
const managerAgent = createAgent('manager');
interface AgentProfile {
role: string;
expertise: string[];
tools: string[];
}
const createSpecializedAgent = (profile: AgentProfile) => {
return new AgentForceAgent({
name: `${profile.role}Agent`,
skills: profile.expertise,
tools: profile.tools
})
.systemPrompt(`You are a ${profile.role} specialist.`)
.useLLM("openrouter", "moonshotai/kimi-k2");
};
const fullStackProfile: AgentProfile = {
role: "FullStackDeveloper",
expertise: ["frontend-developer", "backend-developer", "devops-engineer"],
tools: ["fs_read_file", "fs_write_file", "os_exec"]
};
const fullStackAgent = createSpecializedAgent(fullStackProfile);

AgentForce ADK includes several pre-built skills:

(More Comming Soon)

Skill
Domain
Description
product-owner
Agile/Scrum
Backlog management, story creation, sprint planning, stakeholder communication
// Missing skill files result in "skillsContent":"none" in logs
const agent = new AgentForceAgent({
name: "SafeAgent",
skills: ["nonexistent-skill", "product-owner"] // Skills may not exist
})
.systemPrompt("Base prompt")
.prompt("Execute task");
// Agent will:
// 1. Attempt to load skills
// 2. Set skillsContent to "none" if skills cannot be loaded
// 3. Continue execution normally with base system prompt
const response = await agent.getResponse();

Debug Log Output:

{
"msg": "Run execute",
"agent": "SafeAgent",
"provider": "ollama",
"model": "gemma3:4b",
"systemPrompt": "Base prompt",
"skillsContent": "none",
"template": "none",
"userPrompt": "Execute task"
}

When skills are successfully loaded, the log will show the actual content:

{
"msg": "Run execute",
"agent": "ProductOwnerAgent",
"provider": "ollama",
"model": "gemma3:4b",
"systemPrompt": "You are a Product Owner in an Agile environment.",
"skillsContent": "## Product Owner Skills Matrix\n\nThis document outlines...",
"template": "none",
"userPrompt": "What are the key features of the Product Owner role?"
}

To debug skill loading issues:

  1. Check skillsContent in logs - "none" indicates skills weren’t loaded
  2. Verify file paths - Ensure skill files exist at specified locations
  3. Check permissions - Ensure files are readable
  4. Use .debug() - Enable debug logging to see detailed execution info
const agent = new AgentForceAgent({
name: "DebugAgent",
skills: ["product-owner"]
})
.debug() // Enable debug logging
.systemPrompt("Base prompt")
.prompt("Test");
// Check the debug output for skillsContent value
const response = await agent.getResponse();

Role-Based Agents

Skills: Professional expertise and domain knowledge

Best for: Specialized consulting, expert advisory, role-specific tasks

Multi-Disciplinary Teams

Skills: Cross-functional capabilities and collaboration patterns

Best for: Complex projects requiring diverse expertise

Industry Specialists

Skills: Industry-specific knowledge and regulatory compliance

Best for: Healthcare, finance, legal, or other regulated domains

Process Automation

Skills: Standardized workflows and quality assurance

Best for: Repeatable processes, compliance checks, automated reviews

# Clear Structure
## Core Competencies
### Specific Areas
- Detailed capabilities
- Methods and approaches
- Quality standards
## Key Responsibilities
- Actionable deliverables
- Success criteria
- Process guidelines
## Professional Standards
- Ethics and principles
- Collaboration patterns
- Communication guidelines
// Too generic
skills: ["helper"] // What kind of help?
// Overlapping responsibilities
skills: ["developer", "coder", "programmer"] // Redundant
// Missing context
skills: ["analyst"] // What type of analysis?
// Too narrow
skills: ["react-button-expert"] // Too specific