# Metrics Reporter

> Record agentic task completion via event files for DORA observability.

- **Type:** Skill
- **Install:** `agentstack add skill-d-oit-rust-2026-template-metrics-reporter`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [d-oit](https://agentstack.voostack.com/s/d-oit)
- **Installs:** 0
- **Category:** [Data & Analytics](https://agentstack.voostack.com/c/data-and-analytics)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [d-oit](https://github.com/d-oit)
- **Source:** https://github.com/d-oit/rust-2026-template/tree/main/.agents/skills/metrics-reporter
- **Website:** https://d-oit.github.io/rust-2026-template/

## Install

```sh
agentstack add skill-d-oit-rust-2026-template-metrics-reporter
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Skill: metrics-reporter

## When to Use

- User asks for this skill's functionality

## Purpose

Record agentic task completion by writing a per-event JSON file to `.agents/events/`. This pattern avoids Git merge conflicts and supports multi-agent coordination.

## When to use

Call this skill as the LAST step of any task or sub-task.

## Steps

1. **Prepare Directory**: Ensure the daily directory exists.

   ```bash
   EVENT_DIR=".agents/events/$(date -u +%Y/%m/%d)"
   mkdir -p "${EVENT_DIR}"
   ```

2. **Generate Filename**: Create a unique filename for the event.

   ```bash
   EVENT_FILE="${EVENT_DIR}/$(date -u +%Y-%m-%dT%H-%M-%SZ)-${AGENT_NAME:-unknown}-${TASK_ID:-$(date -u +%s)}.json"
   ```

3. **Write Event Data**: Populated with task metadata and success status.

   ```json
   {
     "event_id": "$(date -u +%s)-${AGENT_NAME}",
     "task_id": "${TASK_ID}",
     "skill": "${SKILL_NAME}",
     "status": "success",
     "started_at": "${STARTED_AT}",
     "finished_at": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
     "success": true,
     "human_interventions": 0,
     "git_sha": "$(git rev-parse --short HEAD)"
   }
   ```

4. **Verify**: Ensure the JSON is valid and written to the correct location.

## Human Interventions

Set `human_interventions > 0` if:
- A human corrected, rewrote, or reverted your code.
- A PR required a fixup commit after your submission.
- A review comment called out an error in your work.

## Aggregation

Aggregated metrics are periodically generated by CI into `.agents/aggregated/`. The CI status files are in `.agents/ci/`. Do not hand-edit files in these directories.

## Rationalizations

| Rationalization | Reality |
|-----------------|---------|
| "I'll skip metrics — it's just paperwork." | Without metrics, you can't prove AI tooling ROI or identify bottlenecks. |
| "I'll log it later." | Later never happens. Log immediately after task completion. |
| "human_interventions doesn't matter." | It's the key metric for measuring true agent autonomy vs human effort. |

## Red Flags

- [ ] Not calling metrics-reporter as the last step of a task
- [ ] Setting human_interventions to 0 when a human fixed your code
- [ ] Using the old append-to-metrics.jsonl pattern instead of event files

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [d-oit](https://github.com/d-oit)
- **Source:** [d-oit/rust-2026-template](https://github.com/d-oit/rust-2026-template)
- **License:** MIT
- **Homepage:** https://d-oit.github.io/rust-2026-template/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-d-oit-rust-2026-template-metrics-reporter
- Seller: https://agentstack.voostack.com/s/d-oit
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
