agentsclimarketplace

Michat context aware tool design

Skill filmicgaze/MiChat-desktop/.codex/skills/michat-context-aware-tool-design

Windows desktop chat client for profile-based agents with gated local tools and skills.

Install
npx -y skills add filmicgaze/MiChat-desktop --skill michat-context-aware-tool-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Design or revise MiChat toolsets/tools for unambiguous contracts, strict scope gating, and context-efficient outputs. Use when adding new toolsets/tools, changing tool schemas/outputs, debugging tool misuse or context bloat, or refactoring toolset boundaries.

SKILL.md

5.0 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it

MiChat Tool Design (Context-Aware)

MiChat tools are contracts for a non-deterministic caller. Constrain capability and scope, not reasoning.

Core principles

  1. Profiles are worlds
    Treat tool availability as profile-scoped. Only expose tools from enabled toolsets (plus always-on core/scratchpad).

  2. Bounded capability
    Give every tool a hard blast radius (root folder, allow-list, API scope). Prefer "unavailable unless configured" to "available but be careful."

  3. Navigate before ingest
    Design tools so the agent can target information before pulling large text into context (search -> section -> slice, cursor/pagination, stable IDs).

  4. Context-safe by default
    Default outputs to minimum sufficient structure: IDs, counts, short snippets, and navigation hints. Avoid dumping large artifacts by default.

  5. Workspace for large artifacts
    When full text is needed for editing/review, route it to a workspace surface (scratchpad) and return a stub + metadata to the model.

  6. Verbosity is explicit
    When outputs can be large, add explicit controls:

    • format: "concise" | "detailed" (or "summary" | "full")
    • fields: request subsets when helpful
    • max_chars / max_items + cursor/start for continuation
      Default to the smallest practically useful payload; require explicit opt-in for full or high-volume outputs.
  7. Schema stability (tool arguments)
    Never define an argument as type: object with empty/no properties. Provide at least a minimal property set, even if you allow extra keys via additionalProperties, or the field may be dropped from model-visible schemas.

  8. Errors must enable recovery
    Make errors actionable: what was invalid/missing, expected format, and whether retrying helps (rate limits, transient errors). Avoid generic failures.

Tool description template (MiChat style)

Tool descriptions are contracts, not mini-skills. Keep them clear and functional; put workflow and judgment in skills.

A good description answers:

  • What it does (specific, non-vague)
  • When to use it (trigger conditions)
  • Inputs (what they control; defaults)
  • Outputs (shape; what format/verbosity changes; truncation behavior)
  • Errors (names + recovery hints)
  • Safety boundary (scope gate; what it cannot do)

Keep descriptions short and information-dense. If guidance applies to multiple tools, put it in a skill. Avoid overlapping tool purposes.

Toolset design (toolsets + primitives + skills)

Keep each toolset coherent with a clear domain and blast radius. Keep tools as primitives with non-overlapping contracts; use skills to teach sequencing and judgment.

Consolidate only when it removes real ambiguity:

  • If a human cannot confidently pick between two tools, the agent will not either.
  • If a split workflow is repeatedly misused, bundle it into a clearer primitive.

Prefer pipelines of distinct intent (e.g., parse -> search -> commit). Avoid near-duplicate tools that differ only by naming or subtle behavior. Toolsets must not import other toolsets; resolve dependencies at runtime via get_toolset_module.

Toolset docs

When adding or modifying a toolset, ensure toolsets/<toolset_id>/TOOLSET.md exists and is updated to the canonical format.

Output policy (model vs transcript vs workspace)

When outputs can be large, prefer a three-channel model:

A) Model payload (default)

  • concise, structured, navigational
  • stable IDs and "where to zoom next"

B) Transcript/details payload (optional)

  • human-readable audit
  • still bounded

C) Workspace payload (when needed)

  • full artifact in scratchpad (or other UI)
  • tool returns a stub/receipt to the model

Use this pattern for long docs, large lists, and heavyweight state inspection.

Hard caps (robustness)

If output could be large enough to swamp context or UI, implement hard caps with truncation + continuation. Prefer:

  • truncated=true + cursor/start token
  • clear guidance on how to continue

Naming and conventions

  • Tool names: verb_noun, consistent across toolsets
  • Parameters: consistent names (path, query, top_k, max_chars, format)
  • Return fields: consistent keys (items, count, next_cursor, truncated, summary)
  • Avoid cryptic abbreviations

Testing / verification (smoke test)

For each new or changed tool, do:

  • 1-2 happy-path calls
  • 1 failure case (missing gate / invalid input)
  • 1 large-output case (confirm truncation / format controls)
  • check unintended exposure for profiles that do not enable it

Anti-patterns to avoid

  • Dumping full objects into model context by default
  • Overlapping tools with unclear choice
  • Side effects at import time (toolsets should be definition-only on import)
  • "Safety" implemented as reasoning constraints instead of capability scoping
  • Silent destructive edits (writes without clear intent / preview)

What ships with it: 1 file

274 B alongside SKILL.md

agents/

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.