Skills, proven in the wild — not declared on paper.
A living skills endpoint that evolves through agent conversations. Unlike static documentation, skills emerge organically from question patterns and improve over time.
Why living skills beats static skills.md
Traditional documentation is written once and becomes outdated. RealSkills takes a different approach:
Think of it as a knowledge base that learns from every interaction.
The question → skill inference loop
Agent POSTs question
↓
┌─────────────────────────────┐
│ /skills endpoint │
│ - Embed question │
│ - Check similarity cache │
│ - RAG from stored Q&A │
│ - Generate response (LLM) │
│ - Store question + answer │
│ - Update skill graph │
└─────────────────────────────┘
↓
Return skill guidance (markdown)
↓
Skill graph evolves in real-timeGET and POST endpoints
Returns the skill summary as markdown. Triggers lazy seeding on first access.
curl https://tpmjs.com/ajaxdavis/collections/my-tools/skillsSubmit a question and receive an AI-generated response based on the collection's tools and previous Q&A.
curl -X POST https://tpmjs.com/ajaxdavis/collections/my-tools/skills \
-H "Content-Type: application/json" \
-d '{
"question": "How do I handle errors with these tools?",
"agentName": "my-agent",
"tags": ["error-handling"]
}'POST request body format
interface SkillsRequest {
// Required: The question to ask (5-2000 characters)
question: string;
// Optional: Session ID for multi-turn conversations
sessionId?: string;
// Optional: Self-reported agent identity
agentName?: string;
// Optional: Additional context (max 2000 chars)
context?: string;
// Optional: Hint tags to guide response (max 10)
tags?: string[];
}To continue a conversation, include the sessionId from a previous response. Sessions maintain context for up to 24 hours and include the last 20 messages.
Successful response format
interface SkillsResponse {
success: boolean;
data: {
// Markdown-formatted response
answer: string;
// Confidence score (0-1)
confidence: number;
// Number of similar questions used for RAG
basedOn: number;
// Skills this question relates to
skillsIdentified: string[];
// Session ID for continuing conversation
sessionId?: string;
// Suggested follow-up questions
suggestedFollowups?: string[];
};
meta: {
// Whether response was from cache
cached: boolean;
// ID of stored question
questionId: string;
// Processing time in milliseconds
processingMs: number;
};
}{
"success": true,
"data": {
"answer": "To handle errors with these tools...",
"confidence": 0.85,
"basedOn": 3,
"skillsIdentified": ["error-handling", "try-catch-patterns"],
"sessionId": "sess_abc123",
"suggestedFollowups": [
"What are the retry patterns?",
"How do I log errors?"
]
},
"meta": {
"cached": false,
"questionId": "clx123abc456",
"processingMs": 1234
}
}How agents should use the Skills API
When an agent first encounters a collection, fetch the skills summary:
const response = await fetch(`${baseUrl}/${username}/collections/${slug}/skills`);
const skillsMarkdown = await response.text();
// Parse or display the markdown summaryWhen the agent needs guidance on using the tools:
const response = await fetch(`${baseUrl}/${username}/collections/${slug}/skills`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
question: "How do I parse JSON responses from the API?",
agentName: "my-automation-agent",
tags: ["json", "parsing"]
})
});
const { data } = await response.json();
console.log(data.answer); // Use this guidanceFor follow-up questions, use the session ID:
// First question
const first = await askSkills("How do I handle pagination?");
const sessionId = first.data.sessionId;
// Follow-up (maintains context)
const followUp = await askSkills(
"Can you show me an example with async iteration?",
{ sessionId }
);Effective questioning patterns
context fieldHow confidence is calculated
Each response includes a confidence score (0-1) based on:
>0.8 — High confidence, well-supported by prior Q&A0.5-0.8 — Moderate confidence, some relevant context<0.5 — Lower confidence, limited prior knowledgeAutomatic bootstrapping on first access
When a collection's skills endpoint is accessed for the first time, it automatically seeds with synthetic questions generated from:
This ensures the endpoint is useful immediately, even before any real agent interactions. Seeding typically adds 10-15 synthetic Q&A pairs.
If seeding is in progress when you make a request, you'll receive a 202 response:
{
"success": true,
"data": {
"status": "seeding",
"message": "Skills are being generated. Please retry in a few seconds."
}
}How similar questions are cached
Questions with >95% similarity to existing questions return cached answers instantly. This provides:
The meta.cached field indicates whether a cached response was used. Cached responses increment a similarCount counter for analytics.
Continue exploring TPMJS
Automated testing for tool collections
Create and manage tool collections
Build AI agents with your collections
Discover tools to add to your collections