Index of every page on this site: llms.txt
All skills
awslabs avatar

/aidlc-session-cost

@792daad
Run it yourself

Read-only session cost view. Prints deterministic aggregates for the current workflow — duration, stage outcomes, memory entries, sensor firings, learnings captured — sourced entirely from `{{INVOKE}} engine runtime summary`. Never mutates workflow state, never emits audit events, never writes files.

Use this Skill: https://skilld.dev/gh/awslabs/aidlc-workflows/aidlc-session-cost

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈81 tokens for metadata: the name and description. ≈936 when used: this file.

Description uses 4.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈322 characters, or 4.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

AI-DLC Session Cost

Purpose

Give the team a transparent, deterministic view of what the current workflow has consumed: how long it has run, how many stages have cleared their gates, how much the orchestrator wrote to its observation diaries, how often sensors fired, and how many learnings were captured.

Every number this skill prints comes from {{INVOKE}} engine runtime summary --json — the materialised, event-sourced view over runtime-graph.json. This skill does no counting of its own. It does not estimate tokens, does not walk the artefact tree, and does not read audit.md. If a number isn't in the tool's output, this skill does not invent it.

Classification

Read-only. This skill never advances the workflow stage pointer, never emits an audit event, and never writes a file. It is safe to run at any point in a workflow, including mid-stage.

Steps

Step 1: Read the aggregates

Run:

{{INVOKE}} engine runtime summary --json

If the command exits non-zero (no runtime-graph.json yet — the workflow hasn't compiled a graph), print:

No session data yet.

Session cost becomes available once a workflow has started and its
first stage transition has compiled runtime-graph.json. Run /aidlc to
begin, then re-run /aidlc-session-cost.

and STOP.

Otherwise parse the JSON. The shape is:

{
  "workflow_id": "...",          // ISO timestamp of the live workflow
  "scope": "...",
  "started_at": "...",
  "duration_minutes": 40,         // null when nothing has completed yet
  "stages":   { "total": N, "approved": N, "failed": N, "pending": N },
  "by_phase": { "<phase>": { "total": N, "approved": N, "failed": N, "pending": N }, ... },
  "memory":   { "total": N, "interpretations": N, "deviations": N, "tradeoffs": N, "open_questions": N },
  "sensors":  { "total": N, "passed": N, "failed": N, "could_not_run": N, "budget_override": N, "incomplete": N },
  "learnings":{ "from_orchestrator": N, "from_user_addition": N }
}

Step 2: Render the report

Print the fields verbatim — do not recompute, round, or re-estimate any value. Use in progress when duration_minutes is null.

Session Cost
============

Workflow:   {workflow_id}
Scope:      {scope}
Duration:   {duration_minutes} min   (or "in progress")

Stages
  Total:      {stages.total}
  Approved:   {stages.approved}
  Failed:     {stages.failed}
  Pending:    {stages.pending}

By phase
  {phase}    {approved}/{total} approved[, {failed} failed][, {pending} pending]
  ...

Memory entries
  Total:            {memory.total}
  Interpretations:  {memory.interpretations}
  Deviations:       {memory.deviations}
  Trade-offs:       {memory.tradeoffs}
  Open questions:   {memory.open_questions}

Sensors
  Fired:            {sensors.total}
  Passed:           {sensors.passed}
  Failed:           {sensors.failed}
  Could not run:    {sensors.could_not_run}
  Budget-override:  {sensors.budget_override}
  Incomplete:       {sensors.incomplete}

Learnings captured
  From orchestrator:    {learnings.from_orchestrator}
  From user additions:  {learnings.from_user_addition}

Step 3: Surface advisory notes (optional, narrative only)

You may add a short narrative note after the table — for example, flagging that many stages are still pending, or that sensors are firing incomplete often. Keep it to one or two sentences and base it only on the numbers above. Do not invent metrics the tool did not report.

Note on tokens: this skill deliberately does not print a token estimate. The retired file-size-to-token heuristic was guesswork dressed as data. If you need real token accounting, read it from your Claude Code session, not from a file-size approximation.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides a read-only view of workflow session costs by querying a local engine. It does not perform any network operations, file writes, or sensitive data access.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 792daad. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
user-invocable
true
classification
read-only

README badge

README badge for awslabs/aidlc-workflows/aidlc-session-cost