Skip to content
Back to skills

Add Source

ASecurity

Add or extend a Decant source parser for another coding-agent CLI's session logs. Use when adding a new tool under src/sources/, changing how an existing parser normalizes records, or touching discovery, watch roots, or parser fixtures and goldens.

  • 79 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 1, 2026
developmentgoapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add dosu-ai/decant --skill add-source --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Source?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Add Source
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dosu-ai-add-source/badge)](https://www.skillsdirectory.com/skills/dosu-ai-add-source)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: add-source
description: Add or extend a Decant source parser for another coding-agent CLI's session logs. Use when adding a new tool under src/sources/, changing how an existing parser normalizes records, or touching discovery, watch roots, or parser fixtures and goldens.
---

# Add a source parser

The checklist lives in `docs/adding-a-source.md`. Read it in full before
editing; this skill only lists the steps that are easy to miss.

## Privacy first

- Never print, quote, or commit transcript content from `~/.claude`,
  `~/.codex`, or any other real session store. Inspect record shapes with
  aggregate counts only (types, key sets, value types).
- Every fixture under `fixtures/<tool>/` is hand-written with invented content.
  An edited real transcript is not synthetic.

## Touchpoints

1. `discover()` in `src/ingest.ts` (where files live, which sidecars to skip)
   plus a source-directory env override documented in `docs/sources.md`, and
   a row in the supported agents table in `README.md`.
2. `src/sources/<tool>.ts`: pure and print-free, returns a `ParsedSession`,
   turns malformed lines into `unparsed_line` issues and unknown record types
   into one `unknown_record_type` issue per type, calls `linkageIssues`. Reuse
   the JSONL line parser, unknown-type issue builders and block factory in
   `src/sources/shared.ts`.
3. The tool ID in `TOOLS` in `src/model.ts` (persisted; choose it once).
4. `watchDirs()` in `src/watch.ts`.
5. `SESSION_SOURCES`, `sessionSourceLabel`, and `sessionSourcePredicate` in
   `src/source-filter.ts`, the
   `source` enums in the API docs, the source label maps in `src/export.ts` and
   `src/sources/atif.ts`, and the source rows in `src/doctor.ts`.
6. The capability report from the doc, filled in for the pull request.

## Tests and goldens

- Parser tests in `test/<tool>.test.ts`, ingest coverage in
  `test/ingest.test.ts`, fixture paths in `test/golden/meta.json`, and the
  fixture directory in both stagers (`scripts/regen-goldens.ts` and
  `test/cli-golden.test.ts`).
- Regenerate goldens only after focused tests pass, then read the whole diff:
  `bun run scripts/regen-goldens.ts --i-reviewed-the-diff`.
  A golden change in an existing source is a regression until explained.

## Done

`bun test`, `bunx tsc --noEmit`, and `bunx biome check .` pass, then
`just check`. Use `DECANT_DB=<scratch> ... --no-sync` for manual runs so the
real archive is never touched.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.