- AI Engineering
- Posts
- Turn Expert Knowledge Into Reusable Agent Skills
Turn Expert Knowledge Into Reusable Agent Skills
... PLUS: A Better Harness Beats a Bigger Model

In today’s newsletter:
Turn Expert Knowledge Into Reusable Agent Skills
A Better Harness Beats a Bigger Model
Reading time: 5 minutes.
When an experienced teammate leaves, the company usually keeps their documents and loses their judgment. Design docs record final decisions, but they rarely capture which risks the engineer checked first or when they would reject a proposal.
Distilly is an open-source project built around this problem. It turns work conversations, review feedback, incident notes, and technical documents into a source-grounded Agent Skill.
The broader idea is trace-to-skill distillation. It converts repeated decisions into an inspectable procedure that an agent can apply later.
Documents Preserve Facts Not Judgment
A RAG system can retrieve the incident report where a senior engineer rejected an API design. The report might explain the final issue without preserving the review sequence that exposed it.
That sequence is often the useful part. An experienced reviewer might check authentication before performance, inspect input validation before naming conventions, and escalate when sensitive data crosses a boundary.
The obvious objection is that you could index every document and let an agent reconstruct the method when needed. Retrieval gives the agent relevant evidence, but every new session must infer the procedure again. Different documents may also suggest conflicting priorities.
Trace-to-skill distillation makes those priorities explicit. The resulting skill becomes procedural memory: a reusable description of how the expert approaches the task, which checks come first, and which conditions change the decision.
Separate Capability From Personality
Expertise and communication style often appear together in the same source material, but they serve different purposes.
Distilly separates them into two tracks:
Capability track. Workflows, technical standards, review criteria, decision heuristics, and lessons from previous work.
Behavior track. Expression preferences, interaction rules, and correction history.
This separation lets a team install only the work skill when personality imitation adds no value. An API-review agent can apply a former teammate’s review standards without pretending to be that person.
Distilly packages the extracted material into readable skill files. Natural-language corrections create updated versions, while previous versions remain available for rollback.
In plain terms, the team receives a procedure it can inspect and repair. The knowledge does not remain hidden inside a persona prompt or model weights.
A Skill Still Needs Evidence
A generated skill is only as reliable as the traces used to create it. Design documents and detailed review comments contain stronger evidence of engineering judgment than casual chat messages.
The technical report is direct about the current limit. Distilly demonstrates that these skill packages can be generated, but it does not prove they reproduce an expert’s decisions or improve downstream work.
A workplace distillation process therefore needs four controls:
Source permission. Teams need authority to process private conversations and internal documents.
Expert review. Someone familiar with the work should inspect the extracted rules before deployment.
Task evaluation. The skill should be tested against previous decisions or representative tasks.
Lifecycle control. Provenance, version history, rollback, and deletion must remain available.
These controls matter because a plausible procedure can still encode the wrong lesson. Processing more material can simply make that mistake more detailed.
The value of trace-to-skill distillation depends on whether the generated procedures survive testing against real decisions. That is where archived experience becomes operational knowledge.

