agentleFS
shubhshashubhsha/ai-engineer-2030/.claude/skills/add-module/SKILL.md

add-module

Skill0 starsChanged 34 days agoMITView on GitHub

Add or extend a module for one of the book's chapters, with tests, in this repository's conventions. Use when creating a file under src/ai_engineer or adding a public function that a chapter will print.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read two existing modules in the same package and their tests, and match them.

    line 11
  2. Very specific:

    Create or extend src/ai_engineer/<package>/<module>.py:

    line 13
  3. Very specific:

    Write the tests beside the code, in the test folder for that part of the book: tests/foundations/ (Volume I), tests/ml/ (Volume II), …

    line 19
  4. Very specific:

    If the chapter will print only part of a function or test, wrap that part in # region kebab-name and # endregion.

    line 25
  5. Very specific:

    Run make check and fix every finding.

    line 27

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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

Add a module for a chapter

The request: $ARGUMENTS (for example rag/rerank 29).

  1. Read two existing modules in the same package and their tests, and match them. Read .claude/rules/src.md and .claude/rules/tests.md.
  2. Create or extend src/ai_engineer/<package>/<module>.py:
    • The docstring's first line is Chapter N: <what it does>.
    • from __future__ import annotations follows the docstring.
    • Time, sleep, randomness, models and storage come in as parameters, with the real implementation as the default. Nothing touches the network or the disk at import time.
  3. Write the tests beside the code, in the test folder for that part of the book: tests/foundations/ (Volume I), tests/ml/ (Volume II), tests/agentic/ (Volume III), or a new folder named after the package for later volumes. Pin examples with the arithmetic in a comment, state properties with Hypothesis where a law exists, and use fakes rather than mocks.
  4. If the chapter will print only part of a function or test, wrap that part in # region kebab-name and # endregion.
  5. Run make check and fix every finding. Never weaken an assertion to make a test pass; if a test is wrong, say why.
  6. Finish with a short report: the public names you added, since the book may quote them, and what each new test pins down.

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.