agentleFS
vojtaholikvojtaholik/smer/skills/add-smer-provider/SKILL.md

add-smer-provider

Skill1 starsChanged 5 months agoMITView on GitHub

Add, test, or repair a custom smer capture provider. Use when a user asks to track another service, API, JSONL log, local tool, or workflow in smer; mentions provider.toml; or needs an existing custom provider diagnosed.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 0 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create the smallest reviewable provider that maps source records into smer's strict event envelope.

    line 8
  2. Very specific:

    Prefer log-tail for an append-only JSONL file.

    line 13
  3. Very specific:

    Use api-poll for a read-only HTTP API with stable ids and a cursor.

    line 14
  4. Very specific:

    Use executable only when the declarative mappers cannot represent the source.

    line 15
  5. Very specific:

    Write provider.toml under ${SMER_HOME:-$HOME/.smer}/providers/<id>/.

    line 19
  6. Very specific:

    Run one collection pass with smer providers run <id> --json.

    line 62
  7. Very specific:

    Run smer doctor --json and fix provider health errors.

    line 64
  8. Very specific:

    Check that ts is unix seconds or an ISO timestamp accepted by the mapper, text stays below 64KB, stable source ids prevent duplicate …

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add an smer provider

Create the smallest reviewable provider that maps source records into smer's strict event envelope. Preserve retries and failures as evidence. Never put credentials in provider files or read credentials from project .env values.

Choose the adapter

  1. Inspect smer providers --json and the source's existing logs or API.
  2. Prefer log-tail for an append-only JSONL file.
  3. Use api-poll for a read-only HTTP API with stable ids and a cursor.
  4. Use executable only when the declarative mappers cannot represent the source. The executable must write one complete event envelope per stdout line.

Create the config

Write provider.toml under ${SMER_HOME:-$HOME/.smer}/providers/<id>/. Use lowercase provider ids and custom kinds beginning with x-.

API example:

[provider.linear]
adapter = "api-poll"
endpoint = "https://api.linear.app/example/events"
interval = "10m"
cursor = "id"
auth = { keychain = "smer-linear", header = "Authorization", scheme = "Bearer" }

[provider.linear.map]
ts = "{createdAt}"
kind = "x-issue"
project = "{team.key}"
title = "{identifier}: {title}"
text = "{identifier} {state.name} {url}"

JSONL example:

[provider.local-tool]
adapter = "log-tail"
path = "~/Library/Logs/local-tool/events.jsonl"
interval = "1m"

[provider.local-tool.map]
ts = "{timestamp}"
kind = "x-local-tool"
project = "{project}"
title = "{action}"
text = "{action} {status} {detail}"

For an executable, set adapter = "executable" and command = ["/absolute/path/to/emitter"]. Omit [provider.<id>.map] when stdout already contains strict envelopes.

Configure and verify

  1. Store an API token with smer providers credential <id> --keychain smer-<id>. Request a read-only token.
  2. Enable the provider with smer providers add <id>.
  3. Validate a representative envelope with smer emit --dry-run --json --source <id> --kind x-example --title "test" --text "test".
  4. Run one collection pass with smer providers run <id> --json.
  5. Confirm retrieval with smer search "distinctive term" --json.
  6. Run smer doctor --json and fix provider health errors.

Check that ts is unix seconds or an ISO timestamp accepted by the mapper, text stays below 64KB, stable source ids prevent duplicate imports, and no secret appears in config.toml, provider.toml, spool files, or event output.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.