agentleFS
917Dhj917Dhj/dkitchen/skills/build-repo/SKILL.md

build-repo

Skill10 starsChanged 8 days agoMITView on GitHub

Build or change the code rules and checks of a dkitchen kitchen in this repo — the areas code goes in, changing modules in place, reuse, and the ding check gates in CI. Use when the user asks to set up repo rules, add or change a check, or stop the repo from filling up with copies.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. microsoft/TypeScript-Maintainer-Skills★ 4same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository10 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Follow Installing for the prerequisites, language, rendering, updating in place, pointer blocks, and approval.

    line 12
  2. Very specific:

    Layout: every top-level folder and file.

    line 24
  3. Very specific:

    D. Reuse: Ask which library module holds each shared component, such as durable writes, progress bars, or model clients, so code.md can …

    line 47
  4. Very specific:

    When the repo already had [check], the change is a guard change: the commit carries Guard-change: #<ticket> <reason>.

    line 69
  5. Distinctive:

    Run the checks in Installing, then:

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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

Build the repo rules

Install the rules that keep the repo from filling up with copies: docs/agents/code.md from kitchen/repo/, its pointer line, the [check] table in .dkitchen.toml, the Ruff and import-linter settings in pyproject.toml, and a CI workflow that runs ding check and the tests on every PR. An executor is a fresh session every time; when it cannot find the module to change, it writes a new copy. These rules make changing the module in place the only path that passes, from the first PR.

The checks are preventive: they hold from the first PR, with no baseline and no exception list. Layout rules look only at what a PR adds, so existing files never turn CI red. Ruff and the import contracts look at the whole tree, so the existing violations they find are cleaned up first, in a ticket of their own, before those checks are switched on.

Follow Installing for the prerequisites, language, rendering, updating in place, pointer blocks, and approval. When /setup-dkitchen brought you here, the prerequisites and the language are already settled: skip them. The checks themselves are ding check and ding map (docs/ding.md).

Sources

  • Template: kitchen/repo/code.md.
  • Reference files: templates/ in this skill: the CI workflow and the pyproject.toml tables. Each starts with a comment listing what to adapt.

1. Explore

  • The team: docs/agents/roles.md and docs/agents/reviewing.md must exist, since the guard-change rule relies on the PR reviewer. When they are missing, stop and offer build-team first.
  • Python: the reference checks need a Python repo (pyproject.toml, setup.py, or Python packages). For another language, install only code.md and the layout checks ([check] with ruff = false and imports = false), and tell the user that lint and import contracts need their language's own tools.
  • Installed rules: docs/agents/code.md, [check] and [merge] in .dkitchen.toml, [tool.ruff] and [tool.importlinter] in pyproject.toml, and .github/workflows/, read in full when present.
  • Layout: every top-level folder and file; where the packages live (a flat or a src/ layout); test files and where they sit; output folders and whether .gitignore covers them; third-party code and submodules.
  • Commands: how the repo installs and runs its tests, and the Python version it targets.
  • Existing violations, counted without changing anything:
    • ruff check --select F,E9,B006,B008,B011,B012,B018,B023,PGH004 . and ruff format --check .;
    • lint-imports --config <a scratch file> with the contract drafted in section B;
    • the layout rules on files already in the repo: version copies (_v2), ticket numbers in paths, code in docs, misplaced tests. These never fail a PR, but a cleanup ticket can clear them.

Done when every top-level folder has a proposed area, and you can name the test command, the Python version, and the count of each kind of existing violation.

2. Present the findings

Summarize the layout, the proposed areas, and the existing violations by kind, with a few examples of each.

3. Settle each section

One section, one answer, then the next. Lead each with your recommendation.

A. Areas. Show each top-level folder with its proposed area, as a table: library, tools, experiments, tests, docs, outputs, assets, or vendor. Every folder gets one; there is no "other". A folder whose contents are mixed goes to the area most of it belongs to, and the rest becomes part of the cleanup. List the top-level files the usual names do not cover (the usual names); each one is either listed in root_files or moved.

B. Import contract. Recommend one forbidden contract: the library packages import no experiment, tool, test, or doc packages. Offer more layers only when the library already has a clear one, such as a core package the rest builds on.

C. Existing violations. For each check with violations, recommend one of two paths: fix them in this run when they are few and mechanical, such as a one-time ruff format; otherwise switch that check off (ruff = false or imports = false) and open a cleanup ticket with write-ticket, which switches it on when it lands. Never write an exception list.

D. Reuse. Ask which library module holds each shared component, such as durable writes, progress bars, or model clients, so code.md can point executors at it.

E. CI. Propose the Python version, the install command, and the test command for the workflow, and the [merge] required_checks entries: checks and tests.

Done when every section has an answer.

4. Draft and confirm

Show the user:

  • the full text of docs/agents/code.md (a diff when updating), and the new pointer blocks;
  • [check] and [merge] required_checks for .dkitchen.toml;
  • the pyproject.toml tables, adapted from the reference, and ruff and import-linter added to the dev dependencies;
  • the CI workflow, adapted from the reference, as .github/workflows/dkitchen.yml;
  • the fixes made in this run, and the GitHub change by name: each cleanup ticket.

Done when the user approves the draft, including each cleanup ticket.

5. Write

Render with --templates repo, as Installing says, then fill and translate. Rewrite both pointer blocks from what render.py prints. Write the settings, the pyproject.toml tables, and the workflow; make the approved fixes; open the cleanup tickets.

When the repo already had [check], the change is a guard change: the commit carries Guard-change: #<ticket> <reason>.

Done when every approved file exists with its approved content and every cleanup ticket is open.

6. Verify

Run the checks in Installing, then:

  • ding check --base HEAD passes on the working tree, with the switches as approved.
  • ding map lists the library modules.
  • A scratch file <library>/scratch_v2.py makes ding check --base HEAD fail with version-copy; delete it afterwards.

Done when every check passes, or the user has been told exactly which one fails and why.

7. Hand over

Tell the user, briefly: every PR now runs checks and tests, and a merge needs both; executors run ding check before handing over; ding map finds the module to change; a change to a check carries a Guard-change: trailer; and a lesson that keeps coming back can become a check of its own, a script listed in [check] commands.

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.