using-trajectories-sdk
Use when programmatically creating or managing agent trajectories in TypeScript - provides TrajectoryClient for persistent storage and TrajectoryBuilder for in-memory construction
npx skills add majiayu000/claude-skill-registry --skill using-trajectories-sdk --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Using the Trajectories SDK ## Overview The `agent-trajectories` SDK provides two APIs for programmatically capturing agent work trajectories: **TrajectoryClient** (persistent, async) and **TrajectoryBuilder** (in-memory, sync). ## When to Use - Building tools or agents that need to record their work programmatically - Integrating trajectory capture into CI/CD or automation pipelines - Creating trajectories from code rather than CLI - **Not for**: Manual CLI usage (use `trail` CLI instead) ## Quick Reference | Need | Use | |------|-----| | Persist trajectories to disk | `TrajectoryClient` | | Build trajectories in memory | `TrajectoryBuilder` or `trajectory()` | | One-liner start | `trajectory('title')` shorthand | | Export formats | `.toMarkdown()`, `.toJSON()`, `.toTimeline()`, `.toPRSummary()` | ## Installation ```bash npm install agent-trajectories ``` ## TrajectoryClient (Persistent Storage) Use when you need trajectories saved to `.trajectories/` on disk. ```typescript import { TrajectoryClient } from 'agent-trajectories/sdk'; const client = new TrajectoryClient({ defaultAgent: 'my-agent' }); await client.init(); // Required before use // Start a trajectory const session = a
- Overview
- When to Use
- Quick Reference
- Installation
- TrajectoryClient (Persistent Storage)
- Client Options
- Key Client Methods
- Session Methods
- TrajectoryBuilder (In-Memory)
- Export Formats
- Common Mistakes
npm install agent-trajectories
What does the using-trajectories-sdk skill do?
Use when programmatically creating or managing agent trajectories in TypeScript - provides TrajectoryClient for persistent storage and TrajectoryBuilder for in-memory construction
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill using-trajectories-sdk --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
