agentleFS
aaziraniaazirani/flutter_agentify/.agents/skills/delegate-to-agent/SKILL.md

delegate-to-agent

Skill0 starsChanged 4 days agoMITView on GitHub

Where judgment work goes. Summarizing, classifying and drafting are done by the assistant in the chat, using actions to read and write, while actions stay deterministic and no model is called outside lib/ai/. Use when a feature seems to need the app to think, write text or decide something.

1 other project uses 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. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    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:

    Don't load this for writing an ordinary deterministic action.

    line 8
  2. Very specific:

    No model call anywhere outside lib/ai/.

    line 15
  3. Very specific:

    No automated check exists for this rule.

    line 17
  4. Very specific:

    Test the flow without a real model using ScriptedProvider in test/ai/assistant_flow_test.dart: script the tool calls the model would make, …

    line 33
  5. Very specific:

    No automated check. Search for stray model calls: grep -rn "http" lib/ and confirm none outside lib/ai/ reach a model.

    line 45

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

Delegate to the agent

Don't load this for writing an ordinary deterministic action; see actions.

Rule

  • Work that needs judgment (summarize, classify, draft, rewrite, suggest) is done by the assistant in the chat.
  • It uses actions to read the data and to write the result.
  • Actions are deterministic: same input, same effect, no model call inside.
  • No model call anywhere outside lib/ai/.

No automated check exists for this rule. It is held by review and by the layer rules (domain_layer_boundaries keeps lib/domain/ free of Flutter and data/), which do not stop a stray HTTP call to a model.

Why

A model call inside an action makes it slow, costly, flaky and impossible to test, and it hides a second model from the person's model setup, key and approval flow. In the chat the person sees the work, can correct it, and the app only writes through actions with receipts.

How

Say the feature as two steps: the assistant reads, thinks, then writes.

  • "Summarize my items": the assistant calls list_items (lib/domain/actions/items_actions.dart), writes the summary in its answer. No new action.
  • "Give each item a better title": it reads with list_items, then calls update_item for each. If it needs many writes, a bulk action may be right, with approval; see approval-and-safety.
  • "Draft a description": it proposes text; the person agrees, then it calls update_item.

What you add is the plumbing the assistant needs: a read action that returns the data with ids, a write action that accepts the result, and a screen-context entry (app-context). Then tell the assistant about the capability in assets/assistant/instructions.md, the app's own instructions that lib/ai/assistant_providers.dart loads into the session (appInstructions). The model, key and provider come from the person's settings there; features never choose them.

Test the flow without a real model using ScriptedProvider in test/ai/assistant_flow_test.dart: script the tool calls the model would make, and assert the stored result.

Anti-patterns

  • An action named summarize_items or suggest_title that calls a model.
  • A repository, screen or provider calling a model API directly.
  • An action that produces text "by rule" and pretends to be judgment (keyword matching to classify).
  • Putting a key in an action to reach a model.
  • Hiding the work: the assistant writes without the person seeing a receipt.

Verification

  • No automated check. Search for stray model calls: grep -rn "http" lib/ and confirm none outside lib/ai/ reach a model.
  • flutter test test/ai/assistant_flow_test.dart for the scripted flow.
  • tool/check.sh ends with All checks passed.

Related skills

  • actions — the read and write actions the assistant uses.
  • app-context — what the assistant can see while it works.
  • approval-and-safety — approval for bulk writes the assistant makes.
  • adding-a-feature — the checklist for the plumbing.
  • customizing-the-assistant — where the assistant's instructions live.
  • model-providers — which model does the judgment 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.