[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75TSVV50ZAS6A027C53ZNPB":3,"skill-same:01M75TSVV50ZAS6A027C53ZNPB":48},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":27,"install":28,"resources":41},"01M75TSVV50ZAS6A027C53ZNPB","langfuse",null,"damien-robotsix\u002Frobotsix-chat","damien-robotsix","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F130368771?v=4","01M75TS5N09AA5MQAS3V6TPNM5","Damien SIX","01M75TS5NMBPJ3RRHERKBVA7DY",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Flangfuse\u002Fskill.md",[],[],"2026-11-12 13:55:43",false,"# Langfuse trace inspection\n\nRead-only tool that queries the Langfuse observability API to fetch and summarise recent traces.\nPrimarily used to diagnose implement-stage failures by inspecting the agent's own LLM-call traces\nlinked to a specific ticket or run.\n\n## When to use it\n\n- When the mill's implement stage fails to produce a PR and the assistant needs to inspect the LLM\n  traces to understand why.\n- When a ticket or run id is known and the assistant wants to see the most recent traces emitted\n  during that run.\n- When debugging an anomalous LLM response — fetch the trace by its id for a full structured\n  summary.\n- When analyzing fleet cost drivers — query traces from `robotsix-mill`, `robotsix-ci-fix`, or other\n  components using the `project` parameter. To rank the most expensive traces across the whole fleet\n  in a single call, pass a list of project names or `project=\"all\"`; the combined result is sorted\n  by `totalCost` descending.\n\n## Allowed operation\n\n| Tool                     | Description                                                        |\n| ------------------------ | ------------------------------------------------------------------ |\n| `inspect_langfuse_trace` | Fetch one or more Langfuse traces and return a structured summary. |\n\n## Tool signatures\n\n```python\ninspect_langfuse_trace(\n    trace_id: str = \"\",\n    ticket_id: str = \"\",\n    project: str | list[str] = \"\",\n    limit: int = 5,\n    from_timestamp: str = \"\",\n    to_timestamp: str = \"\",\n) -> str\n```\n\n- At least one search criterion must be provided: `trace_id`, `ticket_id`, `from_timestamp`, or\n  `to_timestamp`.\n\n- `trace_id` is mutually exclusive with the other criteria.\n\n- `project`: Langfuse project selector (optional). When empty, queries the main chat project. It\n  accepts several forms:\n\n  - a single project name — e.g. `project=\"robotsix-mill\"`, `project=\"robotsix-ci-fix\"`,\n    `project=\"robotsix-memory\"`;\n  - a list of project names, or a comma-separated string, to query several projects at once — e.g.\n    `project=[\"robotsix-mill\", \"robotsix-ci-fix\"]` or `project=\"robotsix-mill,robotsix-chat\"`;\n  - the special value `project=\"all\"` to query every configured project.\n\n  When more than one project is queried, each trace summary carries an extra `project` field, the\n  combined `traces` list is sorted by `totalCost` descending, and the response echoes the resolved\n  `projects` list (plus a per-project `errors` map when some projects could not be queried). See the\n  configuration schema for the full list of available projects.\n\n- When `trace_id` is given: fetch that single trace and return a detailed summary (name, timestamps,\n  input\u002Foutput tokens, total cost, top-level observations, scores).\n\n- When `ticket_id` is given: search for traces whose tags include `ticket_id:\u003Cvalue>` (most recent\n  first) up to `limit`, and return a summary list (trace id, name, timestamp, duration, cost).\n\n- `from_timestamp` \u002F `to_timestamp`: filter traces by time range (ISO 8601, e.g.\n  `2026-08-01T00:00:00Z`). Either or both may be provided, alone or combined with `ticket_id`.\n\n- `limit` caps the number of traces returned (default 5, max configured in settings).\n\n## Return value\n\nA JSON string with a `traces` list. Each trace entry carries:\n\n| Field          | Description                                                         |\n| -------------- | ------------------------------------------------------------------- |\n| `id`           | Langfuse trace id                                                   |\n| `name`         | Trace name (e.g. \"implement\", \"chat-turn\")                          |\n| `timestamp`    | ISO-8601 start time                                                 |\n| `userId`       | User\u002Fagent id attached to the trace                                 |\n| `latency`      | End-to-end duration in seconds                                      |\n| `totalCost`    | Total cost in USD                                                   |\n| `usage`        | `{promptTokens, completionTokens, cachedPromptTokens, totalTokens}` |\n| `observations` | Count of observations (LLM calls, spans, events)                    |\n| `scores`       | List of `{name, value}` score pairs                                 |\n\n`cachedPromptTokens` exposes the prompt tokens served from cache — compare it against `promptTokens`\nto spot wasteful token-ratio patterns (cache hits vs. primary tokens) and redundant retries.\n\nWhen `ticket_id` is given, an additional `ticket_id` field echoes the search key and `limit` echoes\nthe cap used. When multiple projects are queried, each trace carries a `project` field, and the\nresponse echoes the resolved `projects` list (and an `errors` map if any project failed).\n\n## Safety\n\n- Read-only — never mutates anything in Langfuse.\n- Only reaches the configured Langfuse host (default `https:\u002F\u002Fcloud.langfuse.com`).\n- Authenticates with Basic auth using the specified project's configured credentials — no user\n  credentials are ever exposed to the agent.\n- The tool is only available when `langfuse_inspect.enabled` is `true` in the server config.\n\n## Error handling — read before acting on a failure\n\n- **Transient errors are retried automatically.** The tool retries timeouts, 5xx responses, and\n  network failures up to 2 times with exponential backoff before returning an error. If you receive\n  an error, it has already survived multiple attempts — do NOT retry the tool repeatedly hoping for\n  a different result.\n- **Do NOT claim credentials are missing without evidence.** The tool authenticates via Basic auth\n  using the `langfuse.projects` config block — it checks credentials up front and returns an\n  explicit \"project X is not configured\" error when they are absent. Any other error (HTTP status,\n  timeout, network failure) means the credentials *were* sent and the Langfuse host rejected or did\n  not receive the request. Blaming a missing credential when the tool did not return the\n  credential-specific error message wastes time and erodes trust.\n- **Do NOT suggest a restart.** The environment-variable credential path (`LANGFUSE_PUBLIC_KEY`,\n  `LANGFUSE_SECRET_KEY`) was decommissioned — the tool reads credentials from the server's JSON\n  config file at startup. A restart will not change the credential state and will not fix a network,\n  timeout, or API-level error.\n- **Other components' projects come from deploy.** A foreign project (e.g. `robotsix-mill`) is\n  configured only when central-deploy dispatched its keys — the owning component tags them with a\n  `langfuse:\u003Cproject>` scope and chat consumes `langfuse:*`, which injects\n  `LANGFUSE_\u003CPROJECT>_PUBLIC_KEY` \u002F `_SECRET_KEY` at deploy. If such a project is \"not configured\",\n  the fix is the scope tag in central-deploy's env store plus a chat redeploy — never copying the\n  keys into chat's config.\n- **The self-check you already have:** call the tool with any known trace id or ticket id. If it\n  returns data, Langfuse access is working. If it returns an error, read the error message literally\n  — it tells you exactly what failed (network, timeout, HTTP status, missing credentials). Do not\n  layer your own theory on top of a clear error message.\n\n## Example calls\n\n```text\n# Inspect a specific known trace\ninspect_langfuse_trace(trace_id=\"01J...abc\")\n\n# Search for traces linked to a ticket (chat project)\ninspect_langfuse_trace(ticket_id=\"20260727T001240Z-add-capability-5bd6\", limit=5)\n\n# Query the last 24 hours of traces from the robotsix-mill project to identify cost drivers\ninspect_langfuse_trace(project=\"robotsix-mill\", from_timestamp=\"2026-08-22T00:00:00Z\",\n                       to_timestamp=\"2026-08-23T00:00:00Z\", limit=10)\n\n# Find the most expensive robotsix-ci-fix traces from the last week\ninspect_langfuse_trace(project=\"robotsix-ci-fix\", from_timestamp=\"2026-08-11T00:00:00Z\", limit=20)\n\n# Rank the costliest traces across several projects in one call (sorted by totalCost desc)\ninspect_langfuse_trace(project=[\"robotsix-mill\", \"robotsix-ci-fix\", \"robotsix-chat\"],\n                       from_timestamp=\"2026-08-22T00:00:00Z\", limit=10)\n\n# Rank the costliest traces across EVERY configured project (fleet-wide cost analysis)\ninspect_langfuse_trace(project=\"all\", from_timestamp=\"2026-08-22T00:00:00Z\", limit=10)\n```\n\n## Fast path for periodic-session speed complaints (moved from the system prompt, 2026-09-08)\n\n– Periodic session speed complaints: when a user reports that a scheduled periodic session finishes\ntoo fast, stops too early, or produces short-lived sessions, and references specific Langfuse trace\nIDs or session IDs, use inspect_langfuse_trace to query those traces directly in your FIRST\nresponse. Query the provided trace IDs plus a wider time window (the 24–48 hours around the reported\ntraces) via from_timestamp \u002F to_timestamp to find other short-lived sessions. Report the outliers\nwith their trace IDs, durations, and a one-sentence diagnosis in a single response — do NOT ask\nclarifying questions or offer to spawn a background subsession. The user has already told you what\nthey need; act on it.\n",{},"main","c1d7c05ced8b81c2750ddc6e5e49a7803fc90940","src\u002Frobotsix_chat\u002Flangfuse","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix","2026-11-14 18:49:02",{"source":7,"skillName":5,"commands":29,"prompt":39,"zipAvailable":40},[30,33,36],{"tool":31,"command":32},"npx","npx skills add damien-robotsix\u002Frobotsix-chat --skill langfuse",{"tool":34,"command":35},"bunx","bunx skills add damien-robotsix\u002Frobotsix-chat --skill langfuse",{"tool":37,"command":38},"pnpm","pnpm dlx skills add damien-robotsix\u002Frobotsix-chat --skill langfuse","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Flangfuse\u002Fskill.md",true,[42],{"path":43,"resourceType":44,"resourceTypeDesc":45,"sizeBytes":46,"sourceHtmlUrl":47},"__init__.py","SCRIPT","脚本",15448,"https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Flangfuse\u002F__init__.py",[49,55,61,67,73,79],{"skillNo":50,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":18},"01M75TTQ70FE02S8DNAB423T5H","volume_tools","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Fvolume_tools\u002Fskill.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M75TTNCPAPZBKHJTM4WFVAP1","ticket_poll","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Fticket_poll\u002Fskill.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M75TTHW71NXKXW144682SPF1","subsessions","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Fsubsessions\u002Fskill.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M75TTGBAFPVH6759BNB3G3NR","security","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Frepo\u002Fsecurity\u002Fskill.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M75TTCZN8GTQQ92GR7Z6E7Y2","direct","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Frepo\u002Fdirect\u002Fskill.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M75TT98KF65BJQNPQ61GQFKV","actions","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Frepo\u002Factions\u002Fskill.md",[],[]]