agentleFS
MK27MKMK27MK/no-bs-skills/skills/add-didactic-comments/SKILL.md

add-didactic-comments

Skill13 starsChanged 51 days agoMITView on GitHub

Comment tagged files so the user learns the APIs they are studying, with a doc link in every comment.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If that list is empty, go ahead with the skill.

    line 15
  2. Distinctive:

    If it is not empty, stop.

    line 16
  3. Very specific:

    IF topics is empty, THEN infer them from the imports of the tagged files, and say which ones you picked.

    line 32
  4. Distinctive:

    IF a folder is tagged, THEN comment every source file under it.

    line 33
  5. Distinctive:

    IF the anchor does not exist, THEN link the closest page that does and drop the anchor.

    line 38
  6. Distinctive:

    Never edit code, names, or order.

    line 51
  7. Very specific:

    Never delete a comment. Rewrite one only if it starts with AI and it is wrong.

    line 52
  8. Distinctive:

    No temporal anchors, no change narration.

    line 53
  9. Very specific:

    No comment restates the line.

    line 54

≈ “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

Unstaged work

Files with unstaged changes, tracked and untracked:

!git status --porcelain --untracked-files=all | grep -E '^.[^ ]' || true

  • If that list is empty, go ahead with the skill.
  • If it is not empty, stop.

Reply with exactly this line and nothing else, no file list, no explanation, no preamble:

Stopping - unstaged files detected. Stage them and then invoke this skill again.

Add didactic comments

The user tagged files and folders and named the topics they want to learn. Teach those topics inside those files. Change nothing but comments.

  • Comment every call that belongs to topics. Skip the rest of the code: plain python, obvious assignments, imports.
  • One comment per call, on the line above it.
  • Say what the call does here, on this data. Not what the API does in general.
  • End the comment with the doc URL of the exact symbol you commented, deep link included: pandas.DataFrame.groupby, not pandas.
  • IF topics is empty, THEN infer them from the imports of the tagged files, and say which ones you picked.
  • IF a folder is tagged, THEN comment every source file under it.

Links

  • Get the URL from the docs, never from memory. Fetch the page, confirm the anchor names the symbol, then paste the URL.
  • IF the anchor does not exist, THEN link the closest page that does and drop the anchor. Never invent a fragment.
  • Same symbol used twice in a file: link it once, at the first use.

Format

# {what this call does to this data}, {the argument that matters and why}
# https://{deep link to the symbol}
frame_by_year = sales.groupby("year")

Rules

  • Never edit code, names, or order. Comments only.
  • Never delete a comment. Rewrite one only if it starts with AI and it is wrong.
  • No temporal anchors, no change narration.
  • No comment restates the line. # read the file above path.read_text() is noise; explain the encoding, the failure mode, the return type.

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.