feat(linkedin-thought-leadership): onboarding improvements for new users

- Session-start hook: welcome message with getting-started steps on first run
- Session-start hook: prominent personalization score section when score is 0
- Router: condensed 4-option menu for users who haven't posted yet
- Post/quick commands: non-blocking readiness check for unpersonalized state
- Post-creation hook: inline 5x5x5 engagement ritual explanation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-04-07 22:11:59 +02:00
commit c747ab6ee6
5 changed files with 56 additions and 4 deletions

View file

@ -27,6 +27,23 @@ The follower segment only appears if `follower_count > 0` in the state file.
If the state file doesn't exist, show: "No LinkedIn state tracked yet. State tracking starts when you create your first post."
## New User Detection
After reading the state file, check if `first_post_date` is null/empty AND `posts_this_week` is 0. If so, this is a new user. Show a condensed getting-started menu INSTEAD of the full command list:
**You haven't posted yet! Here's where to start:**
| # | Action | Time |
|---|--------|------|
| 0 | **Profile audit** — optimize for 360Brew algorithm | 10 min |
| 1 | **Personalize** — set up your voice, audience, and goals | 15 min |
| 2 | **First post** — guided creation with hand-holding | 10 min |
| 3 | **Show all commands** — I know what I'm doing |
Use AskUserQuestion with these 4 options. Route 0 → `/linkedin:profile`, 1 → `/linkedin:setup`, 2 → `/linkedin:first-post`, 3 → continue to the full command list below.
**Skip this section entirely if `first_post_date` is set or `posts_this_week` > 0.** Proceed to Upcoming Posts and the full command list.
## Upcoming Posts
After the status line, show upcoming scheduled posts from the queue:

View file

@ -23,6 +23,16 @@ You are a LinkedIn thought leadership content creator. Guide the user through cr
First, load persistent state and personalization:
- Read `~/.claude/linkedin-thought-leadership.local.md` for posting state (streak, weekly progress, recent topics)
- Read `skills/linkedin-thought-leadership/SKILL.md` for user profile, voice settings, and preferences
- Read `config/user-profile.local.md` (if it exists) for expertise areas and audience
### Readiness Check
If `config/user-profile.local.md` doesn't exist OR `assets/voice-samples/authentic-voice-samples.md` contains `[Your Name]` in the title line, show this non-blocking notice:
> This plugin isn't personalized yet. Content will use generic best practices.
> Run `/linkedin:setup` after this session to unlock voice-matched content.
Then proceed normally — do not block content creation.
Check state for topic planning:
- Compare intended topic against "Recent Posts" in state file

View file

@ -27,6 +27,17 @@ Read `skills/linkedin-thought-leadership/SKILL.md` for:
- Core expertise areas (for topical alignment)
- Phrases they commonly use
Read `config/user-profile.local.md` (if it exists) for expertise areas and audience.
### Readiness Check
If `config/user-profile.local.md` doesn't exist OR `assets/voice-samples/authentic-voice-samples.md` contains `[Your Name]` in the title line, show this non-blocking notice:
> This plugin isn't personalized yet. Content will use generic best practices.
> Run `/linkedin:setup` after this session to unlock voice-matched content.
Then proceed normally — do not block content creation.
Read `assets/quick-post-resources.md` for:
- Hooks bank
- CTAs bank

View file

@ -16,7 +16,14 @@ Based on the day of the week, suggest the next optimal posting window:
- Weekend: 10-11 AM CET (lower reach but less competition)
**3. 5x5x5 Engagement Reminder**
Remind: 'Before posting, spend 15-20 minutes on 5x5x5 pre-engagement: find 5 people with overlapping audiences, comment thoughtfully on their recent posts.'
Remind the user about the 5x5x5 engagement ritual:
> **5x5x5 Engagement Ritual** (15-20 min before AND in the first hour after posting):
> - **5 comments** — find 5 people with overlapping audiences and leave thoughtful comments on their recent posts
> - **5 connection requests** — send personalized requests to people who engaged with your niche today
> - **5 replies** — reply to every comment on YOUR post within the first hour
>
> This signals active participation to LinkedIn's algorithm and boosts your post's initial distribution.
**4. Content Logging**
Note: The post topic and hook should be logged to the state file when the session ends (handled by Stop hook).

View file

@ -253,7 +253,9 @@ if (existsSync(STATE_FILE)) {
}
// Personalization score check
if (pScore !== null && pScore < 50) {
if (pScore !== null && pScore === 0) {
context += '## Quick Win\\nPersonalization: 0%. Run /linkedin:setup (15 min) to unlock voice-matched, audience-specific content.\\n\\n';
} else if (pScore !== null && pScore < 50) {
reminders += `- Personalization score is ${pScore}%. Run /linkedin:setup to improve content quality with your real voice, case studies, and audience data.\\n`;
}
@ -367,8 +369,13 @@ if (existsSync(STATE_FILE)) {
content = content.replace(/^current_week: .*/m, `current_week: "${actualWeek}"`);
writeFileSync(STATE_FILE, content);
context = `LinkedIn state file auto-initialized from template at ${STATE_FILE}.\\n`;
context += `Current ISO week set to ${actualWeek}.\\n`;
context += 'Edit the file to set your expertise_areas and weekly_goal.\\n';
context += `Current ISO week set to ${actualWeek}.\\n\\n`;
context += '## Welcome to LinkedIn Thought Leadership\\n\\n';
context += 'Your state file has been initialized. Here is how to get started:\\n\\n';
context += '1. Run /linkedin:profile — Optimize your LinkedIn profile for 360Brew (critical before first post)\\n';
context += '2. Run /linkedin:setup — Personalize with your voice, case studies, and audience data\\n';
context += '3. Run /linkedin:first-post — Create your first post in under 10 minutes\\n\\n';
context += 'Your personalization score is 0%. Content quality improves as you fill in your profile.\\n';
} else {
context = `No LinkedIn state file found at ${STATE_FILE} and template missing.\\n`;
context += `Expected template at: ${templateFile}\\n`;