From 33aa3c4ca911de9850750939aafb0679ba5b0770 Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Thu, 18 Jun 2026 12:05:15 +0200 Subject: [PATCH] =?UTF-8?q?docs(linkedin-studio):=20M0-11=20=E2=80=94=20dr?= =?UTF-8?q?op=20in-plugin=20ANALYTICS=5FROOT=20pins=20+=20repoint=20conten?= =?UTF-8?q?t-history=20(B1/B2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/import.md | 6 +++--- commands/report.md | 22 ++++++++++------------ hooks/prompts/state-update-reminder.md | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/commands/import.md b/commands/import.md index 7ab00c8..40a8b70 100644 --- a/commands/import.md +++ b/commands/import.md @@ -123,7 +123,7 @@ cd "${CLAUDE_PLUGIN_ROOT}/scripts/analytics" && npm install --silent Once the user selects, run the import CLI: ```bash -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" import +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" import ``` If importing multiple files, run the command for each file sequentially. @@ -240,8 +240,8 @@ Run /linkedin:report (period: 4w) 1. Read `expertise_areas` from `~/.claude/linkedin-studio.local.md` 2. Call `trends` for impressions and engagement_rate over the last 4 weeks: ```bash - ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period 4w --metric impressions - ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period 4w --metric engagement_rate + "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period 4w --metric impressions + "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period 4w --metric engagement_rate ``` 3. Produce the Content Pillar Performance, Format Performance, and Day-of-Week Performance tables, plus exactly 3 actionable recommendations diff --git a/commands/report.md b/commands/report.md index 694c39b..3fdffb1 100644 --- a/commands/report.md +++ b/commands/report.md @@ -98,7 +98,7 @@ date +%Y-W%V If the user chose monthly: ```bash -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" report --month +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" report --month ``` Read the generated JSON from `assets/analytics/monthly-reports/.json`. Present the monthly summary with MoM comparison deltas, weekly breakdown, and top performers. Then jump to Step 7 for deep-dive options. @@ -108,7 +108,7 @@ Read the generated JSON from `assets/analytics/monthly-reports/.json`. If the user chose heatmap: ```bash -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" heatmap +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" heatmap ``` Present the day-of-week matrix and best-day findings. Then jump to Step 7 for deep-dive options. @@ -118,12 +118,12 @@ Present the day-of-week matrix and best-day findings. Then jump to Step 7 for de Execute the report CLI command: ```bash -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" report --week +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" report --week ``` **Example:** ```bash -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" report --week 2026-W05 +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" report --week 2026-W05 ``` The CLI will generate: @@ -151,7 +151,7 @@ The report contains: Get additional context with trend analysis: ```bash -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period month --metric impressions +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period month --metric impressions ``` This provides: @@ -165,12 +165,10 @@ After the initial trend data, automatically run trend analysis for the key metri **Run trends CLI for key metrics:** ```bash -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" \ - "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" \ +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" \ trends --period month --metric impressions -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" \ - "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" \ +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" \ trends --period month --metric engagement_rate ``` @@ -356,13 +354,13 @@ If user wants more trend analysis: ```bash # Analyze comments trend -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period month --metric comments +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period month --metric comments # Analyze shares trend -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period month --metric shares +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period month --metric shares # Analyze engagement rate trend -ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period month --metric engagementRate +"${CLAUDE_PLUGIN_ROOT}/scripts/analytics/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period month --metric engagementRate ``` Present additional insights from these trends. diff --git a/hooks/prompts/state-update-reminder.md b/hooks/prompts/state-update-reminder.md index 499110e..7aa8c69 100644 --- a/hooks/prompts/state-update-reminder.md +++ b/hooks/prompts/state-update-reminder.md @@ -68,7 +68,7 @@ If a LinkedIn post was created or finalized in this session, save the full post If a LinkedIn post was created or finalized, append an entry to the content history log: -- If `assets/analytics/content-history.md` does not exist, initialize it from `config/content-history.template.md` +- If `${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/content-history.md` does not exist, initialize it from `config/content-history.template.md` - Append a new row to the "## Content Log" table: ``` | YYYY-MM-DD | "Hook text..." | topic_area | format | word_count | char_count | source |