AI development tools for the Community Health Toolkit (CHT). Installs CHT-specific skills, MCP servers, commands, and hooks into Claude Code or OpenCode.
Run the following slash commands inside Claude Code:
/plugin marketplace add medic/cht-ai-tools
/plugin install cht-specialist@medic-cht-ai-tools
/plugin install create-cht-task@medic-cht-ai-tools
/plugin install create-cht-target@medic-cht-ai-tools
/plugin install cht-pr-review@medic-cht-ai-tools
/plugin install cht-docs-mcp@medic-cht-ai-tools
/plugin install cht-dev-hooks@medic-cht-ai-tools
Restart Claude Code after installation.
npx @medic/cht-ai-tools installSee .opencode/INSTALL.md for full setup instructions (git clone + symlinks).
Or use the CLI:
npx @medic/cht-ai-tools install --target opencodeNote: Hooks are not supported in OpenCode and will be skipped automatically.
| Component | Claude Code | OpenCode |
|---|---|---|
CHT Skills (cht-specialist, create-cht-task, create-cht-target, cht-pr-review) |
✓ | ✓ |
| CHT Docs MCP (documentation access) | ✓ | ✓ |
Slash Commands (/cht-task, /cht-target, /cht-specialist, /cht-pr-review) |
✓ | ✓ |
| Hooks (validation & formatting) | ✓ | — |
The CLI supports interactive prompts, non-interactive flags, and selective installation.
npx @medic/cht-ai-tools install # Interactive mode (auto-detect target)
npx @medic/cht-ai-tools install --all # Install everything
npx @medic/cht-ai-tools install --target opencode --all
npx @medic/cht-ai-tools install --skills --mcp --project| Flag | Description |
|---|---|
--target <name> |
Target platform: claude-code or opencode (auto-detected if omitted) |
--skills |
Install CHT skills |
--mcp |
Install MCP servers |
--commands |
Install slash commands |
--hooks |
Install validation/formatting hooks (Claude Code only) |
--all, -y, --yes |
Install all components (non-interactive) |
--project |
Install to project directory instead of global config |
Expert guidance on CHT development, configuration, and troubleshooting:
- CHT architecture and data model
- App configuration (tasks, targets, contact summaries)
- XLSForm/ODK form development
- cht-conf CLI usage
- Deployment and hosting
- API integration
Interactive task creation with:
- Project detection
- Form integration
- Contact type awareness
- Best practices enforcement
KPI/indicator creation with:
- Counting mode guidance (instance vs contact)
- Aggregation setup
- Goal configuration
- Form field integration
Review a pull request to confirm if it delivers what its linked issue and its own description promise
Direct access to CHT documentation through the Model Context Protocol:
https://mcp-docs.dev.medicmobile.org/mcp
Quick access to skills:
/cht-task- Create or modify task definitions/cht-target- Create or modify target definitions/cht-specialist- Get expert CHT assistance/cht-pr-review- Review a pull request to confirm if it delivers what its linked issue and its own description promise
Automatic validation and formatting of CHT configuration files (tasks.js, targets.js, contact-summary.templated.js, purge.js):
- validate-cht (PreToolUse → Bash) - Syntax-checks CHT config files before commands run
- format-cht (PostToolUse → Write) - Auto-formats CHT config files via ESLint after writes
Note: Hook installation merges into your existing
settings.json. If you have custom hooks on the same event+matcher (e.g., otherPreToolUse → Bashhooks), they will be preserved alongside the CHT hooks.
| Location | Path | Use Case |
|---|---|---|
| Global | ~/.claude/ |
Available in all projects |
| Project | ./.claude/ |
Specific to current project |
| Location | Skills & Commands | MCP Config (opencode.json) |
|---|---|---|
| Global | ~/.config/opencode/ |
~/.config/opencode/opencode.json |
| Project | ./.opencode/ |
./opencode.json |
The plugin install method (/plugin marketplace add + /plugin install) requires only Claude Code — no Node.js needed.
The CLI install method (npx) requires:
- Node.js 18+
- Claude Code or OpenCode
The OpenCode manual setup (git clone + symlinks) requires only Git.
cht-ai-tools/
├── .claude-plugin/ # Claude Code plugin manifest
│ ├── plugin.json
│ └── marketplace.json
├── .opencode/ # OpenCode install guide
│ └── INSTALL.md
├── src/
│ ├── index.ts # CLI entry point
│ ├── cli/
│ │ ├── install.ts # Main install command
│ │ ├── prompts.ts # Clack interactive prompts
│ │ └── utils.ts # File operation helpers
│ ├── targets/ # AI tool adapters (extensible)
│ │ ├── base.ts # Target interface
│ │ ├── utils.ts # Shared utilities (JSON config, path checks)
│ │ ├── claude-code.ts # Claude Code implementation
│ │ ├── opencode.ts # OpenCode implementation
│ │ └── registry.ts # Target auto-detection registry
│ ├── installers/ # Tool-agnostic installation logic
│ │ ├── skills.ts
│ │ ├── mcp.ts
│ │ ├── commands.ts
│ │ ├── hooks.ts
│ │ ├── common.ts # Asset path resolution
│ │ └── index.ts
│ └── __tests__/
│ ├── claude-code.test.ts
│ ├── opencode.test.ts
│ └── registry.test.ts
├── skills/ # Bundled skill assets (package root)
├── commands/ # Bundled command assets
└── hooks/ # Bundled hook assets
├── hooks.json # Plugin hook definitions
└── scripts/
The Target interface (src/targets/base.ts) allows supporting multiple AI tools:
interface Target {
name: string;
detect(): Promise<boolean>;
getConfigPath(location: 'global' | 'project'): string;
installSkill(skill: Skill, location, options?): Promise<void>;
configureMcp(server: McpServer, location): Promise<void>;
installCommand(cmd: Command, location, options?): Promise<void>;
configureHook(hook: Hook, location): Promise<void>;
}Currently implemented targets:
| Target | Skills | MCP | Commands | Hooks |
|---|---|---|---|---|
| Claude Code | ✓ | ✓ | ✓ | ✓ |
| OpenCode | ✓ | ✓ | ✓ | — |
To add support for another AI tool (e.g., Cursor, Windsurf):
- Create
src/targets/cursor.tsimplementing theTargetinterface - Add detection and installation logic specific to that tool
- Register it in
src/targets/registry.ts
AGPL-3.0 - See LICENSE for details.
The Community Health Toolkit (CHT) is an open-source platform for building digital health applications for community health workers.
See CONTRIBUTING.md for how to add new skills, commands, MCP servers, and hooks.