Skip to content
Agentmart
Submit a tool

counsel

Run the weekly observability synthesis on demand and render the coaching brief in the conversation.

Skill by onlooker-community

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/onlooker-community-counsel

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Run the weekly observability synthesis on demand and render the coaching brief in the conversation. Reads the onlooker event log, runs a single synthesis pass, writes the brief, and prints it — bypassing the SessionStart staleness gate. Use when the user explicitly invokes /counsel, or wants a fresh improvement brief right now instead of waiting for the next stale-brief regeneration. Supports --show (print the latest brief, no LLM call) and --status.

Use cases: ml

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/counsel

What's inside

Skill name
counsel
Description
Run the weekly observability synthesis on demand and render the coaching brief in the conversation. Reads the onlooker event log, runs a single synthesis pass, writes the brief, and prints it — bypassing the SessionStart staleness gate. Use when the user explicitly invokes /counsel, or wants a fresh improvement brief right now instead of waiting for the next stale-brief regeneration. Supports --show (print the latest brief, no LLM call) and --status.
License
MIT
Instructions
139 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Counsel Skill

Counsel's SessionStart hook regenerates a weekly improvement brief only when the
last one has gone stale (`synthesis_interval_days`, default 7) and injects it
invisibly. This skill is the on-demand path: it forces a fresh synthesis right
now and renders the brief into the conversation.

## Setup

Run this once at the start. It sources the plugin helpers, loads config, and
resolves project context.

```bash
set -uo pipefail
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
export CLAUDE_PLUGIN_ROOT="$PLUGIN_ROOT"

source "$PLUGIN_ROOT/scripts/lib/counsel-config.sh"
source "$PLUGIN_ROOT/scripts/lib/counsel-events.sh"
source "$PLUGIN_ROOT/scripts/lib/onlooker-project-key.sh"
source "$PLUGIN_ROOT/scripts/lib/counsel-project-dir.sh"
source "$PLUGIN_ROOT/scripts/lib/counsel-ulid.sh"
source "$PLUGIN_ROOT/scripts/lib/counsel-reader.sh"
source "$PLUGIN_ROOT/scripts/lib/counsel-synthesize.sh"
source "$PLUGIN_ROOT/scripts/lib/counsel-brief.sh"

REPO_ROOT=$(onlooker_project_repo_root "$(pwd)")
counsel_config_load "$REPO_ROOT"

PROJECT_KEY=$(onlooker_project_key "$(pwd)")
if [[ -z "$PROJECT_KEY" ]]; then
  echo "No project key — Counsel needs a git repository (remote or root) to scope briefs. Skipping."
  exit 0
fi
BRIEFS_DIR=$(counsel_project_dir "$PROJECT_KEY")
```

## Invocation Modes

### `/counsel` — run the weekly review now (default)

Forces a synthesis pass regardless of brief freshness, writes the brief to
`${ONLOOKER_DIR:-~/.onlooker}/counsel/<project-key>/briefs/<YYYY-WW>.md`, emits
`counsel.brief.generated`, and renders the result. Re-running in the same ISO
week overwrites that week's brief in place. (`$ONLOOKER_DIR` overrides the
storage root; the test suite and non-default installs rely on it.)

```bash
SESSION_ID="${CLAUDE_SESSION_ID:-$(counsel_ulid)}"
export _HOOK_SESSION_ID="$SESSION_ID"

LOOKBACK=$(counsel_config_get '.counsel.lookback_days'); LOOKBACK="${LOOKBACK:-30}"
echo "Running Counsel synthesis over the last ${LOOKBACK} days of events…"

_rc=0
OUTPUT_PATH=$(counsel_generate_brief "$SESSION_ID" "$(pwd)" force) || _rc=$?

if [[ "$_rc" -eq 2 ]]; then
  min_events=$(counsel_config_get '.counsel.capture.min_events'); min_events="${min_events:-10}"
  echo "Not enough events to synthesize a brief (fewer than ${min_events} in the lookback window). Use the ecosystem long enough to accumulate telemetry, then try again."
  exit 0
elif [[ "$_rc" -ne 0 || -z "$OUTPUT_PATH" || ! -f "$OUTPUT_PATH" ]]; then
  echo "Counsel synthesis failed. Check that the \`claude\` CLI is on PATH and the onlooker log is readable."
  exit 1
fi
```

Then render the brief verbatim to the conversation:

```bash
echo "## Counsel weekly review (\`$(basename "$OUTPUT_PATH" .md)\`)"
echo ""
cat "$OUTPUT_PATH"
echo ""
echo "_Brief saved to ${OUTPUT_PATH}._"
```

### `/counsel --show` — print the latest brief (no LLM call)

Renders the most recent brief already on disk. No synthesis, no events emitted.

```bash
LATEST=$(ls -1 "$BRIEFS_DIR"/*.md 2>/dev/null | sort | tail -1)
if [[ -z "$LATEST" || ! -f "$LATEST" ]]; then
  echo "No brief on disk yet for this project. Run \`/counsel\` to generate one."
  exit 0
fi
echo "## Counsel brief (\`$(basename "$LATEST" .md)\`)"
echo ""
cat "$LATEST"
```

### `/counsel --status` — brief freshness

Reports the latest brief's age, last-generated time, and path. No LLM call.

```bash
INTERVAL=$(counsel_config_get '.counsel.synthesis_interval_days'); INTERVAL="${INTERVAL:-7}"
LATEST=$(ls -1 "$BRIEFS_DIR"/*.md 2>/dev/null | sort | tail -1)

echo "## Counsel status"
echo "- Project key: ${PROJECT_KEY}"
echo "- Briefs dir:  ${BRIEFS_DIR}"
echo "- Stale after: ${INTERVAL} days"

if [[ -z "$LATEST" || ! -f "$LATEST" ]]; then
  echo "- Latest brief: none yet (run \`/counsel\`)"
  exit 0
fi

if [[ "$(uname)" == "Darwin" ]]; then
  mtime=$(stat -f '%m' "$LATEST" 2>/dev/null || echo 0)
  human=$(date -r "$mtime" 2>/dev/null || echo "$mtime")
else
  mtime=$(stat -c '%Y' "$LATEST" 2>/dev/null || echo 0)
  human=$(date -d "@$mtime" 2>/dev/null || echo "$mtime")
fi
now=$(date +%s 2>/dev/null || echo "$mtime")
age_days=$(( (now - mtime) / 86400 ))

From onlooker-community/ecosystem, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 11, 2026 (18 days ago)
Last release
Oct 24, 2026 (5 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from onlooker-community

Cite this page

counsel skill. Agent Mart. https://agentmart.dev/skills/onlooker-community-counsel (last updated 2026-10-24)