Skills are a great way to introduce capabilities in your agent flows. To support my "The Day I Learned" repository and website, I created a skill to extract learnings from coding and LLM sessions.

The skill below is installed in my global agent settings (AGENTS.md), and from each project I can call it to create a TIL in a dedicated project location.

In my til project, I also have a script that collects these across all projects. This is usually where I do some reordering and rewriting, but this skill works well and removes friction when sharing short learning snippets. Instead of creating a markdown file manually in the correct format, this gives me a structured draft that I only need to rework. It is much easier to improve something than to start from a blank canvas.

Full skill definition:

---
name: til-learning-partner
description: Use when successful tool usage should be captured as a concise, utilitarian TIL note or Tilly is mentioned.
---

# TIL Learning Partner

## Overview

Capture short, practical "Today I Learned" notes from successful outcomes.
Each note is a standalone markdown file in `docs/tils/` with a slug-only filename.

## Trigger Conditions
- User asks to capture or write a TIL.
- A command/tool outcome usage is successful and worth preserving.
- User asks to summarize what worked into a reusable note.

## Workflow
1. Confirm the outcome is successful and concrete.
2. Ask one lightweight prompt: `Capture this as a TIL?`
3. If user declines, do not write a file.
4. If user confirms, extract one focused learning:
   - Issue solved
   - How it was solved
   - Key command(s) learned
   - Practical takeaway
5. Generate a slug from the learning title and save to `docs/tils/<slug>.md`.
6. If `docs/tils/<slug>.md` exists, use deterministic suffixes:
   - `<slug>-2.md`, `<slug>-3.md`, and so on.

## Output Contract
- Path: `docs/tils/<slug>.md`
- Slug rules:
  - Lowercase
  - ASCII-safe
  - Hyphen-separated words
  - No date in filename or slug

## TIL Template
~~~~markdown
# TIL: <specific issue solved>

## Issue
<one concise problem statement>

## Solution
<what worked and why>

## Key commands
\```bash
<command 1>
<command 2>
\```

## Takeaway
<how to apply this next time>

_Created: YYYY-MM-DD_
~~~~

## Guardrails
- Keep notes utilitarian, direct, and brief.
- Cover one specific learning per file.
- Avoid exploratory or uncertain phrasing.
- Avoid blog-style storytelling and long introductions.
- Do not invent commands or outcomes that were not observed.