chore(llma): clarify file path param naming in skill-store skills#60807
Conversation
Document the path vs file_path split across the llma-skill-* tools and add the missing llma-skill-archive tool to the skills-store and working-with-skills skills. The bundled-file path parameter is named file_path on file-get/file-delete (it's a URL segment) and path on file-create / files[] / file_edits (a body field), with old_path/new_path on rename. Agents working from memory were guessing wrong (passing path to file-get yields a /files/undefined/ 404). Both skills now state the rule explicitly. llma-skill-archive is an enabled MCP tool that neither skill documented. Generated-By: PostHog Code Task-Id: 8ef1a9bc-33e1-48de-92b3-3035b049b876
|
Hey @andrewm4894! 👋 It looks like your git author email on this PR isn't your
You can fix it for this repo with: git config user.email "you@posthog.com"Or set it globally with |
oxfmt --check normalizes emphasis to underscores; switch *object* to _object_ in the file-path naming note so the markdown formatting check passes. Generated-By: PostHog Code Task-Id: 8ef1a9bc-33e1-48de-92b3-3035b049b876
|
Problem
Agents authoring and maintaining PostHog LLM analytics skills via the
llma-skill-*MCP tools kept getting the bundled-file path parameter wrong — passingpathtollma-skill-file-getyields a/files/undefined/404. The two skills that document this surface (skills-store,working-with-skills) didn't explain why the name differs between tools, so agents guessed from memory and got it wrong repeatedly.The split is real but it's a REST artifact, not a bug:
file_path— onllma-skill-file-get/llma-skill-file-delete, where the path is a URL segment.path— onllma-skill-file-create, thefiles=[{path, …}]array, andfile_edits=[{path, …}], where it's a body field on a file object (sitting next tocontent).old_path/new_path— body fields onllma-skill-file-rename.Separately,
llma-skill-archiveis an enabled MCP tool that neither skill documented.Changes
Documentation-only, no API change:
pathvsfile_pathrule, with the mnemonic (anything carrying a file object usespath; the two tools that address a file by URL usefile_path) and the/files/undefined/404 failure mode.llma-skill-archive— added it to theskills-storetool table and theworking-with-skillsdecision tree, plus a short "Archiving a skill" section in each noting it hides all versions and cannot be undone.The underlying API was left unchanged: the param names are already explicit in each tool's generated input schema, the names follow correct REST conventions, and
pathis already the dominant name (file object, manifest, create,file_edits). Unifying the API onpath(renaming the URL capture group on get/delete) remains a possible follow-up but is a generated-client behavior change, so it was deliberately scoped out of this docs fix.How did you test this code?
I'm an agent. No automated tests apply to these markdown skill files (the only checked-in copies are the source
SKILL.mdfiles edited here; there is no generated artifact to resync, and theservices/mcpgenerated-tools test is unaffected). Verified the param-name claims against the source of truth — theLLMSkillViewSetURL patterns and serializers inproducts/ai_observability/backend/api/and the generated MCP tool inservices/mcp/src/tools/generated/ai_observability.ts.Automatic notifications
Docs update
🤖 Agent context
Authored by PostHog Code (Claude) in response to a support thread where an agent repeatedly guessed the wrong file-path parameter name when maintaining LLM analytics skills.
Investigated end-to-end before changing anything: confirmed the two skill docs were already internally consistent and matched the API, traced the
path/file_pathsplit to the REST design (URL segment vs body field), and foundllma-skill-archivewas an enabled-but-undocumented tool. Considered three cleanup options — (A) unify the API onpath, (B) unify onfile_path, (C) document the split — and chose C as the lowest-risk fix that addresses the actual failure mode (agents guessing rather than reading schemas), with A noted as an optional follow-up. Rejected B because it would force the file-object key tofile_patheverywhere and create more internal inconsistency.Created with PostHog Code