Data layer

From codejunkie99/agentic-stack · View interactive version

Data layer is an AI agent skill from the GitHub repository codejunkie99/agentic-stack. Use this skill when the user wants to measure agent activity across Claude Code,

How to use this skill

Skill file

Data Layer - cross-harness monitoring for the portable brain

Use this skill when the user wants to measure agent activity across Claude Code,

Hermes, OpenClaw, Codex, Cursor, OpenCode, Windsurf, Pi, Antigravity, or any

custom loop using .agent/.

The goal is local business intelligence for the whole agent suite:

workflow breadth, token usage, and estimated cost

Hard Rules

unredacted business records in shared examples.

and sanitized them.

channel unless the user explicitly approves the destination.

Inputs

Default inputs:

.agent/memory/episodic/AGENT_LEARNINGS.jsonl
.agent/data-layer/harness-events.jsonl     optional
.agent/data-layer/cron-runs.jsonl          optional
.agent/data-layer/category-rules.json      optional

AGENT_LEARNINGS.jsonl is the shared activity log. Optional files let users add

events from harnesses that do not automatically write rich events yet.

Agent behavior

When this skill is injected, decide whether the user is asking to see local

agent activity. Natural prompts such as "what did my agents do", "show me the

dashboard", "how many tokens did we use", or "show last week by hour" should

render the terminal dashboard directly. Do not make users remember flags.

Prefer passing the user's words to the exporter:

python3 .agent/tools/data_layer_export.py show me last 7 days by hour

If the user gives no range or bucket, run the default export. Explicit flags

still work for scripts and should override the natural-language words.

Export

Run:

python3 .agent/tools/data_layer_export.py --window 30d --bucket day

The command prints a compact terminal dashboard by default, then writes the

full browser dashboard and data files.

Use --bucket hour, --bucket day, --bucket week, or --bucket month for

different chart grains.

Outputs go to:

.agent/data-layer/exports/<YYYY-MM-DD>/

Key outputs:

Categories

Users can define any categories they want in

.agent/data-layer/category-rules.json, for example:

{
  "default_category": "uncategorized",
  "rules": [
    {"category": "coding", "skills": ["debug-investigator", "git-proxy"]},
    {"category": "admin", "run_types": ["cron"]},
    {"category": "financial", "workflows": ["invoice_collection"]},
    {"category": "personal", "workflows": ["calendar_coordination"]},
    {"category": "work", "phases": ["plan", "review", "qa", "ship"]}
  ]
}

Daily Screenshot Report

For daily resource management:

  1. Run the exporter from a user-approved cron or scheduled agent.
  2. Open dashboard.html.
  3. Capture the Resource Overview, Activity, Tokens, Cron Runs, Task Categories,

Harness Mix, Workflow Outcomes, Cron Gantt, and Cron Timeline sections.

  1. Send the screenshot only through an explicitly approved channel.

The exporter creates daily-report.md as the text summary. It does not send

anything by itself.

Self-rewrite hook

If exports are confusing twice in a row, improve category rules, schema names,

or dashboard labels before adding heavier dashboard dependencies.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.