michat-skill-implementation
npx machina-cli add skill filmicgaze/MiChat-desktop/michat-skill-implementation --openclawArchitecture assumptions
- MiChat is profile-driven:
profiles/<profile>/holdsprofile.json,system_prompt.txt,skills/,ui.json. - Agent skills are
SKILL.mdfiles underprofiles/<profile>/skills/<slug>/SKILL.md. - Tool capability boundaries are enforced by toolsets +
enabled_toolsetsinprofile.json. - MiChat requires a profile; no legacy root
./skillsfallback exists.
Implementation loop
Follow the steps in order. Do not improvise or skip steps. If anything is unclear or missing, ask for clarification before editing.
A) Decide placement
- Decide if this is a new toolset or belongs to an existing toolset.
- Choose which profiles should get it (toolset enablement + skill file).
B) Implement code
- Add/update the Python tool implementation.
- Register the tool in the correct toolset (toolsets registry).
- Ensure only profiles that enable the toolset can see/use the tool.
C) Add MiChat agent skill files
-
Create/edit
SKILL.mdunder the relevant profile(s) only. -
YAML frontmatter: require only
nameanddescription. -
If
allowed_toolsis used (per spec), list only tool names that exist in enabled toolsets for that profile.
D) Wire and sanity check
- Ensure manifest injection lists available skills for the active profile.
- Ensure
read_skillreads from the selected profile skills dir only.
E) Output verification steps (for Nicholas)
- Provide exact commands, e.g.:
python -m michat.shell --profile <name> --debugpython -m michat.chat --profile <name> --debug
- State exactly what to check (tool list, skill list, expected behavior).
- Use the repo’s current run entrypoints; the examples above are current as of this repo state.
House rules / constraints
- Follow the steps above as written; do not improvise or skip steps.
- Ask for clarification when information is missing or ambiguous.
- Never create/copy secrets or tokens; never commit
token.jsonorclient_secret*.json. - Do not use AppData or write outside the repo/exe folder; runtime state belongs under ./data and profile resources under profiles/<profile>/...
- Keep changes small and reversible; avoid refactors unless asked.
- If behavior depends on runtime UI, ask Nicholas to run and paste logs instead of guessing.
Source
git clone https://github.com/filmicgaze/MiChat-desktop/blob/main/.codex/skills/michat-skill-implementation/SKILL.mdView on GitHub Overview
This skill provides a structured workflow to implement MiChat agent skills and wire tools across profiles. It explains architecture assumptions like profiles/<profile>/ and how to place SKILL.md files. It also outlines a repeatable implementation loop (A–E) to ensure proper tool integration, visibility, and verification.
How This Skill Works
Follow the documented implementation loop: A) decide placement (new toolset vs existing), B) implement code (Python tool, toolset registry), C) add/edit SKILL.md under the relevant profile with proper allowed_tools, D) wire and perform sanity checks (manifest injection, read_skill scope), and E) run output verification steps. This ensures only enabled profiles see the tool and that skills are discoverable from the active profile.
When to Use It
- When adding a new toolset or integrating a new tool into MiChat.
- When associating a skill with an existing toolset and ensuring correct registration.
- When deploying to multiple profiles and enforcing per-profile enablement of toolsets.
- When validating that SKILL.md lists only tools from enabled toolsets for the profile.
- When performing the prescribed verification steps with the recommended commands.
Quick Start
- Step 1: Decide placement (new toolset vs existing) and choose target profiles to enable it.
- Step 2: Implement the Python tool, register it in the toolset, and create/edit the profile's SKILL.md with proper frontmatter.
- Step 3: Run verification: python -m michat.shell --profile <name> --debug and python -m michat.chat --profile <name> --debug; check tool list, skill list, and expected behavior.
Best Practices
- Follow the A–E steps strictly in order; do not improvise.
- Keep YAML frontmatter minimal in SKILL.md (name and description only).
- If using allowed_tools, list only tools that exist in enabled toolsets for the profile.
- Test changes with profile-specific runs: python -m michat.shell --profile <name> --debug and python -m michat.chat --profile <name> --debug.
- Keep changes small and reversible; avoid broad refactors unless requested.
Example Use Cases
- Add a new toolset for a custom data-fetching tool and create a corresponding michat-skill-implementation SKILL.md under profiles/sales/skills/forecast/.
- Wire an existing weather data tool into a new MiChat skill in profiles/marketing, ensuring the tool is exposed only to profiles with the toolset enabled.
- Register the Python tool in the correct toolset registry and update enabled_toolsets in profile.json.
- Verify that manifest injection lists the new skill for the active profile and that read_skill reads only from profiles/<profile>/skills.
- Run python -m michat.shell --profile <name> --debug followed by python -m michat.chat --profile <name> --debug to confirm tool and skill visibility and expected behavior.