agentleFS
aicodekingaicodeking/deepseek-stack/skills/ds-lessons/SKILL.md

ds-lessons

Skill80 starsChanged 15 days agoMITView on GitHub

Find mistakes agents keep repeating in this repo and turn each into structure that blocks it, preferring types over lint over tests over docs, plus an end-of-session reflection. Use after a user correction, when the same fix comes up twice, at the end of a long session, or for /ds-lessons.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test: checks behavior, not internals.

    line 17
  2. Distinctive:

    Keep a table in the agent instruction file: rule, and what enforces it.

    line 21
  3. Distinctive:

    If the fix is structural, do not also add prose.

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ds-lessons

An instruction an agent can skip is a wish. Make repeated mistakes fail loudly instead.

Steps

  1. Gather mistakes. Read the current session, recent commits, reverts, review comments, agent instruction files and workaround comments. Group them into classes. A class counts once it happened twice.
  2. For each class, pick the highest level that works:
    1. Structure: one owner per piece of state, one supported way per task, hidden internals, delete old patterns an agent would copy.
    2. Types: make the bad state impossible to write.
    3. Lint or CI check: the error message names the right file, type or function to use. If the bad pattern is already common, fail only on new additions.
    4. Test: checks behavior, not internals.
    5. Docs or agent rules: only for judgment calls that cannot be checked. Add a short example of the failure.
  3. Fix the most frequent classes now, one commit each.
  4. Prove each new check. Re-introduce a real past mistake, run the check, and show it fails. Then remove it and show it passes.
  5. Keep a table in the agent instruction file: rule, and what enforces it. If a rule already existed but nothing enforced it, treat it as a repeat and enforce it now.
  6. End-of-session reflection: list what went wrong, what took extra loops and what the user corrected. Route each item to a check, a skill edit or a rule. Drop one-off issues.

Stop when

  • Each chosen class has an enforcement that you showed failing on a real mistake.
  • Or you have handled the top three classes this session. Note the rest.

Rules

  • If the fix is structural, do not also add prose. The prose was the symptom.
  • Report each class with evidence, the level chosen, and why a higher level did not work.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.