GitHub Chatbot for Live Repository Analysis
Most teams reach for RAG when they want to chat with a GitHub repository. Index the files, embed the text, retrieve the closest chunks, and ask a model to answer from them.
That works when the question is about source code or documentation. Many questions people ask about a project are different:
Which pull requests have been waiting for review the longest?
How many issues did a contributor close last month?
Who made the most commits during the latest release?
Those answers live in GitHub’s structured records. They also change every time somebody opens an issue, merges a pull request, or pushes a commit.
A new GitHub chatbot handles those questions without building a vector index. It converts the user’s request into filters, fetches the current records through the GitHub REST API, and gives the results to GPT-4 for explanation.
Similarity Search Is Poor at Exact Questions
A vector database retrieves the chunks most similar to a question. It does not guarantee that every matching record will be returned.
That makes RAG useful for questions such as “Where is authentication implemented?” The answer probably sits inside a small number of relevant files.
Now consider “How many open authentication issues were created in August?” Answering correctly requires every issue that matches three conditions:
The issue is open.
The issue concerns authentication.
The issue was created during August.
Retrieving five semantically similar issues cannot prove that only five exist. An exact answer needs filtering and counting against GitHub’s current records.
A stored index creates another problem. The answer becomes outdated as soon as an issue changes state, a pull request is merged, or a new commit arrives.
The chatbot therefore leaves repository facts inside GitHub. Instead of copying the records into another retrieval system, it asks GitHub for the required data when the question arrives.
One Question Becomes a Tool Call
Suppose a user asks: How many open issues did Alice create after August 1?
The chatbot extracts four parameters from the sentence:
Record type: issues
State: open
Author: Alice
Date: after August 1
The record type determines which tool the chatbot selects. The remaining values become filters in the GitHub API request.
GitHub returns the matching issues. GPT-4 then reads the API response and writes an answer for the user.
The model is not expected to remember the repository or estimate the count. GPT-4 translates the user’s intent into a structured request and explains the records returned by GitHub.
That division of work keeps each component on a task it handles well. GitHub performs exact retrieval over current data. GPT-4 handles the language on either side of the API call.
Two Tools Define the Boundary
The system exposes two tools to GPT-4.
Repository Report Tool. Retrieves repository metadata, structure, and contributor information.
Commits Issues and Pull Requests Tool. Retrieves activity records using filters such as author, state, date range, and result limit.
Keyword matching and structural rules classify the question before either tool runs. A question about pending pull requests goes to the activity tool. A question about the repository owner goes to the report tool.
GitHub already exposes the endpoints and filters, so the chatbot is not creating a new analytics engine. The chatbot removes the need for users to know which endpoint accepts which parameter.
The two-tool limit also gives the system a clear reason to refuse a request. If neither tool can retrieve the required information, GPT-4 should say that the question falls outside the available capabilities.
The Chatbot Answered 65 of 66 Supported Questions
The evaluation used 80 questions covering pull requests, commits, issues, compound requests, and general repository information.
Fourteen questions required data the tools could not access. The chatbot rejected all 14 instead of producing an answer from GPT-4’s internal knowledge.
Of the 66 supported questions, the chatbot answered 65 correctly. That produced an accuracy of 98.48% on the in-scope set.
The only incorrect answer involved a date-range query. The chatbot selected the current timestamp instead of the date parameter requested by the user.
That error matters because the GitHub API can only be as accurate as the request it receives. A correct endpoint with the wrong date filter still produces the wrong answer.
Most questions took two iterations. One iteration classified the request and selected the tool. The next used the retrieved data to generate the response. Compound and failed requests sometimes needed three to five iterations.
The 98.48% Needs More Testing
The reported result comes from a small custom dataset. The researchers created 80 variations from 15 example queries, so the test does not represent every way a real user might phrase a repository question.
The prototype also covers a narrow part of GitHub. It does not yet handle code understanding, CI failures, issue sentiment, contribution trends, or analyses that require several GitHub endpoints to be joined.
Adding more tools would increase coverage, but it would also make routing harder. Each new endpoint introduces more parameters, overlapping capabilities, and failure cases.
The sensible path is to expand one question category at a time. Every category needs a defined tool, tested parameter extraction, and a clear refusal when the required data is unavailable.
We started with a common instinct: index the repository and add chat. The results show why that design should depend on the question being asked.
If the answer lives in source code, retrieval may be the right tool. If the answer is a count, status, date, or contributor record, the repository API already has the exact data. The model only needs to turn the conversation into the right query.
That’s all for today. Thank you for reading today’s edition. See you in the next issue with more AI Engineering insights.
PS: We curate this AI Engineering content for free, and your support means everything. If you find value in what you read, consider sharing it with a friend or two.
Your feedback is valuable: If there’s a topic you’re stuck on or curious about, reply to this email. We’re building this for you, and your feedback helps shape what we send.
WORK WITH US
Looking to promote your company, product, or service to 200K+ AI developers? Get in touch today by replying to this email.