npx claudepluginhub outfitter-dev/trailsBuild with the Trails framework — contract-first trails, surfaces, testing, and governance for agent-assisted development.
Build Trails itself with contributor workflows for architecture, governance, documentation, and review.
7-day visitors to each marketplace page
Define once. Surface everywhere.
Trails is a contract-first TypeScript framework. Define a trail — typed input, Result output, examples, intent, and an implementation that establishes how it runs — and the framework renders it on CLI, MCP, HTTP, or the RPC surface hosted on WebSocket. One definition, every surface, zero drift.
Trails ships CLI, MCP, and HTTP surfaces today. The RPC surface (JSON-RPC 2.0, hosted on WebSocket first) is landing through @ontrails/rpc.
Claude Code — add the marketplace, then install the plugin:
claude plugin marketplace add outfitter-dev/trails
claude plugin install trails@trails
Codex, Cursor, and others — install the skill in the target agent profile:
npx skills outfitter-dev/trails
That command mutates the selected local skill install. Use a disposable or profile-specific target when testing installer behavior, and prefer the repo's plugin release runbook for operator preflight checks.
The skill gives your agent the full Trails reference: lexicon, patterns, error taxonomy, surface wiring, testing, and before/after migration examples.
Normal Trails 0.2 releases use the npm latest tag. The pinned Bun examples below target 0.2.4.
Moving an existing app from the 1.0 beta line? The 0.x migration guide includes a preview-first script for manifests, catalogs, and package overrides. The 0.x line ships on latest; minor releases may include documented API changes.
For the standalone trails CLI, follow the canonical Homebrew installation guide. The CLI requires Bun at runtime; use trails --version to check the installed release.
bunx @ontrails/[email protected] create --permit '{"id":"local-dev","scopes":["project:write"]}'
Follow the prompts — pick a name, choose a starter, select your surfaces. The scaffolder generates a working project with trails, a topo, surface wiring, and tests. The --permit flag is required: create writes a new project, and Trails write commands always name their authority explicitly instead of assuming it.
Apps generated by the published 0.2.0 CLI need an explicit Node types dependency before typechecking. Follow the 0.2.0 scaffold repair.
Or install manually:
bun add --exact @ontrails/[email protected] @ontrails/[email protected] @ontrails/[email protected] zod
bun add --exact -d @ontrails/[email protected]
app.get('/api/projects/:id', async (req, res) => {
try {
const project = await db.projects.findById(req.params.id);
if (!project) {
return res.status(404).json({ error: 'Project not found' });
}
res.json(project);
} catch (err) {
console.error('Failed to fetch project:', err);
res.status(500).json({ error: 'Internal server error' });
}
});
const show = trail('project.show', {
input: z.object({ id: z.string().describe('Project ID') }),
output: projectSchema,
intent: 'read',
examples: [
{ name: 'Found', input: { id: 'p_1' }, expected: { id: 'p_1', name: 'Acme' } },
{ name: 'Missing', input: { id: 'p_0' }, error: 'NotFoundError' },
],
implementation: async (input) => {
const project = await db.projects.findById(input.id);
if (!project) return Result.err(new NotFoundError(`Project ${input.id} not found`));
return Result.ok(project);
},
});
Same behavior, now captured as a runnable trail contract. The framework derives:
myapp project show --id p_1 with --help text, exit code 2 for not-foundmyapp_project_show with JSON Schema input, readOnlyHint annotationtestAll(graph) validates the happy path and the error pathYou authored the contract and implementation. The framework did the rest.
Each declaration you add to a trail unlocks derived behavior across every surface:
RuFlo Marketplace: Claude Code native agents, swarms, workers, and MCP tools for continuous software engineering
Directory of popular Claude Code extensions including development tools, productivity plugins, and MCP integrations
Plugins with agents, skills, and commands for Claude Code and six other coding tools. Local plugins are maintained as one Markdown source and adapted to each tool.