agentleFS
ai-erp-collabai-erp-collab/deterministic-context-routing-plugin/skills/cross-module-owner-api/SKILL.md

cross-module-owner-api

Skill0 starsChanged 4 days agoMITView on GitHub

Use when a task in the active module needs a rule owned by another module (for example access rules, a hierarchy walk, status transitions), or the user asks whether such a rule exists or says to reuse or extend another module. Finds the owner, keeps the rule behind an owner API, and links consumer and owner.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never enter another module on your own initiative.

    line 21
  2. Distinctive:

    Do this only when the owner rule is taken into work: a command, or the user decides to reuse the rule.

    line 39
  3. Very specific:

    Add a link to the owner contract page in the consumer's usage or concept page.

    line 44
  4. Very specific:

    Before writing anything into the owner module (code or knowledge), read references/owner-changes.md and follow its three steps in order:

    line 50
  5. Distinctive:

    Check: nothing owner-specific is left in the consumer.

    line 56

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

Cross-Module Owner API

The consumer module is the active module where the task started. The owner module is the module whose domain the rule belongs to. The owner API is a small public method set in the owner module that the consumer calls instead of copying the rule.

1. Mode: question or command

  • Question ("do we already have access rules for documents somewhere?"): look, report, and propose. Do not change code in the owner module.
  • Command ("look at module X and add a helper there", "reuse what X has"): you may change the owner module within the scope of the command.
  • Never enter another module on your own initiative. If the task seems to need one and the user said neither, ask.

2. Lookup order (stop at the first hit)

  1. Consumer links: the consumer's knowledge-base pages and module AGENTS.md may already link to an owner contract page.
  2. Named module: if the user named the module, go to its knowledge-base/modules/<owner>/INDEX.md.
  3. Registry: otherwise resolve the candidate owner in modules.md, then read its INDEX.md.
  4. Owner contract, usage, and table pages linked from that INDEX.md.
  5. Owner source code, only if the knowledge base lacks the fact.

Report which step produced the answer.

3. Record the link in the consumer

Do this only when the owner rule is taken into work: a command, or the user decides to reuse the rule. A plain question leaves no trace in the consumer; the user may have asked for reasons that have nothing to do with this module.

Add a link to the owner contract page in the consumer's usage or concept page. If every future task in the consumer should know it, also add one line under ## Cross-Module Links in the consumer module AGENTS.md.

4. Change, mark, and check the owner (command mode only)

Before writing anything into the owner module (code or knowledge), read references/owner-changes.md and follow its three steps in order:

  1. Change the owner: add an owner API, keep only an adapter in the consumer.
  2. Mark the owner: contract page, owner, consumer, and root session logs.
  3. Check: nothing owner-specific is left in the consumer.

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.