Skip to content
Back to skills

Learn

ASecurity

Appends a one-line lesson to the <app> CLI's project-local .claude/learnings.jsonl and shows how to consult the prior entries before repeating similar work.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 24, 2026
developmentgo

Works with

  • cli

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add Facta-Dev/ai-coding-playbook --skill learn --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Learn?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Learn
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/facta-dev-learn/badge)](https://www.skillsdirectory.com/skills/facta-dev-learn)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: learn
description: "Appends a one-line lesson to the <app> CLI's project-local .claude/learnings.jsonl and shows how to consult the prior entries before repeating similar work."
division: core
---

# <app> Learn

A reusable workflow for capturing a durable, project-local lesson learned while working on the `<app>` CLI. An agent invokes this skill; the agent supplies the lesson, the skill supplies the append and consult procedure. The log is append-only and lives in the repository, so it must carry only non-sensitive facts.

## When to Activate

- A session surfaces a lesson worth remembering for `<app>`: a recurring pitfall, a pattern that worked, or a team preference discovered mid-task.
- A bug is traced to a root cause that would recur if unrecorded - for example an exit code changed without a version bump, or a use case that reached for `process`.
- A workaround should become the default approach next time.
- A reviewer states a preference that should persist beyond this session.

Do not activate for one-off facts with no recurrence value, and never for anything resembling a secret, a credential, a token or a customer value - the log is committed to the project and is not a secret store.

## Core Principles

- **Append-only.** `.claude/learnings.jsonl` is never rewritten or reordered; each invocation adds exactly one line at the end. Never parse-and-rewrite the prior lines.
- **Consult before you repeat.** Before starting work that resembles a past pitfall class - a contract change, a layer violation, a pipe prompt - grep the log for the relevant `kind` first.
- **Deliberately local.** The log belongs to this repository only; it does not sync to, read from, or depend on any external store, and a fresh clone starts with no entries until the first `/learn` call.
- **One lesson, one line.** A JSONL entry is a single fact, not a running narrative; three lessons are three lines.
- **Created on first use, not shipped.** The template ships no `.claude/learnings.jsonl`; the file is created by the first successful append.

## Rules

- No fabricated data: only append a lesson actually observed in this session - never invent a plausible-sounding pitfall to pad the log.
- Every claim needs a source: the `refs` array cites a real `file:line`, an exit code, an envelope version or an issue reference from this session; an empty `refs` array is acceptable only for a pure preference statement.
- No code-fenced final output where raw output is expected: report the appended line as raw text, so it is easy to copy-verify against the file.
- Append with plain `printf`, never with a JSON-mutating tool that could reformat or reorder the prior lines.
- Escape embedded double quotes in `note` before appending, or the line will not parse as valid JSON.
- Never append a password, token, key or connection string - reference the file and line where the issue lives instead.
- The `kind` is one of `pattern`, `pitfall` or `preference`, and it is what the consult step greps on.

## Research References

Provenance table - every claim in a finding needs a row.

| claim | source | year | link |
| --- | --- | --- | --- |
| JSON Lines format - one JSON value per line | jsonlines.org | 2024 | https://jsonlines.org |
| The log is project-local and is never synced anywhere | `PLAYBOOK_CLAUDE_CODE.md` | 2024 | local file |
| The learning categories used by the kit: pattern, pitfall, preference | `PLAYBOOK_CLAUDE_CODE.md` | 2024 | local file |
| The lessons referenced by `AGENTS.md` before repeating similar work | `AGENTS.md` | 2024 | local file |

## Output Format

Raw structured prose, not a code fence. The appended line is printed verbatim so the caller can copy-verify it against the file, and the consult reminder names the exact grep to run before starting work that resembles the recorded lesson:

```
### <app> learn - entry appended

File: .claude/learnings.jsonl
Line: {"ts":"<ISO-8601 UTC>","kind":"pattern|pitfall|preference","note":"<one-line lesson>","refs":["<file:line | issue# | url>"]}

Consult-first reminder: grep '"kind":"<kind>"' .claude/learnings.jsonl before
starting similar work.
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.