A3S CodeExamples
Skills
Built-in and custom skill system
Skills
Skills are reusable prompt templates that augment the agent's system prompt with specialized instructions. A3S Code ships with 7 built-in skills and supports custom skills via Markdown files.
Built-in Skills
Prop
Type
Enable Built-in Skills
const session = agent.session('/my-project', {
permissive: true,
builtinSkills: true,
});
const result = await session.send('Review the auth module for security issues');
console.log(result.text);Run: npx ts-node examples/test_custom_skills_agents.ts
Source: sdk/node/examples/test_custom_skills_agents.ts
session = agent.session("/my-project",
permissive=True,
builtin_skills=True,
)
result = session.send("Review the auth module for security issues")
print(result.text)Run: python examples/test_custom_skills_agents.py
Source: sdk/python/examples/test_custom_skills_agents.py
Custom Skills
Create a Markdown file with YAML frontmatter:
---
name: api-docs
description: Generate OpenAPI documentation from code
triggers:
- "generate docs"
- "document api"
- "openapi"
---
When asked to generate API documentation:
1. Read all handler files to understand the API surface
2. Extract route definitions, parameters, and response types
3. Generate OpenAPI 3.0 YAML format
4. Write to docs/openapi.yamlThen load it:
const session = agent.session('/my-project', {
permissive: true,
skillDirs: ['/my-project/.a3s/skills'],
});
const result = await session.send('Generate OpenAPI docs for the REST API');
console.log(result.text);session = agent.session("/my-project",
permissive=True,
skill_dirs=["/my-project/.a3s/skills"],
)
result = session.send("Generate OpenAPI docs for the REST API")
print(result.text)Skills + Planning
Combine skills with planning for complex multi-step tasks:
const session = agent.session('/my-project', {
permissive: true,
builtinSkills: true,
planning: true,
goalTracking: true,
});
const result = await session.send(
'Review the entire codebase, find all bugs, fix them, and write a report'
);session = agent.session("/my-project",
permissive=True,
builtin_skills=True,
planning=True,
goal_tracking=True,
)
result = session.send(
"Review the entire codebase, find all bugs, fix them, and write a report"
)For full skills documentation, see Skills.
API Reference
SessionOptions
Prop
Type
Skill frontmatter fields
Prop
Type
Built-in skills
Prop
Type