Creating Triks
Build and publish your own secure AI triks in TypeScript or Python.
TLDR;
- Triks need a specific structure with a manifest and an agent implementation.
- There are two modes: conversational (LLM agent with handoff) and tool (native tools exposed to the main agent).
- Triks need to be pushed in a public GitHub repo with a version tag.
trik publishcan be run locally on the project root and it will try to publish the package to the Registry. Usually this ortrik lintwill give you enough information on what is missing.
Quick Start
The fastest way to create a new trik is with the CLI scaffolding tool:
# Install the CLI (if you haven't already)
npm install -g @trikhub/cli# Create a TypeScript trik
trik init tsThis will guide you through an interactive wizard and generate all the boilerplate files you need, including the manifest, entry point, and build configuration.
To understand better what each file does and how to make the necessary changes to create your very own Trik, check these sections:
- Project Structure - What files you need
- Writing the Manifest - Define your agent and tools
- Building the Agent - Implement the logic
- Testing Locally - Test before publishing
Helpers
A good place to start is by looking at existing Triks.
Check this TypeScript Trik for a working example.
However, there are a few other options to speed things up:
TrikHub MCP Server (Claude Code)
An MCP server that helps you design, scaffold, and validate triks directly from Claude Code (or any MCP-compatible client).
claude mcp add --transport stdio trikhub -- npx -y @trikhub/mcpOnce installed, you get access to tools like analyze_trik_requirements, scaffold_trik, validate_manifest, and diagnose_error — plus built-in docs and examples as MCP resources.
You can jump into your Claude Code and ask to create a specific Trik as you would ask any other Agent project. It will tailor the questions and output to be a TrikHub compatible Trik. Here I strongly advise using the Superpowers plugin as it has amazing results.
Init CLI Command
The trik init command scaffolds a new trik project with all required files. See Quick Start above.
Next: Learn about Project Structure.