agentleFS
thenavidmthenavidm/podcastindex-mcp-cli/AGENTS.md

podcastindex-mcp-cli

AGENTS.md1 starsChanged 56 days agoMITView on GitHub

For someone changing the code. Installation lives in the README. Slipway owns MCP over stdio and --http, the CLI, the write guard, approvals, annotations and the audit log. Do not re-derive these. Signing. signRequest concatenates key, secret and timestamp in that order and lower-cases the hex. Any deviation gives a 401 identical to a bad secret. There is a test pinning it against an independently computed digest. Do not change it to match an implementation detail. Re-sign on every retry.…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not re-derive these.

    line 42
  2. Very specific:

    Add it to the right module in src/tools/, with defineTool

    line 88
  3. Distinctive:

    Write the description for a model that cannot see the code.

    line 89
  4. Very specific:

    Update the tool count in package.json, README.md and SKILL.md

    line 95
  5. Distinctive:

    No em dashes. Short paragraphs.

    line 112
  6. Distinctive:

    Never name another project or maintainer anywhere in this repo.

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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
AGENTS.md

Working on this repo

For someone changing the code. Installation lives in the README.

Layout

src/
  index.ts        entry: turns on the compile cache and starts the app
  app.ts          the Slipway app: tools, settings, resources, prompts, doctor
  guide.ts        the server instructions, the concepts resource, the prompts
  config.ts       settings from environment
  doctor.ts       the clock and the credentials, for `doctor`
  api/
    http.ts       request signing, throttle, retry, cache, file fetching
    client.ts     one typed method per endpoint
    errors.ts     status to actionable message
    types.ts      the shapes the API returns
    transcripts.ts  format detection and parsing
    chapters.ts   the Podcasting 2.0 chapters file
  format/render.ts  shaping output for a model
  format/fence.ts   fencing text other people wrote
  tools/          one module per group, grouped by what they reach,
                  plus kit.ts, which adapts them to Slipway and maps errors to exit codes

Slipway owns MCP over stdio and --http, the CLI, the write guard, approvals, annotations and the audit log.

Commands

npm run verify      typecheck, build, test. Run this before pushing
npm test            vitest, no network, no credentials
npm run typecheck
npm run build
node dist/index.js doctor

Decisions already made

Do not re-derive these.

LanguageTypeScript, Node 22+, ESM
Package@thenavidm/podcastindex-mcp-cli
FrameworkSlipway: one definition of each tool serves MCP over stdio and --http, and the CLI
Testsvitest against a faked fetch, never the network
Writeson by default, approval only on the two irreversible ones

Things that will bite you

Signing. signRequest concatenates key, secret and timestamp in that order and lower-cases the hex. Any deviation gives a 401 identical to a bad secret. There is a test pinning it against an independently computed digest. Do not change it to match an implementation detail.

Re-sign on every retry. A backoff can be eight seconds, and the signing window is three minutes. Signing once per call and retrying with a stale timestamp would fail intermittently under load, which is the worst kind of bug.

fulltext on everything. Without it the API truncates text fields to 100 characters and a truncated description still looks like a description. That is a silent wrong answer, not an error.

Presence-only parameters. ?clean=false still means clean to this API, so withParams drops a false boolean entirely rather than sending it. Do not "fix" that into sending the value.

Never cache random. randomEpisodes passes fresh: true. Without it, asking twice returns the same episodes for the whole cache window.

Empty is not 404. The single-lookup endpoints answer a miss with 200 and an empty feed or episode. resolveFeed detects that. New lookup tools need to do the same or they will return a blank object as though it were a result.

Transcript format detection sniffs the body. Publishers mislabel mime types constantly. The declared type is a hint used only to order the attempts.

Speaker labels are a heuristic. extractLabelledSpeakers accepts a candidate on one of four signals, documented in the file. It is deliberately conservative: inventing a speaker is worse than reporting none, because a reader cannot tell a fabricated one from a real one.

Adding a tool

  1. Add it to the right module in src/tools/, with defineTool
  2. Write the description for a model that cannot see the code. Say what it reaches, what it costs, and what will surprise the caller. The test suite enforces a minimum length because a thin description is a real bug
  3. Set risk honestly. destructive means it cannot be undone; Slipway adds confirm to it, and consequence says what cannot be taken back
  4. Export it from the module's array, which tools/index.ts already collects
  5. Update the tool count in package.json, README.md and SKILL.md

Verification

CI runs the typecheck, the build, the tests and the built binary on Node 22 and 24, and a tag publishes to npm. Check locally before pushing:

npm run verify
node dist/index.js doctor

Then a real MCP handshake against dist/index.js, not just unit tests. A server can pass every test and still fail to register a tool.

Writing

No em dashes. Short paragraphs. Comments explain why, never what.

Never name another project or maintainer anywhere in this repo. Never put AI attribution in a commit.

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.