# Michat Skill Implementation

> Repo guidance for implementing a new MiChat agent skill and its tool wiring.

- Skill: `filmicgaze/michat-skill-implementation` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add filmicgaze/michat-skill-implementation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/filmicgaze/michat-skill-implementation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: filmicgaze (https://skillmd.com/u/filmicgaze)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/filmicgaze/michat-skill-implementation

---


## Architecture assumptions
- MiChat is profile-driven: `profiles/<profile>/` holds `profile.json`, `system_prompt.txt`, `skills/`, `ui.json`.
- Agent skills are `SKILL.md` files under `profiles/<profile>/skills/<slug>/SKILL.md`.
- Tool capability boundaries are enforced by toolsets + `enabled_toolsets` in `profile.json`.
- MiChat requires a profile; no legacy root `./skills` fallback 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.md` under the relevant profile(s) only.
- YAML frontmatter: require only `name` and `description`.

- If `allowed_tools` is 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_skill` reads from the selected profile skills dir only.

### E) Output verification steps (for Nicholas)
- Provide exact commands, e.g.:
  - `python -m michat.shell --profile <name> --debug`
  - `python -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.json` or `client_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.

